Skip to content

Commit

Permalink
Merge pull request #15 from glotzerlab/numpy2
Browse files Browse the repository at this point in the history
Add numpy 2 support
  • Loading branch information
joaander authored Jul 3, 2024
2 parents 98e866a + 369c418 commit 67f17cd
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 61 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/ci-oldest-reqs.txt

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -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
28 changes: 4 additions & 24 deletions .github/workflows/run-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,19 @@ 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
matrix:
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:
Expand All @@ -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
19 changes: 6 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 = [
Expand Down
7 changes: 0 additions & 7 deletions requirements.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements/requirements-data.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements/requirements-jit.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements/requirements-test.txt

This file was deleted.

2 changes: 2 additions & 0 deletions requirements/requirements-testing.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest>6.2.1
hypothesis>6.30.0
7 changes: 7 additions & 0 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 67f17cd

Please sign in to comment.