Skip to content

Add support for GWpy 4.0.0#182

Merged
areeda merged 4 commits into
gwdetchar:masterfrom
duncanmmacleod:gwpy-4
Jul 15, 2026
Merged

Add support for GWpy 4.0.0#182
areeda merged 4 commits into
gwdetchar:masterfrom
duncanmmacleod:gwpy-4

Conversation

@duncanmmacleod

Copy link
Copy Markdown
Member

GWpy 4.0.0rc1 has been released, and includes a number of breaking changes that impact this project. This PR includes patches to fix the test suite when installed alongside the new GWpy.

I have not tested an actual Hveto run, so there could easily be more to fix.

GWpy 4.x is stricter (worse) at recognising segwizard files than before
GWpy 4.0.0 returns aware datetime's, including timezone information, so the default output representation is different; the easiest solution is to control it explicitly so there are no surprises
The I/O registry construction in GWpy 4.0.0 changed, and the get_read_format function was removed, so we rebuild it by calling out to the private method that it used to call
The package_list function makes an actual system call, and requires either conda or pip to be available on the system - this commit patches that out to avoid an unnecessary requirement.

uv creates virtualenvs without pip by default, so this should avoid any surprises.
@duncanmmacleod
duncanmmacleod marked this pull request as ready for review February 28, 2026 17:29
@dethodav

Copy link
Copy Markdown
Contributor

I've tested a full run of HVeto with this patch and gwpy=4.0.1. Things ran to completion with the expected science output.

One deprecation warning did appear that should be addressed in a future PR:

hveto/__main__.py:374: DeprecationWarning: the `url` keyword argument for `query_dqsegdb` has been renamed `host`; this warning will become an error in the future
  analysis = DataQualityFlag.query(aflag, start, end, url=url)

My test HVeto run can be found here (requires LIGO.org authentication): https://ldas-jobs.ligo-la.caltech.edu/~derek.davis/detchar/O4/hveto/250210/

@jrsmith02

Copy link
Copy Markdown
Contributor

Output looks good to me, thank you both!

@areeda
areeda merged commit 75b6109 into gwdetchar:master Jul 15, 2026
5 checks passed
areeda pushed a commit to areeda/hveto that referenced this pull request Jul 15, 2026
* fix(segments): Use explicit format=segwizard when reading segments

GWpy 4.x is stricter (worse) at recognising segwizard files than before

* fix(html): Explicitly control datetime format for HTML

GWpy 4.0.0 returns aware datetime's, including timezone information, so the default output representation is different; the easiest solution is to control it explicitly so there are no surprises

* fix(triggers): Update trigger reading for GWpy 4.0.0

The I/O registry construction in GWpy 4.0.0 changed, and the get_read_format function was removed, so we rebuild it by calling out to the private method that it used to call

* test: Mock out package_list() in HTML tests

The package_list function makes an actual system call, and requires either conda or pip to be available on the system - this commit patches that out to avoid an unnecessary requirement.

uv creates virtualenvs without pip by default, so this should avoid any surprises.
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