-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
7ae1185
to
45dcca6
Compare
@@ -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"] |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
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.