Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 44 additions & 34 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
matrix:
os: [ubuntu-20.04]
floatx: [float64]
python-version: ["3.7"]
test-subset:
- |
pymc/tests/test_util.py
Expand Down Expand Up @@ -88,12 +89,12 @@ jobs:
- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if environment-test-py37.yml has not changed
# Increase this value to reset cache if environment-test.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-envs/environment-test-py37.yml') }}
key: ${{ runner.os }}-py${{matrix.python-version}}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-envs/environment-test.yml') }}
- name: Cache multiple paths
uses: actions/cache@v3
env:
Expand All @@ -111,20 +112,21 @@ jobs:
miniforge-variant: Mambaforge
miniforge-version: latest
mamba-version: "*"
activate-environment: pymc-test-py37
activate-environment: pymc-test
channel-priority: strict
environment-file: conda-envs/environment-test-py37.yml
environment-file: conda-envs/environment-test.yml
python-version: ${{matrix.python-version}}
use-mamba: true
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Install-pymc
run: |
conda activate pymc-test-py37
conda activate pymc-test
pip install -e .
pip install --pre -U polyagamma
python --version
- name: Run tests
run: |
conda activate pymc-test-py37
conda activate pymc-test
python -m pytest -vv --cov=pymc --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
Expand All @@ -137,6 +139,7 @@ jobs:
matrix:
os: [windows-latest]
floatx: [float64]
python-version: ["3.8"]
test-subset:
- pymc/tests/test_variational_inference.py pymc/tests/test_initial_point.py
- pymc/tests/test_pickling.py pymc/tests/test_profile.py pymc/tests/test_step.py
Expand All @@ -156,12 +159,12 @@ jobs:
- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if conda-envs/environment-test-py38.yml has not changed
# Increase this value to reset cache if conda-envs/windows-environment-test.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-envs/windows-environment-test-py38.yml') }}
key: ${{ runner.os }}-py${{matrix.python-version}}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-envs/windows-environment-test.yml') }}
- name: Cache multiple paths
uses: actions/cache@v3
env:
Expand All @@ -179,22 +182,23 @@ jobs:
miniforge-variant: Mambaforge
miniforge-version: latest
mamba-version: "*"
activate-environment: pymc-test-py38
activate-environment: pymc-test
channel-priority: strict
environment-file: conda-envs/windows-environment-test-py38.yml
environment-file: conda-envs/windows-environment-test.yml
python-version: ${{matrix.python-version}}
use-mamba: true
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Install-pymc
run: |
conda activate pymc-test-py38
conda activate pymc-test
pip install -e .
pip install --pre -U polyagamma
python --version
- name: Run tests
# This job uses a cmd shell, therefore the environment variable syntax is different!
# The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682).
run: >-
conda activate pymc-test-py38 &&
conda activate pymc-test &&
python -m pytest -vv --cov=pymc --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
Expand All @@ -207,6 +211,7 @@ jobs:
matrix:
os: [macos-latest]
floatx: [float64]
python-version: ["3.9"]
test-subset:
- |
pymc/tests/test_parallel_sampling.py
Expand All @@ -232,12 +237,12 @@ jobs:
- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if environment-test-py39.yml has not changed
# Increase this value to reset cache if environment-test.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-envs/environment-test-py39.yml') }}
key: ${{ runner.os }}-py${{matrix.python-version}}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-envs/environment-test.yml') }}
- name: Cache multiple paths
uses: actions/cache@v3
env:
Expand All @@ -255,14 +260,15 @@ jobs:
miniforge-variant: Mambaforge
miniforge-version: latest
mamba-version: "*"
activate-environment: pymc-test-py39
activate-environment: pymc-test
channel-priority: strict
environment-file: conda-envs/environment-test-py39.yml
environment-file: conda-envs/environment-test.yml
python-version: ${{matrix.python-version}}
use-mamba: true
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Install pymc
run: |
conda activate pymc-test-py39
conda activate pymc-test
pip install -e .
python --version
- name: Run tests
Expand All @@ -279,6 +285,7 @@ jobs:
matrix:
os: [ubuntu-20.04]
floatx: [float64]
python-version: ["3.9"]
test-subset:
- pymc/tests/test_sampling_jax.py
fail-fast: false
Expand All @@ -294,12 +301,12 @@ jobs:
- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if environment-test-py39.yml has not changed
# Increase this value to reset cache if environment-test.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-envs/environment-test-py39.yml') }}
key: ${{ runner.os }}-py${{matrix.python-version}}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-envs/environment-test.yml') }}
- name: Cache multiple paths
uses: actions/cache@v3
env:
Expand All @@ -317,19 +324,20 @@ jobs:
miniforge-variant: Mambaforge
miniforge-version: latest
mamba-version: "*"
activate-environment: pymc-test-py39
activate-environment: pymc-test
channel-priority: strict
environment-file: conda-envs/environment-test-py39.yml
environment-file: conda-envs/environment-test.yml
python-version: ${{matrix.python-version}}
use-mamba: true
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Install pymc
run: |
conda activate pymc-test-py39
conda activate pymc-test
pip install -e .
python --version
- name: Install jax specific dependencies
run: |
conda activate pymc-test-py39
conda activate pymc-test
pip install "numpyro>=0.8.0"
pip install git+https://github.com/blackjax-devs/[email protected]
- name: Run tests
Expand All @@ -346,6 +354,7 @@ jobs:
matrix:
os: [windows-latest]
floatx: [float32]
python-version: ["3.8"]
test-subset:
- pymc/tests/test_sampling.py pymc/tests/test_ode.py
fail-fast: false
Expand All @@ -361,12 +370,12 @@ jobs:
- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if conda-envs/environment-test-py38.yml has not changed
# Increase this value to reset cache if conda-envs/windows-environment-test.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-envs/windows-environment-test-py38.yml') }}
key: ${{ runner.os }}-py${{matrix.python-version}}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-envs/windows-environment-test.yml') }}
- name: Cache multiple paths
uses: actions/cache@v3
env:
Expand All @@ -384,22 +393,23 @@ jobs:
miniforge-variant: Mambaforge
miniforge-version: latest
mamba-version: "*"
activate-environment: pymc-test-py38
activate-environment: pymc-test
channel-priority: strict
environment-file: conda-envs/windows-environment-test-py38.yml
environment-file: conda-envs/windows-environment-test.yml
python-verision: ${{matrix.python-version}}
use-mamba: true
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Install-pymc
run: |
conda activate pymc-test-py38
conda activate pymc-test
pip install -e .
pip install --pre -U polyagamma
python --version
- name: Run tests
# This job uses a cmd shell, therefore the environment variable syntax is different!
# The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682).
run: >-
conda activate pymc-test-py38 &&
conda activate pymc-test &&
python -m pytest -vv --cov=pymc --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET%
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ repos:
- id: pip-from-conda
additional_dependencies: [pyyaml]
entry: python scripts/generate_pip_deps_from_conda.py
files: ^conda-envs/environment-dev-py.+.yml$
files: ^conda-envs/environment-dev.yml$
language: python
name: Generate pip dependency from conda
- id: no-relative-imports
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ python:
path: .

conda:
environment: "conda-envs/environment-dev-py38.yml"
environment: "conda-envs/environment-dev.yml"

build:
os: "ubuntu-20.04"
Expand Down
41 changes: 0 additions & 41 deletions conda-envs/environment-dev-py38.yml

This file was deleted.

41 changes: 0 additions & 41 deletions conda-envs/environment-dev-py39.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# "dev" conda envs are to be used by devs in setting their local environments
name: pymc-dev-py37
name: pymc-dev
channels:
- conda-forge
- defaults
Expand All @@ -16,7 +16,6 @@ dependencies:
- numpy>=1.15.0
- pandas>=0.24.0
- pip
- python=3.7
- python-graphviz
- scipy>=1.4.1
- typing-extensions>=3.7.4
Expand All @@ -31,11 +30,11 @@ dependencies:
- pytest-cov>=2.5
- pytest>=3.0
- sphinx-copybutton
- sphinx-design
- sphinx-notfound-page
- sphinx>=1.5
- sphinxext-rediraffe
- watermark
- pip:
- polyagamma
- sphinx-design
- sphinx-remove-toctrees
Loading