From d8aed4c894d0d86e41e58bb1c702af7669017661 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Thu, 11 Feb 2021 11:49:44 -0800 Subject: [PATCH 01/12] Setting up GitHub Actions --- .github/workflows/code-style.yml | 21 ++++++++ .github/workflows/coverage.yml | 32 ++++++++++++ .github/workflows/cross-compatibility.yml | 31 ++++++++++++ .github/workflows/installation.yml | 59 +++++++++++++++++++++++ .github/workflows/unit-tests.yml | 28 +++++++++++ .travis.yml | 31 ------------ 6 files changed, 171 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/code-style.yml create mode 100644 .github/workflows/coverage.yml create mode 100644 .github/workflows/cross-compatibility.yml create mode 100644 .github/workflows/installation.yml create mode 100644 .github/workflows/unit-tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml new file mode 100644 index 0000000..c845eba --- /dev/null +++ b/.github/workflows/code-style.yml @@ -0,0 +1,21 @@ +name: Code style + +# This workflow runs code style checks. + +on: + push: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Check code style + run: | + pip install pycodestyle + pycodestyle urbansim_templates diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..df9cf38 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,32 @@ +name: Coverage + +# This workflow generates a coverage report (how much of the codebase is covered by the +# unit tests) and uploads the information to Coveralls.io for reporting and analysis. + +on: + push: # TURN OFF + pull_request: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install UrbanSim Templates + run: | + pip install . + pip install -r requirements-extras.txt + pip install -r requirements-dev.txt + - name: Run tests + run: | + coverage run --source urbansim_templates --module pytest --verbose + - name: Upload to Coveralls + run: | + coveralls + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/cross-compatibility.yml b/.github/workflows/cross-compatibility.yml new file mode 100644 index 0000000..6ecb09e --- /dev/null +++ b/.github/workflows/cross-compatibility.yml @@ -0,0 +1,31 @@ +name: Cross-compatibility + +# This workflow runs the UrbanSim Templates unit tests across a comprehensive range of +# Python versions and operating systems. + +on: + # push: + pull_request: + workflow_dispatch: + +jobs: + build-pip: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: [3.6, 3.7, 3.8, 3.9] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install UrbanSim Templates + run: | + pip install . + pip install -r requirements-extras.txt + pip install -r requirements-dev.txt + - name: Run tests + run: | + coverage run --source urbansim_templates --module pytest --verbose diff --git a/.github/workflows/installation.yml b/.github/workflows/installation.yml new file mode 100644 index 0000000..a0deefc --- /dev/null +++ b/.github/workflows/installation.yml @@ -0,0 +1,59 @@ +name: Installation + +# This workflow installs UrbanSim Templates from Pip and Conda across a range of Python +# versions and operating systems. You can run this manually after a new release is posted +# to confirm that it installs smoothly. This workflow also runs periodically in the +# background to catch dependency updates that break UrbanSim Templates. + +on: + push: # TURN OFF + # pull_request: + workflow_dispatch: + schedule: + - cron: '0 3 * * 1' # every Monday at 3am UTC (Sunday evening Calif time) + +jobs: + build-pip: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: [3.6, 3.7, 3.8, 3.9] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install UrbanSim Templates + run: | + pip install urbansim_templates + pip install -r requirements-extras.txt + pip install -r requirements-dev.txt + - name: Run tests + run: | + coverage run --source urbansim_templates --module pytest --verbose + + build-conda: + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash -l {0} # needed for conda persistence + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: [3.6, 3.7, 3.8, 3.9] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: conda-incubator/setup-miniconda@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install UrbanSim Templates + run: | + conda install urbansim_templates --channel conda-forge + pip install -r requirements-extras.txt + pip install -r requirements-dev.txt + - name: Run tests + run: | + coverage run --source urbansim_templates --module pytest --verbose diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 0000000..102d2bf --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,28 @@ +name: Unit tests + +# This workflow runs the UrbanSim Templates tests in a single generic environment (recent +# but stable Python version on recent but stable Ubuntu). The cross-compatibility.yml +# workflow runs the same tests across multiple platforms. + +on: + push: + # pull_request: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install UrbanSim Templates + run: | + pip install . + pip install -r requirements-extras.txt + pip install -r requirements-dev.txt + - name: Run tests + run: | + coverage run --source urbansim_templates --module pytest --verbose diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 99709b9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: python - -python: - - '2.7' - - '3.5' - - '3.6' - -matrix: - include: - - python: '3.7' # temp solution until python 3.7 is more cleanly supported - dist: xenial - sudo: true - allow_failures: - - python: '3.7' # dependencies are blocking installation - fast_finish: true - -install: - - pip install git+git://github.com/udst/choicemodels.git - - pip install . - - pip install -r requirements-extras.txt - - pip install -r requirements-dev.txt - - pip list - - pip show urbansim_templates - -script: - - cd tests - - coverage run --source urbansim_templates --module pytest --verbose - -after_success: - - coverage report --show-missing - - coveralls \ No newline at end of file From 4e481a4e1ce527cc32bff8d0e5683e95ff2fb181 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Thu, 11 Feb 2021 12:00:16 -0800 Subject: [PATCH 02/12] Cleanup --- .github/workflows/code-style.yml | 21 --------------------- .github/workflows/coverage.yml | 1 + .github/workflows/cross-compatibility.yml | 1 + .github/workflows/installation.yml | 2 ++ .github/workflows/unit-tests.yml | 1 + 5 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/code-style.yml diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml deleted file mode 100644 index c845eba..0000000 --- a/.github/workflows/code-style.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Code style - -# This workflow runs code style checks. - -on: - push: - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Check code style - run: | - pip install pycodestyle - pycodestyle urbansim_templates diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index df9cf38..339d3c6 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -24,6 +24,7 @@ jobs: pip install -r requirements-dev.txt - name: Run tests run: | + cd tests coverage run --source urbansim_templates --module pytest --verbose - name: Upload to Coveralls run: | diff --git a/.github/workflows/cross-compatibility.yml b/.github/workflows/cross-compatibility.yml index 6ecb09e..9732614 100644 --- a/.github/workflows/cross-compatibility.yml +++ b/.github/workflows/cross-compatibility.yml @@ -28,4 +28,5 @@ jobs: pip install -r requirements-dev.txt - name: Run tests run: | + cd tests coverage run --source urbansim_templates --module pytest --verbose diff --git a/.github/workflows/installation.yml b/.github/workflows/installation.yml index a0deefc..8a2d52c 100644 --- a/.github/workflows/installation.yml +++ b/.github/workflows/installation.yml @@ -32,6 +32,7 @@ jobs: pip install -r requirements-dev.txt - name: Run tests run: | + cd tests coverage run --source urbansim_templates --module pytest --verbose build-conda: @@ -56,4 +57,5 @@ jobs: pip install -r requirements-dev.txt - name: Run tests run: | + cd tests coverage run --source urbansim_templates --module pytest --verbose diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 102d2bf..2bcf37b 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -25,4 +25,5 @@ jobs: pip install -r requirements-dev.txt - name: Run tests run: | + cd tests coverage run --source urbansim_templates --module pytest --verbose From 0bed3b67cd196bbb2eaa47606ef34cd2be120ef4 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Thu, 11 Feb 2021 12:14:54 -0800 Subject: [PATCH 03/12] Debugging actions scripts --- .github/workflows/coverage.yml | 2 +- .github/workflows/cross-compatibility.yml | 2 +- .github/workflows/installation.yml | 12 ------------ 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 339d3c6..008727b 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -28,6 +28,6 @@ jobs: coverage run --source urbansim_templates --module pytest --verbose - name: Upload to Coveralls run: | - coveralls + coveralls --service=github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/cross-compatibility.yml b/.github/workflows/cross-compatibility.yml index 9732614..b344664 100644 --- a/.github/workflows/cross-compatibility.yml +++ b/.github/workflows/cross-compatibility.yml @@ -4,7 +4,7 @@ name: Cross-compatibility # Python versions and operating systems. on: - # push: + push: # TURN OFF pull_request: workflow_dispatch: diff --git a/.github/workflows/installation.yml b/.github/workflows/installation.yml index 8a2d52c..ba6ccdd 100644 --- a/.github/workflows/installation.yml +++ b/.github/workflows/installation.yml @@ -28,12 +28,6 @@ jobs: - name: Install UrbanSim Templates run: | pip install urbansim_templates - pip install -r requirements-extras.txt - pip install -r requirements-dev.txt - - name: Run tests - run: | - cd tests - coverage run --source urbansim_templates --module pytest --verbose build-conda: runs-on: ${{ matrix.os }} @@ -53,9 +47,3 @@ jobs: - name: Install UrbanSim Templates run: | conda install urbansim_templates --channel conda-forge - pip install -r requirements-extras.txt - pip install -r requirements-dev.txt - - name: Run tests - run: | - cd tests - coverage run --source urbansim_templates --module pytest --verbose From b16c7b11bfb0f1b2f7dbce2e536b7237bad5221b Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Thu, 11 Feb 2021 12:56:30 -0800 Subject: [PATCH 04/12] Dropping py39 --- .github/workflows/cross-compatibility.yml | 2 +- .github/workflows/installation.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cross-compatibility.yml b/.github/workflows/cross-compatibility.yml index b344664..3522a8f 100644 --- a/.github/workflows/cross-compatibility.yml +++ b/.github/workflows/cross-compatibility.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.6, 3.7, 3.8] # no pip pytables for py39-mac or py39-win steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/installation.yml b/.github/workflows/installation.yml index ba6ccdd..38bf63f 100644 --- a/.github/workflows/installation.yml +++ b/.github/workflows/installation.yml @@ -18,7 +18,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.6, 3.7, 3.8] # no pip pytables for py39-mac or py39-win steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} From bc6ab6f7982658551f914a051f84b6c7f8eb3673 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Thu, 11 Feb 2021 13:10:46 -0800 Subject: [PATCH 05/12] Ignore dtypes in windows --- .github/workflows/coverage.yml | 2 +- .github/workflows/installation.yml | 2 +- tests/test_large_multinomial_logit.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 008727b..f9509eb 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -4,7 +4,7 @@ name: Coverage # unit tests) and uploads the information to Coveralls.io for reporting and analysis. on: - push: # TURN OFF + # push: pull_request: workflow_dispatch: diff --git a/.github/workflows/installation.yml b/.github/workflows/installation.yml index 38bf63f..a9ecdff 100644 --- a/.github/workflows/installation.yml +++ b/.github/workflows/installation.yml @@ -6,7 +6,7 @@ name: Installation # background to catch dependency updates that break UrbanSim Templates. on: - push: # TURN OFF + # push: # pull_request: workflow_dispatch: schedule: diff --git a/tests/test_large_multinomial_logit.py b/tests/test_large_multinomial_logit.py index 2961ce9..3c60dc9 100644 --- a/tests/test_large_multinomial_logit.py +++ b/tests/test_large_multinomial_logit.py @@ -143,7 +143,9 @@ def test_simulation_unconstrained(m): obs = orca.get_table('obs').to_frame() assert sum(obs.choice == -1) == 0 - assert obs.loc[:24, 'choice'].equals(m.choices) + pd.testing.assert_series_equal(obs.loc[:24, 'choice'], + m.choices, check_dtype=False) + # assert obs.loc[:24, 'choice'].equals(m.choices) def test_simulation_single_occupancy(m): From 890f58f0cfdab7fb55588916f45107bec85bbfa7 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Thu, 11 Feb 2021 15:40:41 -0800 Subject: [PATCH 06/12] Typo --- tests/test_large_multinomial_logit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_large_multinomial_logit.py b/tests/test_large_multinomial_logit.py index 3c60dc9..70d4728 100644 --- a/tests/test_large_multinomial_logit.py +++ b/tests/test_large_multinomial_logit.py @@ -143,8 +143,8 @@ def test_simulation_unconstrained(m): obs = orca.get_table('obs').to_frame() assert sum(obs.choice == -1) == 0 - pd.testing.assert_series_equal(obs.loc[:24, 'choice'], - m.choices, check_dtype=False) + pd.testing.assert_series_equal(obs.loc[:24, 'choice'], m.choices, + check_dtype=False, check_names=False) # assert obs.loc[:24, 'choice'].equals(m.choices) From e71e9b19a2172c796f1c3657e0e36e01e4dbd47f Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Fri, 12 Feb 2021 13:53:47 -0800 Subject: [PATCH 07/12] Updating with changes from #119 --- .github/workflows/cross-compatibility.yml | 2 +- .github/workflows/unit-tests.yml | 2 +- CHANGELOG.md | 4 ++++ README.md | 8 ++++---- requirements.txt | 2 +- setup.py | 4 +++- urbansim_templates/__init__.py | 2 +- urbansim_templates/models/regression.py | 2 ++ 8 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cross-compatibility.yml b/.github/workflows/cross-compatibility.yml index 3522a8f..21bfadf 100644 --- a/.github/workflows/cross-compatibility.yml +++ b/.github/workflows/cross-compatibility.yml @@ -29,4 +29,4 @@ jobs: - name: Run tests run: | cd tests - coverage run --source urbansim_templates --module pytest --verbose + pytest *.py -s diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 2bcf37b..0e99806 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -26,4 +26,4 @@ jobs: - name: Run tests run: | cd tests - coverage run --source urbansim_templates --module pytest --verbose + pytest *.py -s diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f0b62a..2085262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # UrbanSim Templates change log +### 0.1.4 (2020-02-12) + +- adds a `residuals` attribute to fitted `OLSRegressionStep` models, for diagnostics + ### 0.1.3 (2019-07-15) - fixes a bug with `out_transform` parameter for OLS simulation diff --git a/README.md b/README.md index 9ecadd2..6f55039 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -[![Build Status](https://travis-ci.org/UDST/urbansim_templates.svg?branch=master)](https://travis-ci.org/UDST/urbansim_templates) [![Coverage Status](https://coveralls.io/repos/github/UDST/urbansim_templates/badge.svg?branch=master)](https://coveralls.io/github/UDST/urbansim_templates?branch=master) -[![Docs Status](https://readthedocs.org/projects/urbansim_templates/badge/?version=latest)](https://docs.udst.org/projects/urbansim-templates/en/latest) + # UrbanSim Templates @@ -9,6 +8,7 @@ UrbanSim Templates is a Python library that provides building blocks for Orca-ba The library contains templates for common types of model steps, plus a tool called ModelManager that runs as an extension to the [Orca](https://udst.github.io/orca) task orchestrator. ModelManager can register template-based model steps with the orchestrator, save them to disk, and automatically reload them for future sessions. The package was developed to make it easier to set up new simulation models — model step templates reduce the need for custom code and make settings more portable between models. ### Installation + UrbanSim Templates can be installed using the Pip or Conda package managers: ``` @@ -21,8 +21,8 @@ conda install urbansim_templates --channel conda-forge ### Documentation -See the online documentation for much more: [http://docs.udst.org/projects/urbansim-templates](https://docs.udst.org/projects/urbansim-templates/en/latest) +See the online documentation for much more: https://udst.github.io/urbansim_templates Some additional documentation is available within the repo in `CHANGELOG.md`, `CONTRIBUTING.md`, `/docs/README.md`, and `/tests/README.md`. -There's discussion of current and planned features in the [Pull requests](https://github.com/udst/urbansim_templates/pulls?utf8=✓&q=is%3Apr) and [Issues](https://github.com/udst/urbansim_templates/issues?utf8=✓&q=is%3Aissue), both open and closed. +There's discussion of current and planned features in the [pull requests](https://github.com/udst/urbansim_templates/pulls?utf8=✓&q=is%3Apr) and [issues](https://github.com/udst/urbansim_templates/issues?utf8=✓&q=is%3Aissue), both open and closed. diff --git a/requirements.txt b/requirements.txt index 286508c..eeebc66 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ # minimal requirements for model management and core templates -choicemodels >= 0.2.dev4 +choicemodels >= 0.2 numpy >= 1.14 orca >= 1.4 pandas >= 0.22 diff --git a/setup.py b/setup.py index 943f905..b7a9d10 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='urbansim_templates', - version='0.1.3', + version='0.1.4', description='UrbanSim extension for managing model steps', author='UrbanSim Inc.', author_email='info@urbansim.com', @@ -17,6 +17,8 @@ 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: BSD License' ], packages=find_packages(exclude=['*.tests']), diff --git a/urbansim_templates/__init__.py b/urbansim_templates/__init__.py index adb9e1a..ec9c20c 100644 --- a/urbansim_templates/__init__.py +++ b/urbansim_templates/__init__.py @@ -1 +1 @@ -version = __version__ = '0.1.3' +version = __version__ = '0.1.4' diff --git a/urbansim_templates/models/regression.py b/urbansim_templates/models/regression.py index 8367f23..df4a89f 100644 --- a/urbansim_templates/models/regression.py +++ b/urbansim_templates/models/regression.py @@ -101,6 +101,7 @@ def __init__(self, tables=None, model_expression=None, filters=None, out_tables= # Placeholders for model fit data, filled in by fit() or from_dict() self.summary_table = None self.fitted_parameters = None + self.residuals = None self.model = None @@ -185,6 +186,7 @@ def fit(self): # code later on to not rely on RegressionModel any more. self.fitted_parameters = results.params.tolist() + self.residuals = results.resid def run(self): From 6d45d43ec9157c4c1cdd8eaa36d89a8dd6f0139b Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Fri, 12 Feb 2021 14:07:09 -0800 Subject: [PATCH 08/12] pytest -> py.test for windows --- .github/workflows/cross-compatibility.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cross-compatibility.yml b/.github/workflows/cross-compatibility.yml index 21bfadf..f8087ef 100644 --- a/.github/workflows/cross-compatibility.yml +++ b/.github/workflows/cross-compatibility.yml @@ -29,4 +29,4 @@ jobs: - name: Run tests run: | cd tests - pytest *.py -s + py.test *.py -s From 9d8b01b29d2ff5554c55be785953d9f19fa2dc4f Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Fri, 12 Feb 2021 14:10:16 -0800 Subject: [PATCH 09/12] Syntax change for windows --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 0e99806..63207f4 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -26,4 +26,4 @@ jobs: - name: Run tests run: | cd tests - pytest *.py -s + pytest -s From ee98b8b6d0b501f4acb4ad289149448816b69486 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Fri, 12 Feb 2021 15:20:54 -0800 Subject: [PATCH 10/12] Back to pytest --- .github/workflows/cross-compatibility.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cross-compatibility.yml b/.github/workflows/cross-compatibility.yml index f8087ef..fc2a78b 100644 --- a/.github/workflows/cross-compatibility.yml +++ b/.github/workflows/cross-compatibility.yml @@ -29,4 +29,4 @@ jobs: - name: Run tests run: | cd tests - py.test *.py -s + pytest -s From ee310844d97cfb99ccb7ab8f80ca9693a91fd5a6 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Fri, 12 Feb 2021 15:24:41 -0800 Subject: [PATCH 11/12] Cleanup --- .github/workflows/cross-compatibility.yml | 2 +- tests/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cross-compatibility.yml b/.github/workflows/cross-compatibility.yml index fc2a78b..3a15348 100644 --- a/.github/workflows/cross-compatibility.yml +++ b/.github/workflows/cross-compatibility.yml @@ -4,7 +4,7 @@ name: Cross-compatibility # Python versions and operating systems. on: - push: # TURN OFF + # push: pull_request: workflow_dispatch: diff --git a/tests/README.md b/tests/README.md index 201f69a..30f042a 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1 +1 @@ -Run tests from this folder using `pytest *.py -s`. \ No newline at end of file +Run tests from this folder using `pytest -s`. \ No newline at end of file From 910ec445555534dba675de05d365262e7fbd3b23 Mon Sep 17 00:00:00 2001 From: Sam Maurer Date: Fri, 12 Feb 2021 15:37:32 -0800 Subject: [PATCH 12/12] Adding coverage report --- .github/workflows/coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f9509eb..c4f3416 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -26,6 +26,7 @@ jobs: run: | cd tests coverage run --source urbansim_templates --module pytest --verbose + coverage report --show-missing - name: Upload to Coveralls run: | coveralls --service=github