Skip to content

Commit 382aeb7

Browse files
committed
Merge branch 'main' into pathfinder_w_pytensor_symbolic
2 parents ba85587 + 96f7a2e commit 382aeb7

File tree

126 files changed

+5018
-3438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+5018
-3438
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pymc_experimental/_version.py export-subst
1+
pymc_extras/_version.py export-subst

.github/workflows/pre-commit.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/pypi.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ jobs:
2828
cd test-sdist
2929
python -m venv venv-sdist
3030
venv-sdist/bin/python -m pip install numpy
31-
venv-sdist/bin/python -m pip install ../dist/pymc_experimental*.tar.gz
31+
venv-sdist/bin/python -m pip install ../dist/pymc_extras*.tar.gz
3232
echo "Checking import and version number (on release)"
33-
venv-sdist/bin/python -c "import pymc_experimental as pmx; assert pmx.__version__ == '${{ github.ref_name }}'[1:] if '${{ github.ref_type }}' == 'tag' else True; print(pmx.__version__)"
33+
venv-sdist/bin/python -c "import pymc_extras as pmx; assert pmx.__version__ == '${{ github.ref_name }}'[1:] if '${{ github.ref_type }}' == 'tag' else True; print(pmx.__version__)"
3434
cd ..
3535
- name: Check the bdist installs and imports
3636
run: |
3737
mkdir -p test-bdist
3838
cd test-bdist
3939
python -m venv venv-bdist
40-
venv-bdist/bin/python -m pip install ../dist/pymc_experimental*.whl
40+
venv-bdist/bin/python -m pip install ../dist/pymc_extras*.whl
4141
echo "Checking import and version number (on release)"
42-
venv-bdist/bin/python -c "import pymc_experimental as pmx; assert pmx.__version__ == '${{ github.ref_name }}'[1:] if '${{ github.ref_type }}' == 'tag' else pmx.__version__; print(pmx.__version__)"
42+
venv-bdist/bin/python -c "import pymc_extras as pmx; assert pmx.__version__ == '${{ github.ref_name }}'[1:] if '${{ github.ref_type }}' == 'tag' else pmx.__version__; print(pmx.__version__)"
4343
cd ..
4444
- uses: actions/upload-artifact@v3
4545
with:
@@ -50,13 +50,16 @@ jobs:
5050
name: upload release to PyPI
5151
needs: [build]
5252
runs-on: ubuntu-latest
53-
if: github.event_name == 'release' && github.event.action == 'published'
53+
if: github.repository_owner == 'pymc-devs' && github.event_name == 'release' && github.event.action == 'published'
54+
# Use the `release` GitHub environment to protect the Trusted Publishing (OIDC)
55+
# workflow by requiring signoff from a maintainer.
56+
environment: release
57+
permissions:
58+
# write id-token is necessary for trusted publishing (OIDC)
59+
id-token: write
5460
steps:
5561
- uses: actions/download-artifact@v3
5662
with:
5763
name: artifact
5864
path: dist
5965
- uses: pypa/gh-action-pypi-publish@release/v1
60-
with:
61-
user: __token__
62-
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches: [main]
77
paths:
88
- ".github/workflows/*"
9-
- "pymc_experimental/**"
9+
- "pymc_extras/**"
1010
- "tests/**"
1111
- "setup.py"
1212
- "pyproject.toml"
@@ -37,16 +37,16 @@ jobs:
3737
environment-file: conda-envs/environment-test.yml
3838
create-args: >-
3939
python=${{matrix.python-version}}
40-
environment-name: pymc-experimental-test
40+
environment-name: pymc-extras-test
4141
init-shell: bash
4242
cache-environment: true
43-
- name: Install pymc-experimental
43+
- name: Install pymc-extras
4444
run: |
4545
pip install -e .
4646
python --version
4747
- name: Run tests
4848
run: |
49-
python -m pytest -vv --cov=pymc_experimental --cov-append --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
49+
python -m pytest -vv --cov=pymc_extras --cov-append --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
5050
- name: Upload coverage to Codecov
5151
uses: codecov/codecov-action@v2
5252
with:
@@ -76,18 +76,18 @@ jobs:
7676
micromamba-version: "1.5.10-0" # Until https://github.com/mamba-org/mamba/issues/3467 is not fixed
7777
create-args: >-
7878
python=${{matrix.python-version}}
79-
environment-name: pymc-experimental-test
79+
environment-name: pymc-extras-test
8080
init-shell: cmd.exe
8181
cache-environment: true
82-
- name: Install pymc-experimental
82+
- name: Install pymc-extras
8383
run: |
8484
pip install -e .
8585
python --version
8686
- name: Run tests
8787
# This job uses a cmd shell, therefore the environment variable syntax is different!
8888
# The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682).
8989
run: >-
90-
python -m pytest -vv --cov=pymc_experimental --cov-append --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
90+
python -m pytest -vv --cov=pymc_extras --cov-append --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
9191
- name: Upload coverage to Codecov
9292
uses: codecov/codecov-action@v2
9393
with:

.gitpod.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ tasks:
33
- name: initialize
44
init: |
55
mkdir -p .vscode
6-
echo '{"python.defaultInterpreterPath": "/workspace/pymc-experimental/env/bin/python"}' > .vscode/settings.json
6+
echo '{"python.defaultInterpreterPath": "/workspace/pymc-extras/env/bin/python"}' > .vscode/settings.json
77
conda init bash && source ~/.bashrc
88
conda env update -f conda-envs/environment-test.yml -p env
9-
conda activate /workspace/pymc-experimental/env
9+
conda activate /workspace/pymc-extras/env
1010
pip install -r requirements-dev.txt
1111
pip install -e .
1212
command: |
13-
conda init bash && echo "conda activate /workspace/pymc-experimental/env" >> ~/.bashrc && source ~/.bashrc
13+
conda init bash && echo "conda activate /workspace/pymc-extras/env" >> ~/.bashrc && source ~/.bashrc
1414
1515
vscode:
1616
extensions:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ repos:
2727
hooks:
2828
- id: no-print-statements
2929
exclude: _version.py
30-
files: ^pymc_experimental/
30+
files: ^pymc_extras/

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Contributing guide
22

3-
Page in construction, for now go to https://github.com/pymc-devs/pymc-experimental#questions.
3+
Page in construction, for now go to https://github.com/pymc-devs/pymc-extras#questions.

MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include requirements*.txt
22
include *.md *.rst
33
include LICENSE
4-
include pymc_experimental/version.txt
4+
include README.md
5+
include pymc_extras/version.txt

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,56 @@
1-
# Welcome to `pymc-experimental`
2-
<a href="https://gitpod.io/#https://github.com/pymc-devs/pymc-experimental">
1+
# Welcome to `pymc-extras`
2+
<a href="https://gitpod.io/#https://github.com/pymc-devs/pymc-extras">
33
<img
44
src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod"
55
alt="Contribute with Gitpod"
66
/>
77
</a>
88
<img
9-
src="https://codecov.io/gh/pymc-devs/pymc-experimental/branch/main/graph/badge.svg"
9+
src="https://codecov.io/gh/pymc-devs/pymc-extras/branch/main/graph/badge.svg"
1010
alt="Codecov Badge"
1111
/>
1212

1313
As PyMC continues to mature and expand its functionality to accommodate more domains of application, we increasingly see cutting-edge methodologies, highly specialized statistical distributions, and complex models appear.
1414
While this adds to the functionality and relevance of the project, it can also introduce instability and impose a burden on testing and quality control.
15-
To reduce the burden on the main `pymc` repository, this `pymc-experimental` repository can become the aggregator and testing ground for new additions to PyMC.
16-
This may include unusual probability distributions, advanced model fitting algorithms, innovative yet not fully tested methods or any code that may be inappropriate to include in the `pymc` repository, but may want to be made available to users.
15+
To reduce the burden on the main `pymc` repository, this `pymc-extras` repository can become the aggregator and testing ground for new additions to PyMC.
16+
This may include unusual probability distributions, advanced model fitting algorithms, innovative yet not fully tested methods, or niche functionality that might not fit in the main PyMC repository, but still may be of interest to users.
1717

18-
The `pymc-experimental` repository can be understood as the first step in the PyMC development pipeline, where all novel code is introduced until it is obvious that it belongs in the main repository.
18+
The `pymc-extras` repository can be understood as the first step in the PyMC development pipeline, where all novel code is introduced until it is obvious that it belongs in the main repository.
1919
We hope that this organization improves the stability and streamlines the testing overhead of the `pymc` repository, while allowing users and developers to test and evaluate cutting-edge methods and not yet fully mature features.
2020

21-
`pymc-experimental` would be designed to mirror the namespaces in `pymc` to make usage and migration as easy as possible.
21+
`pymc-extras` would be designed to mirror the namespaces in `pymc` to make usage and migration as easy as possible.
2222
For example, a `ParabolicFractal` distribution could be used analogously to those in `pymc`:
2323

2424
```python
2525
import pymc as pm
26-
import pymc_experimental as pmx
26+
import pymc_extras as pmx
2727

2828
with pm.Model():
29+
alpha = pmx.ParabolicFractal('alpha', b=1, c=1)
2930

30-
alpha = pmx.ParabolicFractal('alpha', b=1, c=1)
31-
32-
...
31+
...
3332

3433
```
3534

3635
## Questions
3736

38-
### What belongs in `pymc-experimental`?
37+
### What belongs in `pymc-extras`?
3938

4039
- newly-implemented statistical methods, for example step methods or model construction helpers
4140
- distributions that are tricky to sample from or test
4241
- infrequently-used fitting methods or distributions
4342
- any code that requires additional optimization before it can be used in practice
4443

4544

46-
### What does not belong in `pymc-experimental`?
45+
### What does not belong in `pymc-extras`?
4746
- Case studies
4847
- Implementations that cannot be applied generically, for example because they are tied to variables from a toy example
4948

5049

5150
### Should there be more than one add-on repository?
5251

5352
Since there is a lot of code that we may not want in the main repository, does it make sense to have more than one additional repository?
54-
For example, `pymc-experimental` may just include methods that are not fully developed, tested and trusted, while code that is known to work well and has adequate test coverage, but is still too specialized to become part of `pymc` could reside in a `pymc-extras` (or similar) repository.
53+
For example, `pymc-extras` may just include methods that are not fully developed, tested and trusted, while code that is known to work well and has adequate test coverage, but is still too specialized to become part of `pymc` could reside in a `pymc-extras` (or similar) repository.
5554

5655

5756
### Unanswered questions & ToDos

conda-envs/environment-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: pymc-experimental-test
1+
name: pymc-extras-test
22
channels:
33
- conda-forge
4-
- defaults
4+
- nodefaults
55
dependencies:
6-
- pip
6+
- pymc>=5.19.1
77
- pytest-cov>=2.5
88
- pytest>=3.0
99
- dask
1010
- xhistogram
1111
- statsmodels
12+
- pip
1213
- pip:
13-
- pymc>=5.17.0 # CI was failing to resolve
1414
- blackjax
1515
- scikit-learn
1616
- better_optimize>=0.0.10

0 commit comments

Comments
 (0)