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

Chg(gha): python version to matrix of 3.6-11 #129

Merged
merged 4 commits into from
Aug 19, 2024
Merged

Conversation

jusjusjus
Copy link
Collaborator

@jusjusjus jusjusjus commented Aug 16, 2024

This PR fixes issue #126 .

We haven't updated the versions of numpy (and python for that matter) appropriately. I reviewed the currently stable versions of python which is 3.8 through 11 and added these to the tests. I then performed changes accordingly. No code change should affect the functionality of mffpy since it's mostly adding type annotations.

@@ -14,17 +14,20 @@ jobs:
test_mffpy:
# Name the job
name: Lint and Test
strategy:
matrix:
python-version: ["3.6.7", "3.8", "3.9", "3.10", "3.11"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here we add more versions

@@ -85,7 +85,8 @@ def scale(self) -> float:
return self._scale

def get_physical_samples(self, t0: float = 0.0,
dt: float = None, block_slice: slice = None,
dt: Optional[float] = None,
block_slice: Optional[slice] = None,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newer mypy switched default for implicit optional

@@ -46,7 +46,7 @@ def test_devices(device):
locs = np.array([
np.array([props['x'], props['y'], props['z']])
for i, (_, props) in enumerate(coords.sensors.items())
], dtype=np.float)
], dtype=np.float32)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

np.float removed in numpy v1.20

Copy link
Collaborator

@damian5710 damian5710 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@damian5710 damian5710 merged commit 3c78748 into develop Aug 19, 2024
5 checks passed
@damian5710 damian5710 deleted the chg-version-311 branch August 19, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants