Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: feature/setup doctests #869

Draft
wants to merge 122 commits into
base: main
Choose a base branch
from

Conversation

MuradKhalil
Copy link
Contributor

@MuradKhalil MuradKhalil commented Jul 24, 2024

Description

  • added a make command to run code in docstrings

Related Issue

Checklist

Modules affected

  • MMM
  • CLV

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

📚 Documentation preview 📚: https://pymc-marketing--869.org.readthedocs.build/en/869/

wd60622 and others added 30 commits April 2, 2024 15:07
* add scaling into lift test method

* test scaling methods

* test change of MMM likelihood

* link up beta_channel parameters

* change name to sigma

* reorganize and edit

* closes pymc-labs#406

* address the feedback in docstrings

* add more to docstring

* format the docstring

* be verbose for future devs

* be explicit for the column max values

* incorporate the feedback

* hide cells and add to intro

* add conclusion

* switch to header 2

* run notebook through

* move the types together

* separate model estimated from empirical

* fix typos
* drop python 3.9

* try python 3.12

* undo try python 3.12
* improve nb

* rm warnings and add link to lifetimes quickstart

* address comments

* feedback part 3

* remove warnings manually
* add more info to the notebook

* hide plots code

* fix plot y labels

* fix plot outputs and remove model build

* improve final note probability plots

* address comments

* use quickstart dataset

* feedback part 3

* remowe warnings manually

* feedback part 4
* improve mmm docs init

* add more code examples to docstrings

* minor improvemeents

* typo

* better phrasing

* add thomas suggestion
* move fixtures to conftest

* docstrings and moved set_model_fit to conftest

* fixed pandas quickstart warnings

* revert to MockModel and add ParetoNBD support

* quickstart edit for issue 609

* notebook edit
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.3.5 → v0.3.7](astral-sh/ruff-pre-commit@v0.3.5...v0.3.7)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Juan Orduz <[email protected]>
* fix potential bugs

* minor improvements

* remove rule for nb

* fix test

* improve tests syntax

* use stacklevel 2 for warnings

* use stacklevel 1 for warnings as they are used in public methods

* ignore B904

* undo change

* ricardos feedback

* use fit_posterior

* Update pymc_marketing/clv/models/gamma_gamma.py

Co-authored-by: Ricardo Vieira <[email protected]>

* last fix XD

---------

Co-authored-by: Ricardo Vieira <[email protected]>
* notebook opening and imports

* model definition markdown

* Data Load Notebook section

* WIP model fitting section

* added notebook to docs directory

* notebook edits and graph code

* ppc section and nb cleanup

* demz sampling and WIP plotting

* WIP predictive plots

* WIP heatmap plots

* predictive plots

* WIP covariates and nbqa-ruff edits

* covariate section

* plot additions

* fig sizes

* remove model file
…book (pymc-labs#651)

* add spaces, increase indentation, and fix number order

* explicit with 6
* Creating plot waterfall

Co-Authored-By: Carlos Trujillo <[email protected]>

* requested changes

* pre-commit

---------

Co-authored-by: Carlos Trujillo <[email protected]>
Databricks should have a lower-case b.
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.1 → v0.4.2](astral-sh/ruff-pre-commit@v0.4.1...v0.4.2)
- [github.com/pre-commit/mirrors-mypy: v1.9.0 → v1.10.0](pre-commit/mirrors-mypy@v1.9.0...v1.10.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* support for negative values and dates (if used)

* fix terrible spelling

* test dates in coords

* cover numpy objects

* consolidate the tests
drbenvincent and others added 7 commits July 23, 2024 17:19
* update uml diagrams

* add uml command to Makefile
* updated the ruff lint command, added ruff code formating command in Makefile, updated contributing.md

* fixing the issue with the new line at the end of makefile

* updated the PHONY list in makefile

---------

Co-authored-by: Murad Khalilov <[email protected]>
updates:
- [github.com/pre-commit/mirrors-mypy: v1.10.1 → v1.11.0](pre-commit/mirrors-mypy@v1.10.1...v1.11.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Juan Orduz <[email protected]>
* Fix model_builder docstrings

* Fix whitespace error

---------

Co-authored-by: Juan Orduz <[email protected]>
* add GH discussions link to README

* add link to MMM hub slack

* Update README.md

---------

Co-authored-by: Will Dean <[email protected]>
@MuradKhalil MuradKhalil reopened this Jul 24, 2024
@MuradKhalil MuradKhalil reopened this Jul 24, 2024
@MuradKhalil MuradKhalil changed the title Feature/setup doctests Draft: feature/setup doctests Jul 24, 2024
@MuradKhalil
Copy link
Contributor Author

TODO: add this check to CI

Murad Khalilov and others added 3 commits July 24, 2024 22:08
…-labs#857)

* Fix plotting by evaluating tensors.

* Add space after sphinx directive.

* Remove indentation from blank line.

* Add shared y axis for subplots.

---------

Co-authored-by: Patrick Robotham <[email protected]>
Co-authored-by: Will Dean <[email protected]>
@wd60622
Copy link
Contributor

wd60622 commented Jul 25, 2024

This will be awesome. Thanks for getting this started!

I'm not familiar with the tool. Is this an additional install? Will will have to add to our various environment locations then "environment.yml" / "pyproject.toml"(?), etc

TODO: add this check to CI

Might be good to run in parallel with other tests. WDYT?

juanitorduz and others added 3 commits July 25, 2024 13:58
* add original scale implementation

* add plot nb

* change location

* undo

* make mypy happy

* test plot

* add test

* update plot readme

* fix test

* improve variable description
* infernece changed to dataset

* inference changed dataset for plot_allocated_contribution_by_channel

---------

Co-authored-by: Will Dean <[email protected]>
@wd60622
Copy link
Contributor

wd60622 commented Nov 14, 2024

Hi @MuradKhalil
Are you still interested in working on this? If not, I can make some issues for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run example code in doc strings in CI