Skip to content

Commit

Permalink
refactor: define optional test dependencies in pyproject.toml and str…
Browse files Browse the repository at this point in the history
…eamline dependency installation in workflows
  • Loading branch information
Beforerr committed Nov 1, 2024
1 parent cf0f017 commit a1cdbea
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 21 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ jobs:
VIRES_TOKEN: ${{ secrets.VIRES_AUTH }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install spacepy # required for MMS qcotrans tests
pip install coveralls
pip install '.[test]'
pip install basemap
pip install 'mth5>=0.4.9'
python -m pyspedas.projects.mms.tests.setup_tests
Expand All @@ -42,9 +40,7 @@ jobs:
VIRES_TOKEN: ${{ secrets.VIRES_AUTH }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install spacepy # required for MMS qcotrans tests
pip install coveralls
pip install '.[test]'
pip install basemap
pip install 'mth5>=0.4.9'
python -m pyspedas.projects.mms.tests.setup_tests
Expand All @@ -56,9 +52,7 @@ jobs:
VIRES_TOKEN: ${{ secrets.VIRES_AUTH }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install spacepy # required for MMS qcotrans tests
pip install coveralls
pip install '.[test]'
pip install basemap
pip install 'mth5>=0.4.9'
python -m pyspedas.projects.mms.tests.setup_tests
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/quick_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,17 @@ jobs:
- name: Install dependencies (Linux)
run: |
python -m pip install --upgrade pip
pip install .
pip install spacepy # required for MMS qcotrans tests
pip install coveralls
pip install 'mth5<=0.4.7'
pip install '.[test]'
if: matrix.os == 'ubuntu-latest'
- name: Install dependencies (Windows)
run: |
python -m pip install --upgrade pip
pip install .
pip install spacepy # required for MMS qcotrans tests
pip install coveralls
pip install 'mth5<=0.4.7'
pip install '.[test]'
if: matrix.os == 'windows-latest'
- name: Install dependencies (macOS)
run: |
python -m pip install --upgrade pip
pip install .
pip install spacepy # required for MMS qcotrans tests
pip install coveralls
pip install 'mth5<=0.4.7'
pip install '.[test]'
if: matrix.os == 'macos-latest'
- name: Lint with flake8
run: |
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ Documentation = "https://pyspedas.readthedocs.io"
Issue_Tracker = "https://github.com/spedas/pyspedas/issues"
Source_Code = "https://github.com/spedas/pyspedas"

[project.optional-dependencies]
test = [
"spacepy", # required for MMS qcotrans tests
"coveralls",
"mth5<=0.4.7",
]

[tool.setuptools]
packages = {find = {exclude = ["contrib", "docs", "tests*"]}}
include-package-data = true
Expand Down

0 comments on commit a1cdbea

Please sign in to comment.