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

Enable linting with ruff #60

Merged
merged 10 commits into from
Jan 30, 2025
Merged

Enable linting with ruff #60

merged 10 commits into from
Jan 30, 2025

Conversation

alexfikl
Copy link
Contributor

Adds linting with ruff and fixes all the issues.

xref: neurophysik/CHSPy#8

@alexfikl
Copy link
Contributor Author

Hm, haven't managed to reproduce the failures locally neither with Python 3.12 or 3.13 with gcc or clang yet, so not quite sure what it doesn't like.

The only "functional" changes in here should be moving from np.random.random to np.random.Generator, so maybe it's just a random number issue.. Will have to look into it a bit more later.

@Wrzlprmft
Copy link
Contributor

I re-ran the tests and it worked. This is a problem with tests using random numbers but no seeds, which is a bad idea for CI. For PyTest there is a module which does this very nicely, but I think for the current test structure, we need to set seeds manually. This definitely needs fixing, but it’s not related to this pull request.

@Wrzlprmft Wrzlprmft marked this pull request as ready for review January 30, 2025 07:16
@Wrzlprmft Wrzlprmft merged commit e38ab3a into neurophysik:master Jan 30, 2025
8 checks passed
@alexfikl alexfikl deleted the ruff branch January 30, 2025 08:00
@alexfikl
Copy link
Contributor Author

I re-ran the tests and it worked. This is a problem with tests using random numbers but no seeds, which is a bad idea for CI. For PyTest there is a module which does this very nicely, but I think for the current test structure, we need to set seeds manually. This definitely needs fixing, but it’s not related to this pull request.

Yeah, agreed. I'll go ahead and make a little PR setting the seeds later today. Thanks for checking!

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