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

Fix logging across scilpy #647

Merged
merged 4 commits into from
Nov 14, 2022
Merged

Fix logging across scilpy #647

merged 4 commits into from
Nov 14, 2022

Conversation

frheault
Copy link
Member

@frheault frheault commented Nov 10, 2022

Thanks to Laurent I realized that scil_search_keywords.py stopped working.
It was due to the fact that setting logging to INFO or DEBUG the way we did (everywhere in Scilpy) does not work anymore.

So it also meant that around 70% of our logging was not working properly (WARNING is fine, because it was the default for the root::logging).
So I fixed it everywhere.

I also added a pytest.ini to print warnings from other libraries only once and keep all warnings from Scilpy (even if many) reducing printed line from 1M to

PS: A few pep8 changes got in there while saving files, a few scripts didn't have permissions like everything else (777) so I changed it for uniformity.

@arnaudbore arnaudbore self-requested a review November 10, 2022 16:39
@arnaudbore
Copy link
Contributor

Build passed ! Good Job 🍻 !

1 similar comment
@arnaudbore
Copy link
Contributor

Build passed ! Good Job 🍻 !

@frheault
Copy link
Member Author

Ok so now the pytest.ini is more explicit and ignore all major import except a few that will display once.

The idea is that we will never care about issues in scipy or numpy, but we might care about trimeshphy, commit or dipy, and we will always care about scilpy.

@arnaudbore
Copy link
Contributor

Build passed ! Good Job 🍻 !

@frheault
Copy link
Member Author

So the total output of tests on Travis is now less than 1000 (including the checkout, build, tests and warning)
= 368 passed, 76 warnings in 2029.82s (0:33:49) =

@arnaudbore
Copy link
Contributor

Build passed ! Good Job 🍻 !

Copy link
Contributor

@AntoineTheb AntoineTheb left a comment

Choose a reason for hiding this comment

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

One comment but otherwise LGTM !

@@ -80,8 +79,7 @@
import numpy as np
import nibabel as nib

from scilpy.io.streamlines import (lazy_streamlines_count,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is lazy_streamlines_count no longer imported ? Was it unused before ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I am setting up my new computer and my autopep8 settings had too much power I think.

Copy link
Contributor

@EmmaRenauld EmmaRenauld left a comment

Choose a reason for hiding this comment

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

I tested the pytest locally and, man!! Nice! So much easier! Takes a lot less time, too.

@arnaudbore arnaudbore merged commit 4670671 into scilus:master Nov 14, 2022
@frheault frheault deleted the logging_fixes branch February 28, 2024 21:08
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.

4 participants