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

Add 3.12 to version matrix for CI #131

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
release:
name: Publish to PyPI if upload to Test PyPI was successful
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [release-test]
steps:
- uses: actions/download-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]

steps:

Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,23 @@ classifiers = [
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.11',
"Programming Language :: Rust",
'Topic :: Scientific/Engineering'
]
dependencies = [
"attrs",
"numpy",
"scipy",
"networkx",
"pandas",
"matplotlib",
"mdanalysis",
"freud-analysis",
"tidynamics",
"seaborn",
"tqdm",
"setuptools", # for pkg_resources module in Python 3.12
]
urls.bugtracker = "https://github.com/p-j-smith/lipyphilic/issues"
urls.documentation = "https://lipyphilic.readthedocs.io/en/stable"
Expand All @@ -52,6 +55,7 @@ tests = [
"pytest-cov",
"coverage",
"tox",
"MDAnalysisTests",
]
docs = [
"sphinx",
Expand Down Expand Up @@ -213,7 +217,7 @@ exclude = '''
)
'''
line-length = 110
target-version = ["py310", "py311"]
target-version = ["py310", "py311", "py312"]

[tool.ruff.isort]
force-single-line = false
Expand Down
29 changes: 16 additions & 13 deletions tests/lipyphilic/plotting/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,25 +59,28 @@ def test_project_values(self, projection):
def test_interpolate(self, projection):
projection.statistic = np.array(
[
[np.NaN, 0, np.NaN],
[1, np.NaN, 1],
[np.NaN, 0, np.NaN],
[1, 1, 1, 1, 1],
[1, np.NaN, 0, np.NaN, 1],
[1, np.NaN, np.NaN, np.NaN, 1],
[1, np.NaN, 0, np.NaN, 1],
[1, 1, 1, 1, 1],
],
)

projection.interpolate(method="linear")

reference = {
"statistic": np.array(
[
[1, 0.0, 0.5],
[1, 1, 1],
[1, 0.0, 0.5],
],
),
}
expected = np.array(
[
[1.0, 1.0, 1.0, 1.0, 1.0],
[1.0, 0.5, 0.0, 0.5, 1.0],
[1.0, 0.5, 0.0, 0.5, 1.0],
[1.0, 0.5, 0.0, 0.5, 1.0],
[1.0, 1.0, 1.0, 1.0, 1.0],
],
)

assert_array_almost_equal(projection.statistic, expected)

assert_array_almost_equal(projection.statistic, reference["statistic"])

def test_interpolate_no_tile(self, projection):
projection.statistic = np.array(
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[tox]
envlist = py{310,311}-{linux,macos,windows}
envlist = py{310,311,312}-{linux,macos,windows}
isolated_build = true

[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312
fail_on_no_env = true

[testenv]
Expand Down
Loading