Closed aclerc closed 1 week ago
It looks like these lines in the semantic versioning of the FLORIS and FLASC requirements, respectively, are what are causing the issue: https://github.com/NREL/floris/blob/main/setup.py#L30 https://github.com/NREL/flasc/blob/main/setup.py#L34
We can likely move the FLASC dependency up to coloredlogs~=15.0
to solve the issue
Thanks for looking at this!
I am also trying to add pandas-stubs to my project but that also has a problem, this time because numpy is v1. If it's possible to open FLORIS and FLASC to numpy v2 that would help. I can raise a separate issue for that if you prefer.
Because no versions of pandas-stubs match >2.2.2.240805,<3.0.0.0
and pandas-stubs (2.2.2.240805) depends on numpy (>=2.0.0), pandas-stubs (>=2.2.2.240805,<3.0.0.0) requires numpy (>=2.0.0).
And because flasc (2.0) depends on numpy (>=1.20,<2.0)
and no versions of flasc match >2.0,<3.0, pandas-stubs (>=2.2.2.240805,<3.0.0.0) is incompatible with flasc (>=2.0,<3.0).
So, because wakesteer-design depends on both flasc (^2.0) and pandas-stubs (^2.2.2.240805), version solving failed.
@aclerc I opened a pull request to address the coloredlogs issue (#202), @misi9170 maybe we can do a patch release once this is in to include the fix in main?
On numpy v2 this is a little trickier, over on FLORIS (https://github.com/NREL/floris/pull/939) when I made a similar bump to coloredlogs, I went through and made the changes for numpy v2 as well, but there was some pushback because it's still relatively new. I think we'll want to move to v2, both FLORIS and FLASC, but maybe need to wait just a little bit for it to be adapted more widely in our dependencies. Still, I'm open to argument we should do this now. Maybe @misi9170 or @rafmudaf you have a feeling on this one?
Hi @aclerc , #202 should have resolved the poetry issue and then @misi9170 has pushed a patch release containing the fix (https://github.com/NREL/flasc/releases/tag/v2.0.1)
Regarding numpy v2, we've been discussing here and the consensus for now is to wait a little while for numpy v2 to be more widely adopted. Out of curiousity I was looking at the pandas github to see what approach they were taking. It seems like they were making sure the code was able to run with v2 (I had previously done this for FLORIS and remember it was not too difficult). But I think there requirement is still numpy < 2. Maybe that is a nice balance until more packages move over? @rafmudaf @aclerc @misi9170 does that sound right to you?
@paulf81 , are you suggesting that we switch from numpy~=1.20
to numpy<=2
? I'm ok with that, if we confirm that everything runs with numpy v2
I think the two lines are basically the same, I was just saying that while I understood pandas was 2.0 ready, they requiring < 2, which is maybe the approach we take (~=1.20 translates to something like >=1.2 & <2)
Ah sorry, my mistake; I agree that it's nice to stick to supporting a single major version and that moving to supporting v2 seems a bit premature at this stage, so I'd prefer to stick with numpy 1.x
@aclerc wanted to check if good to close this one now?
wo lines are basically the same, I was just saying that while I understood pandas was 2.0 ready, they requiring < 2, which is
yes I tried poetry add floris
then poetry add flasc
and it works :)
Is there an existing issue for this?
Current Behavior
I use
poetry
to define Python environments. I am making a new internal project calledwakesteer-design
and would like to use both FLORIS and FLASC. When I try adding one it works, but when I try addingflasc
after I already addedfloris
I get an error:I don't think this is a major problem because I can just add flasc and use floris since floris is a dependency of flasc.
Expected Behavior
I can set up a new poetry environment and run
poetry add floris
and thenpoetry add flasc
and it works.Steps To Reproduce
poetry new test-package
poetry add floris
poetry add flasc
Environment
Anything else?
No response