Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Commit

Permalink
Merge pull request #85 from OpenSourceEconomics/debug_workflow
Browse files Browse the repository at this point in the history
Debugging workflow: rearrange dependencies; bump rpy2 version; use mamba
  • Loading branch information
Philipp Eisenhauer authored Jun 22, 2021
2 parents d5406e2 + 6e90681 commit b00a133
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 40 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ jobs:
run-tests:
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}

strategy:
fail-fast: false
Expand All @@ -19,32 +22,33 @@ jobs:
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: false
mamba-version: "*"
activate-environment: econsa
environment-file: environment.yml
python-version: ${{ matrix.python-version }}

# Dear fellow dev:
# Please keep this step in the CI as long as we still use conda.
# If you are not debugging, just comment them out.
# - name: (Debug) Check system status.
# run: |
# conda info
# conda config --show-sources
# # printenv | sort

- name: Run test suite.
shell: bash -l {0}
run: |
pytest --cov=econsa --cov-report=xml
- name: Run figures.
if: runner.os == 'Linux'
shell: bash -l {0}
run: |
export PATH="$PATH:/usr/share/miniconda/bin"
source .envrc
run-figures
- name: Upload coverage to Codecov.
if: runner.os == 'Linux' && matrix.python-version == '3.7'
if: runner.os == 'Linux' && matrix.python-version == '3.9'
uses: codecov/codecov-action@v1
with:
file: coverage.xml

- name: Run pre-commits.
if: runner.os == 'Linux'
shell: bash -l {0}
run: |
pre-commit install
pre-commit run --all-files
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
- id: black
args: ['--line-length=100']
files: '(\.pyi?|wscript|ipynb)$'
language_version: python3.7
language_version: python3
additional_dependencies: [black-nb]
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
Expand Down
27 changes: 14 additions & 13 deletions configurations/rtd_environment.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
name: econsa

channels:
- defaults
- conda-forge
- defaults
- opensourceeconomics

dependencies:
- python=3.7
- sphinx
- pandas
- numpy=1.18
- python
- pip

- pandas
- numpy<1.20
- numpoly<1.2.0
- scipy
- statsmodels
- jupyter
- jupyterlab
- matplotlib-base
- seaborn
- numba
- pdbpp
- temfpy>=1.1
- chaospy

- ipykernel

- pytest
- pytest-black
- pytest-flake8
- pytest-cov
- pytest-sugar
- black
- hypothesis

- sphinx
- nbsphinx
- numpydoc
- sphinx_rtd_theme
- sphinxcontrib-bibtex<2.0.0
- pre-commit
- sphinxcontrib-bibtex>=2.0.0

- pip:
- pytest-stress
- pytest-randomly
- black-nb
- flake8-nb
- numpydoc
- cairosvg
- sphinxcontrib-svg2pdfconverter[CairoSVG]
3 changes: 3 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,6 @@ def setup(app):

# Use new CDN path of MathJax
mathjax_path = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"

# Set bib file for sphinxcontrib-bibtex
bibtex_bibfiles = ["bibliography.bib"]
39 changes: 23 additions & 16 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,54 @@
name: econsa

channels:
- defaults
- conda-forge
- defaults
- opensourceeconomics

dependencies:
- python=3.7
- sphinx
- pandas
- numpy=1.18
- python
- pip

- pandas
- numpy<1.20
- numpoly<1.2.0
- scipy
- statsmodels
- ipykernel
- jupyterlab
- matplotlib-base
- seaborn
- numba
- pdbpp
- matplotlib-base
- temfpy>=1.1
- chaospy

- ipykernel
- jupyterlab

- pre-commit
- pytest=5.4.3
- pytest
- pytest-cov
- pytest-sugar
- pytest-black
- pytest-flake8
- black>=20.8b0
- black
- pdbpp
- hypothesis

- sphinx
- nbsphinx
- numpydoc
- sphinx_rtd_theme
- sphinxcontrib-bibtex
- sphinxcontrib-bibtex>=2.0.0

- r-base
- r-r.utils
- r-condmvnorm
- rpy2==2.9.4
- rpy2

- pip:
# Dear fellow dev:
# Please check twice before you add anything here
# that you absolutely cannot find it with https://anaconda.org/search.
- pytest-stress
- pytest-randomly
- black-nb
- flake8-nb
- numpydoc
- cairosvg
- sphinxcontrib-svg2pdfconverter[CairoSVG]

0 comments on commit b00a133

Please sign in to comment.