8000 Fix strange usage of pycbc.version.release by titodalcanton · Pull Request #5033 · gwastro/pycbc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix strange usage of pycbc.version.release #5033

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

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

titodalcanton
Copy link
Contributor

This fixes a couple minor weird things I noticed about how we report PyCBC's version in a couple places.

  1. In setup.py, we always set vinfo.release to a string like 'False' or 'True' which I always found odd. Why not just a bool? Here I turn it into a bool.
  2. While debugging Move to igwn-ligolw #5019 I noticed that the PyCBC version string reported on GraceDB is "Using PyCBC version 0.0a9071 (release)" which is wrong. This happens because of point 1, as the code that sets up that string assumes release is bool.
  3. In a recent test run of PyGRB, PyCBC's version information page says "ID : 0.0a9055" and "Version : False", both of which make no sense to me; for context, for the other libraries "ID" is the git hash. This is also fixed to show the git hash in "ID" and to give the actual version, plus the optional string "(release)" if appropriate, in "Version". This makes the "Version" line consistent with what is uploaded on GraceDB.
  • The author of this pull request confirms they will adhere to the code of conduct

Copy link
Member
@ahnitz ahnitz left a comment

Choose a reason for hiding this comment

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

This seems OK to me. I think confirmation of a couple checks besides the automated build would be useful though. Have you manually tried to make a release and non-release wheel offline and installed both? If so, then I think this can be merged.

@titodalcanton
Copy link
Contributor Author

No I have not made any manual tests, but I should.

@titodalcanton
Copy link
Contributor Author

I tested this by building two wheels via python setup.py bdist_wheel, one from this unmodified branch (non-release) and the other after editing setup.py to make a mock 2.8.0 release. Both wheels build and install fine, and the version shows up correctly in the output of pip list. I then ran pycbc_page_versioning before and after this change, from release and non-release installs, and here is what I get in the "PyCBC Version Information" section.

Before change, non-release:

 Name : PyCBC
ID : 0.0a9082
Status : CLEAN: All modifications committed
Version : False
Tag : None
Author : Gareth S Cabourn Davies
Builder : Tito Dal Canton
Branch : master
Committer : GitHub
Date : 2025-03-10 20:03:56 +0000 

Before change, release 2.7.3:

 Name : PyCBC
ID : 2.7.3
Status : CLEAN: All modifications committed
Version : True
Tag : v2.7.3
Author : maxtrevor <65971534+maxtrevor@users.noreply.github.com>
Builder : Unknown User <>
Branch : None
Committer : GitHub
Date : 2025-02-25 19:36:47 +0000 

After change, non-release:

 Name : PyCBC
ID : cca7c047cdef873751674f26073da81a8c857c85
Status : CLEAN: All modifications committed
Version : 0.0a9064
Tag : None
Author : Tito Dal Canton
Builder : Tito Dal Canton
Branch : fix-release-mess
Committer : Tito Dal Canton
Date : 2025-03-10 18:15:51 +0000 

After change, mock 2.8.0 release:

 Name : PyCBC
ID : ccc31cbe3c422e10b24e53b1eafe70b5979bf66d
Status : CLEAN: All modifications committed
Version : 2.8.0 (release)
Tag : v2.8.0
Author : Tito Dal Canton
Builder : Tito Dal Canton
Branch : fix-release-mess
Committer : Tito Dal Canton
Date : 2025-03-10 19:34:49 +0000 

Everything looks ok to me, so I am merging.

@titodalcanton titodalcanton merged commit f42d61f into gwastro:master Mar 10, 2025
31 checks passed
@titodalcanton titodalcanton deleted the fix-release-mess branch March 10, 2025 20:17
GarethCabournDavies pushed a commit to GarethCabournDavies/pycbc that referenced this pull request May 12, 2025
spxiwh pushed a commit to spxiwh/pycbc that referenced this pull request May 12, 2025
spxiwh added a commit that referenced this pull request May 12, 2025
* Update PyPI publish action (#5097)

* Workaround for git.ligo.org authentication change (#5119)

* Workaround for git.ligo.org auth change

* Workaround for git.ligo.org auth change

* Forgot args

* Fix error

* Two possible URL schemes

* Fix regex

* Don't miss this bit!

* Address ci deprecations (#5076)

* Update CI to Ubuntu 24.04

* Use Python 3.11 for distribution CI

* Try ubuntu-22 for basic tests

* updated for depcreated fillcolor value (#5123)

* Update cibuildwheel to v311

* Pin cython version

* Bump pegasus versions to 5.0.8

* Fix strange usage of pycbc.version.release (#5033)

* Fix usage of release flag in Pegasus sites code (#5098)

---------

Co-authored-by: Tito Dal Canton <tito.dalcanton@ijclab.in2p3.fr>
Co-authored-by: Alex Nitz <alex.nitz@gmail.com>
khunsang pushed a commit to khunsang/pycbc that referenced this pull request May 23, 2025
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
0