Skip to content

Commit

Permalink
Merge pull request #105 from pysat/tst/external_rc
Browse files Browse the repository at this point in the history
TST: add unit tests for optional RCs
  • Loading branch information
jklenzing committed Feb 1, 2023
2 parents c8a178c + 725f777 commit 6acd738
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:

name: Documentation tests
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/external_rc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test with latest optional package RC

on: [workflow_dispatch]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10"]
rc-package: ["aacgmv2", "apexpy", "OMMBV"]

name: ${{ matrix.rc-package }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install standard dependencies
run: |
pip install -r requirements.txt
pip install -r test_requirements.txt
- name: Install RC dependency
run: pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ ${{ matrix.rc-package }}

- name: Set up pysat
run: |
mkdir pysatData
python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'"
- name: Test with pytest
run: pytest -vs --cov=pysatMissions/

- name: Publish results to coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --rcfile=setup.cfg --service=github
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with numpy ${{ matrix.numpy_ver }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -48,8 +48,7 @@ jobs:
run: flake8 . --count --exit-zero --max-complexity=10 --statistics

- name: Test with pytest
run: |
pytest --cov=pysatMissions/
run: pytest --cov=pysatMissions/

- name: Publish results to coveralls
env:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ This project adheres to [Semantic Versioning](https://semver.org/).
## [0.X.X] - 2022-XX-XX
* Maintenance
* Update pytest syntax
* Update Github Actions versions
* Add manual GitHub Actions tests for pysat RC
* Add manual GitHub Actions tests for optional dependencies
* Remove optional dependencies in readthedocs requirements

## [0.3.3] - 2022-09-06
* Documentation Updates
Expand Down
3 changes: 0 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
ipython
m2r2
numpydoc
aacgmv2
apexpy
geospacepy
numpy
OMMBV>=1.0
pandas
pysat>=3.0
pyEphem
Expand Down

0 comments on commit 6acd738

Please sign in to comment.