-
Notifications
You must be signed in to change notification settings - Fork 68
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 dynamic versioning #1209
Fix dynamic versioning #1209
Conversation
Pull Request Test Coverage Report for Build 11815531052Details
💛 - Coveralls |
pyccl/numpy.i
Outdated
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.
SWIG changed and this requires a new version of numpy.i (see here)
@@ -1,4 +1,4 @@ | |||
cmake_minimum_required(VERSION 3.2) | |||
cmake_minimum_required(VERSION 3.5) |
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.
I am not sure why, but I wasn't able to fix dynamic versioning without this requirement.
@@ -63,5 +63,6 @@ def run(self): | |||
|
|||
setup( | |||
distclass=Distribution, | |||
setup_requires=['setuptools_scm'], |
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.
This is the main thing that fixes dynamic versioning.
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.
why do you still require setup.py
and not use just pyproject.toml
?
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.
We do use pyproject.toml, but this is the only way I have found to make sure that the dynamic version numbers are assigned.
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.
ok. weird. I think in TJPCov we have dynamic versioning and works fine with just pyproject.toml
. I couldn't see any obvious difference that might cause this, though.
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.
Interesting. Well, if you can ever look into it, that'll be great. For now this is as far as I can get, and I think it is relatively urgent that we fix this! Our conda and pip releases are severely out of date.
@@ -186,7 +186,7 @@ def number_counts(self, cosmo, *, selection, | |||
mint[i] = self._integrator( | |||
dVda[i] * self._mf[..., :] * _selm[..., :], | |||
self._lmass | |||
) | |||
).squeeze() |
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.
A few warnings were being triggered because of this (the result of the integral is an array of size 1 instead of a scalar, which numpy doesn't like).
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.
Minor comments
@@ -9,8 +9,9 @@ dependencies: | |||
- fftw | |||
- swig | |||
- pyyaml | |||
- numpy | |||
# The below is only because the currnt version of fast-pt uses deprecated scipy functions. | |||
- numpy<2 |
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.
Have you checked that this doesn't break other CCL stuff that might have been updated to numpy 2?
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.
The opposite, actually. We cannot yet move to numpy 2 because many of our dependencies still don't use numpy 2. firecrown is in the same situation. This will be a tricky migration.
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.
You also want to add this numpy<2
in the pyproject.toml dependencies.
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.
Done
@@ -63,5 +63,6 @@ def run(self): | |||
|
|||
setup( | |||
distclass=Distribution, | |||
setup_requires=['setuptools_scm'], |
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.
why do you still require setup.py
and not use just pyproject.toml
?
pyproject.toml
Outdated
@@ -1,5 +1,5 @@ | |||
[build-system] | |||
requires = ["setuptools>=64", "setuptools_scm>=8", "cmake", "swig"] | |||
requires = ["setuptools>=64", "setuptools_scm>=8", "cmake", "swig", "numpy<2"] |
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.
Would it go here or in the dependencies
section below?
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.
sorry done
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.
LGTM.
Our latest releases haven't been pushed to pypi and conda because the automatic versioning was not working. This was broken in #1144
Unfortunately fully testing this will require us to publish a new release and see if it pulls through. Hopefully we only need to do this once.
Closes #1207
Closes #1204