diff --git a/.github/workflows/ci-oldest-reqs.txt b/.github/workflows/ci-oldest-reqs.txt deleted file mode 100644 index f203a27..0000000 --- a/.github/workflows/ci-oldest-reqs.txt +++ /dev/null @@ -1,11 +0,0 @@ -bottleneck == 1.3.4 -freud-analysis == 2.7.0 -coverage[toml] == 6.2 -kneed == 0.8.2 -numpy == 1.21.0 -ruptures == 1.1.5 -scikit-learn == 0.24.0 -pandas == 1.1.3 -hypothesis -pytest == 6.2.1 -pytest-cov[toml] == 2.12.1 diff --git a/.github/workflows/requirements-test.txt b/.github/workflows/requirements-test.txt new file mode 100644 index 0000000..c50ca99 --- /dev/null +++ b/.github/workflows/requirements-test.txt @@ -0,0 +1,11 @@ +hypothesis == 6.103.2 +pytest == 8.2.2 +bottleneck == 1.4 +freud-analysis == 3.1 +kneed == 0.8.5 +numpy == 2.0 +ruptures == 1.1.9 +scikit-learn == 1.5 +pandas == 2.2.2 +numba == 0.60 +xarray == 2024.6 diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index 2661c50..b273c92 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -16,7 +16,7 @@ concurrency: cancel-in-progress: true jobs: test: - name: test (${{ matrix.os }}, ${{ matrix.python }}, ${{ matrix.dependencies }}) + name: test (${{ matrix.os }}, ${{ matrix.python }}) runs-on: ${{ matrix.os }} strategy: fail-fast: true @@ -24,17 +24,11 @@ jobs: os: [ubuntu-latest] python: ['3.9', '3.10', '3.11', '3.12'] include: - # Defaults to newest dependencies - - dependencies: 'newest' # Other tests - - python: '3.9' - dependencies: 'oldest' - os: 'macos-latest' python: '3.9' - dependencies: 'oldest' - os: 'macos-latest' python: '3.12' - dependencies: 'newest' steps: - uses: actions/checkout@v4 with: @@ -46,26 +40,12 @@ jobs: - name: Update pip/build packages run: | pip install setuptools --upgrade - - name: Install newest dependencies + - name: Install dependencies run: | - pip install -r requirements/requirements-test.txt - pip install -r requirements/requirements-data.txt - if: ${{ matrix.dependencies == 'newest' }} - - name: Install oldest dependencies - run: | - pip install -r .github/workflows/ci-oldest-reqs.txt - pip install -r requirements/requirements-data.txt - if: ${{ matrix.dependencies == 'oldest' }} - - name: Install numba (if available) - run: | - pip install -r requirements/requirements-jit.txt - if: ${{ matrix.python != '3.12' }} + pip install -r .github/workflows/requirements-test.txt - name: Install the package run: | pip install -e . - name: Test with pytest run: | - pytest --cov=dupin --cov-config=pyproject.toml --cov-report=xml tests -v - - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} + python -m pytest -v diff --git a/pyproject.toml b/pyproject.toml index 79d6f78..d9a7edf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,15 +20,12 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] -dependencies = [ - "bottleneck", # perform moving window array computations - "freud-analysis", # generate features - "kneed", # knee/elbow detection - "numpy", # basic numerical Python - "pandas", # Handling DataFrames in functions and signal aggregation. - "ruptures", # event detection - "scikit-learn", # For ML window dimensionality reduction -] + +[tool.setuptools.dynamic] +dependencies = { file = ["requirements/requirements.txt"] } +optional-dependencies = { testing = { file = [ + "requirements/requirements-testing.txt", +] } } [project.urls] Source = "https://github.com/glotzerlab/dupin" @@ -71,10 +68,6 @@ select = [ [tool.ruff.lint.pydocstyle] convention = "numpy" -[tool.coverage.run] -branch = true -source = [ "dupin" ] - [tool.pytest.ini_options] minversion = "6.0" filterwarnings = [ diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 109749a..0000000 --- a/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -bottleneck -freud-analysis -kneed -numpy -ruptures -scikit-learn -pandas diff --git a/requirements/requirements-data.txt b/requirements/requirements-data.txt deleted file mode 100644 index 81749ae..0000000 --- a/requirements/requirements-data.txt +++ /dev/null @@ -1,2 +0,0 @@ -pandas -xarray diff --git a/requirements/requirements-jit.txt b/requirements/requirements-jit.txt deleted file mode 100644 index c3db445..0000000 --- a/requirements/requirements-jit.txt +++ /dev/null @@ -1 +0,0 @@ -numba diff --git a/requirements/requirements-test.txt b/requirements/requirements-test.txt deleted file mode 100644 index d828b0e..0000000 --- a/requirements/requirements-test.txt +++ /dev/null @@ -1,3 +0,0 @@ -hypothesis -pytest -pytest-cov[toml] diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt new file mode 100644 index 0000000..3df4139 --- /dev/null +++ b/requirements/requirements-testing.txt @@ -0,0 +1,2 @@ +pytest>6.2.1 +hypothesis>6.30.0 diff --git a/requirements/requirements.txt b/requirements/requirements.txt new file mode 100644 index 0000000..754f4ed --- /dev/null +++ b/requirements/requirements.txt @@ -0,0 +1,7 @@ +bottleneck>=1.3.4 +freud-analysis>=2.7.0 +kneed>=0.8.2 +numpy>=1.21 +ruptures>=1.1.5 +scikit-learn>=0.24.0 +pandas>=1.1.3