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
Removed nodes from sisl
#759
Conversation
I don't understand why CI fails, it fails even before installing python 😅 |
It could be #755, lets wait a day or so... Otherwise I will probably revert it... |
Actually, it couldn't since that is a different work-flow... Sorry for the blurp! |
It fails when it is installing the compilers. Maybe https://github.com/fortran-lang/setup-fortran should be used instead of directly calling |
Now the problem is there because |
Annoyingly I can't get it to run on 3.9 since 3.8 failed. :( Perhaps we really should just bump to 3.9! Lets do that, a PR that fixes 3.9 problems and deprecates 3.8. |
Yes, It is a package, but can only be installed on >=3.9. We can just wait until 3.8 is dropped according to your schedule, no rush :) |
rebase, and lets try again! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #759 +/- ##
==========================================
+ Coverage 86.91% 87.25% +0.34%
==========================================
Files 410 393 -17
Lines 51826 50145 -1681
==========================================
- Hits 45042 43754 -1288
+ Misses 6784 6391 -393 ☔ View full report in Codecov by Sentry. |
Sorry for another go here. Could you rebase, I am trying to add another test that checks without |
The tests shows it should be more hidden, i.e. Since it is optional there needs to be a fallback on it. |
Hmm but shouldn't the tests that don't want to test If you want to import |
I mean the error comes from the fact that to define the viz tests you need to import |
Well, the tests are meant for end-users to also test their installation, and they won't know the difference. Hence, the tests should be self-contained through importer-skips, and if importing fails, I think we should be able to notify the users more succintly. |
I think a better solution would be to have a Otherwise you are asking that I think that requiring Another thing that I don't understand is why do you want the tests not to fail if there wasn't any indication that the user didn't want those tests. A user might run the tests and see that there are no errors but then run some plot and see that there are indeed errors. This I would argue would be much more confusing than if they failed because of a missing import. |
It needs to be done so it also works in user environments.
No, I am not, I am suggesting that
I think you misunderstood me here.
I don't want the tests to not fail, I want the tests to skip! Just like we have importorskips. And currently these work well for everything, but this PR messes that up. ;) |
Ah ok, but it already raises a
But how do you know if the user wants them to skip or they just forgot to install the dependencies, if there is no flag for it? 😅 |
Ok, so I understand that every time Still, I don't see how the |
Yes, I believe it has to do with the way pytest stores things in its runs...
If they want to skip them, they should do
Hmm, but see my link to the previous CI, it ran a test without viz, but still managed to skip the tests, without breaking. |
Yes, that looks fine. But I don't see how it can be easily acheived in a way that makes sense.
But there is a difference. The backends are optional, because the viz module should be able to run only with the backend of your choice. However I understand what you want to acheive, but I don't think modifying the logic inside the package just to fit the way Isn't there a workaround that you can think of to apply on |
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Ok, so the above seems to work. I still think we could provide a better error message in case they don't have nodiy and friends installed, but lets see. |
For me the problem is how to determine if they want to test without What you said |
I am now not discussing tests, I am thinking of a user who does: pip install sisl then does: import sisl.viz they will face:
which does not indicate that |
Hmm ok, then I would tell them to |
Yes, but that doesn't incorporate conda, I think we could make it simpler for them in some way. |
I added a minimal thing ;) |
The functionality in
sisl.nodes
has been detached into a new package:nodify
(https://pypi.org/project/nodify/).nodify
is now an optional dependency required for the viz module to work.The
nodify
package is a pure python package with no dependencies, so it shouldn't give any problems.However, it needs a minimum python version of 3.9, which will be the minimum version for
sisl
in may, so it also shouldn't be a problem :)