From 135fcc21c0c91f515c232554b92d4cb1affbdf9c Mon Sep 17 00:00:00 2001 From: Thomas Dent Date: Wed, 18 Sep 2024 17:13:03 +0200 Subject: [PATCH 1/4] Update offline source probability for change to mchirp area (#4882) * Update offline source probability for changes to mchirp area * Update pycbc_source_probability_offline It still didn't work from Thomas' change, we needed a further fix for the missing gap entry. Also, even if we run the source probabilities offline with the 'include mass gap' option, the output file doesn't have a mass gap entry. * Remove mass gap option entirely Offline probabilities no longer to support mass gap * remove more mass gap code --------- Co-authored-by: AnaLorenzoMedina <114947731+AnaLorenzoMedina@users.noreply.github.com> --- bin/pycbc_source_probability_offline | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/bin/pycbc_source_probability_offline b/bin/pycbc_source_probability_offline index 2fc8eaceb84..05a30359c65 100755 --- a/bin/pycbc_source_probability_offline +++ b/bin/pycbc_source_probability_offline @@ -25,20 +25,13 @@ parser.add_argument('--search-tag', required=True, parser.add_argument('--ifar-threshold', type=float, default=None, help='Select only candidate events with IFAR ' 'above threshold.') -parser.add_argument('--include-mass-gap', action='store_true', - help='Option to include the Mass Gap region.') parser.add_argument('--verbose', action='count') parser.add_argument("--version", action="version", version=pycbc.version.git_verbose_msg) mchirp_area.insert_args(parser) args = parser.parse_args() -mc_area_args = mchirp_area.from_cli(args) - -if not args.include_mass_gap: - mass_bdary = mc_area_args['mass_bdary'] - assert mass_bdary['ns_max'] == mass_bdary['gap_max'], \ - 'NS/Mass Gap boundaries should be the same.' +mc_area_args = mchirp_area.from_cli(args, parser) pycbc.init_logging(args.verbose) @@ -88,7 +81,8 @@ for event in tqdm.trange(len(ifar)): / sngl_snr[ifo][0][event] for ifo in ifos_event]) probs = mchirp_area.calc_probabilities(mchirp[event], coinc_snr, min_eff_dist, mc_area_args) - if not args.include_mass_gap: + # We do not expect a mass gap entry, but just in case + if "Mass Gap" in probs: probs.pop("Mass Gap") ifo_names = ''.join(sorted(ifos_event)) out_name = dir_path + '%s-%s-%i-1.json' % (ifo_names, args.search_tag, From b4a80eacba6c49cf15edf283462af573bfb63419 Mon Sep 17 00:00:00 2001 From: Ian Harry Date: Wed, 25 Sep 2024 08:25:35 -0700 Subject: [PATCH 2/4] Bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b2c2e2f3590..c02e9f9298e 100755 --- a/setup.py +++ b/setup.py @@ -119,7 +119,7 @@ def __getattr__(self, attr): vinfo = _version_helper.generate_git_version_info() except: vinfo = vdummy() - vinfo.version = '2.3.7' + vinfo.version = '2.3.8' vinfo.release = 'True' version_script = f"""# coding: utf-8 From d855bab86b7f0d72390290aa4270b95cc3ecb7c6 Mon Sep 17 00:00:00 2001 From: Ian Harry Date: Thu, 12 Sep 2024 15:38:55 +0100 Subject: [PATCH 3/4] Update GitHub actions to use modern versions (#4867) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Depndabot * Try to solve new issue due to upload-artifact@v2 deprecation * Mimic what has been changed for PyPMC * Still failing, try this… * Include a fix for Node16 deprecation as well * Fix one more error * Also update setup-python to v5 * Remove some debugging stuff --------- Co-authored-by: Tito Dal Canton --- .github/workflows/basic-tests.yml | 8 ++++---- .github/workflows/build_venv.yml | 2 +- .github/workflows/distribution.yml | 26 ++++++++++++++---------- .github/workflows/docker-build.yml | 2 +- .github/workflows/inference-workflow.yml | 6 +++--- .github/workflows/mac-test.yml | 2 +- .github/workflows/search-workflow.yml | 6 +++--- .github/workflows/tmpltbank-workflow.yml | 4 ++-- .github/workflows/tut-test.yml | 4 ++-- .github/workflows/workflow-tests.yml | 4 ++-- 10 files changed, 34 insertions(+), 30 deletions(-) diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml index 239e9250db4..65fabf82d7a 100644 --- a/.github/workflows/basic-tests.yml +++ b/.github/workflows/basic-tests.yml @@ -16,9 +16,9 @@ jobs: python-version: [3.8, 3.9, '3.10', '3.11'] test-type: [unittest, search, docs] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: installing system packages @@ -51,7 +51,7 @@ jobs: tox -e py-inference - name: store documentation page if: matrix.test-type == 'docs' && matrix.python-version == '3.8' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: documentation-page path: _gh-pages @@ -61,7 +61,7 @@ jobs: if: github.ref == 'refs/heads/master' && github.event_name == 'push' steps: - name: retrieve built documentation - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4.1.7 with: name: documentation-page - name: debug diff --git a/.github/workflows/build_venv.yml b/.github/workflows/build_venv.yml index ea5448f73d9..eb9525841b5 100644 --- a/.github/workflows/build_venv.yml +++ b/.github/workflows/build_venv.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v1 - name: "Set up Python" - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 - diff --git a/.github/workflows/distribution.yml b/.github/workflows/distribution.yml index 122f01ae03d..7b315e1f896 100644 --- a/.github/workflows/distribution.yml +++ b/.github/workflows/distribution.yml @@ -15,10 +15,10 @@ jobs: os: [ubuntu-20.04, macos-12] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.8 - name: Install cibuildwheel @@ -29,29 +29,33 @@ jobs: CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* CIBW_SKIP: "*musllinux*" CIBW_ARCHS_MACOS: x86_64 arm64 - - uses: actions/upload-artifact@v2 + - name: Upload wheels + uses: actions/upload-artifact@v4 with: + name: wheel-${{ matrix.os }} path: ./wheelhouse/*.whl deploy_pypi: - name: Build and publish Python 🐍 distributions 📦 to PyPI + name: Package and publish to PyPI runs-on: ubuntu-20.04 needs: build_wheels steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python 3.8 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4.1.7 with: - path: ./ - - name: build pycbc for pypi + pattern: wheel-* + merge-multiple: true + path: dist/ + - name: Build source distribution run: | python setup.py sdist - mv artifact/* dist/ - - name: Publish distribution 📦 to PyPI + ls -lh dist + - name: Publish to PyPI if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@master with: diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index e0a4f82abf7..d91e88135fb 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v1 - name: "Set up Python" - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 - diff --git a/.github/workflows/inference-workflow.yml b/.github/workflows/inference-workflow.yml index d95e1c5b714..bd520b90786 100644 --- a/.github/workflows/inference-workflow.yml +++ b/.github/workflows/inference-workflow.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: install condor @@ -48,12 +48,12 @@ jobs: find submitdir/work/ -type f -name '*.tar.gz' -delete - name: store log files if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: logs path: gw_output/submitdir/work - name: store result page - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: results path: html diff --git a/.github/workflows/mac-test.yml b/.github/workflows/mac-test.yml index f441f648d5c..111bb9aec66 100644 --- a/.github/workflows/mac-test.yml +++ b/.github/workflows/mac-test.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - run: | diff --git a/.github/workflows/search-workflow.yml b/.github/workflows/search-workflow.yml index 9383c5066cb..5e94d06a3cd 100644 --- a/.github/workflows/search-workflow.yml +++ b/.github/workflows/search-workflow.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: install condor @@ -55,12 +55,12 @@ jobs: find submitdir/work/ -type f -name '*.tar.gz' -delete - name: store log files if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: logs path: output/submitdir/work - name: store result page - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: results path: html diff --git a/.github/workflows/tmpltbank-workflow.yml b/.github/workflows/tmpltbank-workflow.yml index 66a4f1ba3b2..1a4e5ac9104 100644 --- a/.github/workflows/tmpltbank-workflow.yml +++ b/.github/workflows/tmpltbank-workflow.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: install condor @@ -51,7 +51,7 @@ jobs: find submitdir/work/ -type f -name '*.tar.gz' -delete - name: store log files if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: logs path: output/submitdir/work diff --git a/.github/workflows/tut-test.yml b/.github/workflows/tut-test.yml index 5abd59c9d75..a4e2847ea5f 100644 --- a/.github/workflows/tut-test.yml +++ b/.github/workflows/tut-test.yml @@ -15,9 +15,9 @@ jobs: os: [ubuntu-20.04] python-version: [3.8, 3.9, '3.10', '3.11'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: installing packages diff --git a/.github/workflows/workflow-tests.yml b/.github/workflows/workflow-tests.yml index 86410066aff..056806aa07b 100644 --- a/.github/workflows/workflow-tests.yml +++ b/.github/workflows/workflow-tests.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: install condor @@ -50,7 +50,7 @@ jobs: find submitdir/work/ -type f -name '*.tar.gz' -delete - name: store log files if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: logs-${{matrix.test-type}} path: examples/workflow/generic/${{matrix.test-type}}/submitdir/work From 290316ece885797f2d2fe305c881f559edcf3dea Mon Sep 17 00:00:00 2001 From: Ian Harry Date: Wed, 25 Sep 2024 09:50:11 -0700 Subject: [PATCH 4/4] Pin to older ligo.skymap for tests --- companion.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/companion.txt b/companion.txt index a101c774632..f8f106bc1a2 100644 --- a/companion.txt +++ b/companion.txt @@ -6,7 +6,7 @@ healpy # Needed for GraceDB uploads and skymap generation ligo-gracedb>=2.10.0 -ligo.skymap!=1.1.0 +ligo.skymap!=1.1.0,<2.0.0 # auxiliary samplers epsie>=1.0