Skip to content

Improve names of constants and functions for SRD-related bins#519

Merged
marcpaterno merged 4 commits into
masterfrom
issue_508
May 13, 2025
Merged

Improve names of constants and functions for SRD-related bins#519
marcpaterno merged 4 commits into
masterfrom
issue_508

Conversation

@marcpaterno
Copy link
Copy Markdown
Collaborator

@marcpaterno marcpaterno commented May 12, 2025

Description

This PR changes the names of the module-level constants, and some functions, associated with the SRD binning. This is to make it more clear that the SRD only discusses harmonic space analysis.

Fixes # 508

Type of change

Please delete the bullet items below that do not apply to this pull request.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

The following checklist will make sure that you are following the code style and
guidelines of the project as described in the
contributing page.

  • I have run bash pre-commit-check and fixed any issues
  • I have added tests that prove my fix is effective or that my feature works
  • I have made corresponding changes to the documentation
  • I have 100% test coverage for my changes (please check this after the CI system has verified the coverage)

@marcpaterno marcpaterno requested review from Copilot and vitenti May 12, 2025 20:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR renames module-level constants and functions related to the LSST SRD binning to clarify that the distributions pertain to harmonic space analysis. Key changes include:

  • Renaming constants and functions from BIN_COLLECTION to HARMONIC_BIN_COLLECTION in multiple modules.
  • Updating relevant documentation in tutorials and test files to reflect these naming changes.
  • Adjusting the command-line flag in integration tests for consistency with updated tooling.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tutorial/two_point_generators.qmd Renamed constants to the harmonic variants.
tutorial/two_point_factories.qmd Updated references to use the new harmonic constants.
tutorial/inferred_zdist_serialization.qmd Updated documentation to reference harmonic bin collections.
tutorial/_quarto.yml Version update reflecting current release notes.
tests/integration/test_des_y1_3x2pt.py Modified cobaya-run command with the added "-f" flag.
tests/generators/test_inferred_galaxy_zdist.py Updated tests to utilize the harmonic bin collections.
firecrown/generators/inferred_galaxy_zdist.py Renamed functions and updated the getattr to expose harmonic bins.
Comments suppressed due to low confidence (1)

tests/integration/test_des_y1_3x2pt.py:85

  • [nitpick] Verify that the '-f' flag is required and its usage is consistent with the project's documentation, as it deviates from the conventional syntax.
cobaya-run -f cobaya/{cobaya_yaml_file}

@cache
def get_lsst_y1_lens_bin_collection() -> ZDistLSSTSRDBinCollection:
def get_lsst_y1_lens_harmonic_bin_collection() -> ZDistLSSTSRDBinCollection:
"""Get the LSST Year 1 lens bin collection."""
Copy link

Copilot AI May 12, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider updating the docstring to explicitly mention 'harmonic' analysis, which will help clarify the purpose of this function given the new naming.

Suggested change
"""Get the LSST Year 1 lens bin collection."""
"""Get the LSST Year 1 lens bin collection for harmonic analysis.
This function generates the LSST Year 1 lens bin collection, which is
intended for use in harmonic analysis of galaxy redshift distributions.
The term "harmonic" refers to the analysis of angular power spectra or
related quantities in cosmological studies.
"""

Copilot uses AI. Check for mistakes.
@cache
def get_lsst_y1_source_bin_collection() -> ZDistLSSTSRDBinCollection:
def get_lsst_y1_source_harmonic_bin_collection() -> ZDistLSSTSRDBinCollection:
"""Get the LSST Year 1 source bin collection."""
Copy link

Copilot AI May 12, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider updating the docstring to explicitly mention 'harmonic' analysis to reflect the updated functionality and naming convention.

Suggested change
"""Get the LSST Year 1 source bin collection."""
"""Get the LSST Year 1 source bin collection for harmonic analysis.
This function generates a collection of source bins for LSST Year 1 data,
specifically designed for harmonic analysis. The bins are constructed
using equal-area binning and include parameters relevant to the analysis.
"""

Copilot uses AI. Check for mistakes.
@marcpaterno marcpaterno merged commit f57ca0e into master May 13, 2025
8 checks passed
@marcpaterno marcpaterno deleted the issue_508 branch May 13, 2025 14:08
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (1bc279e) to head (0015bf9).
⚠️ Report is 16 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #519   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files          49       49           
  Lines        4766     4766           
  Branches      535      535           
=======================================
  Hits         4766     4766           
Files with missing lines Coverage Δ
firecrown/generators/inferred_galaxy_zdist.py 100.0% <100.0%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants