Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] fix deps #33

Merged
merged 1 commit into from
May 20, 2024
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
31 changes: 7 additions & 24 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,63 +12,46 @@ on:
- "pyproject.toml"
- "poetry.lock"
- "requirements/requirements*.txt"
- "requirements/requirements-dask.txt"
pull_request:
paths:
- "**.py"
- ".github/workflows/*test*.yml"
- "pyproject.toml"
- "poetry.lock"
- "requirements/requirements*.txt"
- "requirements/requirements-dask.txt"

jobs:
test:
name: "test Python ${{ matrix.python }} on ${{ matrix.os }} with Dask ${{ matrix.dask }}"
name: "test Python ${{ matrix.python }} on ${{ matrix.os }}"
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python: ["3.9", "3.10", "3.11"]
dask: [true, false]
include:
- os: "macos-latest"
python-version: "3.10"
dask: false
python: "3.10"
defaults:
run:
shell: "bash -eo pipefail {0}"

steps:
- uses: "actions/checkout@main"
- uses: "actions/setup-python@main"
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python }}"
- uses: "actions/cache@main"
- uses: "actions/cache@v2"
id: "cache"
with:
path: "${{ env.pythonLocation }}"
key: "test-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'requirements/*') }}"
- run: "python --version"
- run: "python -mpip install -U pip"
- run: "python -mpip --version"
- run: "python -mpip install -r requirements/requirements.txt"
- name: "Install Dask requirements"
if: matrix.dask
run: "python -mpip install -r requirements/requirements-dask.txt"
- run: "python -mpip install -r requirements/requirements-dev.txt"
- run: "python -mpip install ./"
- run: "python -mpip cache info"
- run: "python -mpip freeze"
- run: "pytest --version"
if: "(matrix.os == 'ubuntu-latest') && (matrix.python == '3.11' )"
- name: "Run tests with Dask"
if: matrix.dask
run: "pytest tests/"
env:
PYTHONPATH: ${{ github.workspace }}/tests
- name: "Run tests without Dask"
if: "!matrix.dask"
- name: "Run tests"
run: "pytest tests/"
env:
PYTHONPATH: ${{ github.workspace }}/tests
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ repos:
"requirements/requirements.txt",
]
- id: "poetry-export"
name: "poetry export dask"
name: "poetry export dev"
args:
[
"--with",
"dask",
"dev",
"-f",
"requirements.txt",
"-o",
"requirements/requirements-dask.txt",
"requirements/requirements-dev.txt",
]
905 changes: 129 additions & 776 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,16 @@ include = [
[tool.poetry.dependencies]
python = ">=3.9"
numpy = "*"
pytest = "*"
scipy = "*"
shapely = "*"
xarray = "*"
netcdf4 = "*"

[tool.poetry.group.dask.dependencies]
dask = "*"

[tool.poetry.plugins."xarray.backends"]
selafin = "xarray_selafin.xarray_backend:SelafinBackendEntrypoint"

[tool.poetry.group.dev.dependencies]
matplotlib = "*"
pytest = "*"

[build-system]
requires = ["poetry-core"]
Expand Down
302 changes: 0 additions & 302 deletions requirements/requirements-dask.txt

This file was deleted.

221 changes: 221 additions & 0 deletions requirements/requirements-dev.txt

Large diffs are not rendered by default.

229 changes: 104 additions & 125 deletions requirements/requirements.txt

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ license_files = LICENSE
python_requires = >=3.9
install_requires =
numpy
pytest
scipy
shapely
xarray
Expand All @@ -24,10 +23,8 @@ packages = find:
xarray_selafin = data/*, variable/*

[options.extras_require]
dask =
dask
dev =
matplotlib
pytest

[options.entry_points]
xarray.backends =
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@
},
install_requires=[
"numpy",
"pytest",
"scipy",
"shapely",
"xarray",
"netcdf4",
],
extras_require={
"dask": ["dask"],
"dev": [
"matplotlib"
"pytest"
], # Assuming netcdf4 is listed intentionally in both main and dev dependencies
},
entry_points={
Expand Down
Loading