Skip to content

Conversation

@kamilansri
Copy link

Summary

This PR addresses critical issues in the ButlerRepoValidator usage where coverage reporting failed due to missing governor dimensions (instruments). It also introduces new utility scripts for exploring the RC2 subset repository and cleans up syntax errors caused by non-breaking spaces in existing scripts.

Key Changes

  • Fix Coverage Calculation: Updated get_data_coverage calls in test scripts to explicitly pass instruments=list(result.instruments). This resolves the "governor dimension" error when querying the Butler registry.
  • New Exploration Script: Added explore_rc2_repository.py to provide deep introspection into the RC2 subset, including detailed collection analysis and dataset type discovery.
  • Syntax Cleanup: Removed invisible non-breaking space characters (\xa0) from all test scripts that were causing Python SyntaxErrors.
  • API Safety: Updated Butler query calls to use list containers for single objects (e.g., datasets=[dataset_type_obj]) to ensure strict API compatibility.

Testing

  • Verified explore_rc2_repository.py runs successfully against the rc2_subset/SMALL_HSC path.
  • Verified test_fixed_coverage_report.py runs against demo_data without throwing dimension errors.
  • Confirmed that ButlerRepoValidator correctly identifies calexp and src datasets in the new RC2 environment.

Context

Previously, the get_data_coverage method would fail on repositories requiring strict dimension governance because the instrument dimension was not being propagated to the query. This PR ensures the discovered instruments are passed back to the coverage calculator.

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.

1 participant