Skip to content

Commit

Permalink
Add mamba env file (#556)
Browse files Browse the repository at this point in the history
* Add env file

* Add watermark to environment

* Mention env file in contributing guide
  • Loading branch information
AlexAndorra authored Mar 1, 2024
1 parent 9dda070 commit dbb47f3
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ For more instructions see the [Pull request checklist](#pull-request-checklist)

Always use a feature branch. It's good practice to never routinely work on the `main` branch of any repository.
1. Create an environment. For example:
1. Create a dedicated development environment from the file present in the repo:
```bash
conda create -n pymc_marketing_env
conda env create -f environment.yml
```
Activate the environment.
This will create an environment called `pymc-marketing-dev`. Activate the environment.
```bash
conda activate pymc_marketing_env
conda activate pymc-marketing-dev
```
Install the package (in editable mode) and its development dependencies:
Expand Down
3 changes: 3 additions & 0 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ conda create -c conda-forge -n marketing_env pymc-marketing
conda activate marketing_env
```

### Installation for developers
If you are a developer of pymc-marketing, or want to start contributing, [refer to the contributing guide](https://github.com/pymc-labs/pymc-marketing/blob/main/CONTRIBUTING.md) to get started.

See the official [PyMC installation guide](https://www.pymc.io/projects/docs/en/latest/installation.html) if more detail is needed.

## Quickstart
Expand Down
40 changes: 40 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# to be used by devs in setting their local environments
name: pymc-marketing-dev
channels:
- conda-forge
- defaults
dependencies:
# Base dependencies
- arviz>=0.13.0
- matplotlib>=3.5.1
- numpy>=1.17
- pandas
- pip
# NOTE: Keep minimum pymc version in sync with ci.yml `OLDEST_PYMC_VERSION`
- pymc>=5.8.2
- scikit-learn>=1.1.1
- seaborn>=0.12.2
- xarray
- xarray-einstats>=0.5.1
- watermark
# Extra dependencies for lint, testing and docs build
# docs
- sphinx
- ipython!=8.7.0
- myst-parser
- myst-nb
- pydata-sphinx-theme>=0.12.0.dev0
- sphinx-copybutton
- sphinx-autodoc-typehints
- sphinxext-opengraph
- sphinx-notfound-page
- sphinx-design
# lint
- mypy
- pandas-stubs
- pre-commit>=2.19.0
- ruff>=0.1.4
# test
- lifetimes==0.11.3
- pytest==7.0.1
- pytest-cov==3.0.0

0 comments on commit dbb47f3

Please sign in to comment.