Skip to content

allow un-registered branch realizations#156

Merged
chrisdicaprio merged 12 commits intomainfrom
feature/154-unregistered-rlz
Apr 13, 2026
Merged

allow un-registered branch realizations#156
chrisdicaprio merged 12 commits intomainfrom
feature/154-unregistered-rlz

Conversation

@chrisdicaprio
Copy link
Copy Markdown
Collaborator

@chrisdicaprio chrisdicaprio commented Apr 13, 2026

  • closes Feature: allow un-registered realization branches #154
  • more robust type checking
  • more explicit type hints (toshi_hazard_store/oq_import/parse_oq_realizations.py)
  • fixes typing (toshi_hazard_store/model/gridded/gridded_hazard_pydantic.py)
  • fixes latent bug caught by type checking (toshi_hazard_store/utils.py)

All reading of realization data (e.g. by toshi-hazard-post) is done ad-hoc via pyarrow as there is no toshi-hazad-store API for querying the realization data. A helper function has been provided to check if requested branches are un-registered and warn if so. This can be used by any user of the dataset or included in a future query API.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

❌ Patch coverage is 84.61538% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.07%. Comparing base (5ccb20a) to head (9908403).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
...hi_hazard_store/oq_import/parse_oq_realizations.py 55.55% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #156      +/-   ##
==========================================
+ Coverage   67.45%   68.07%   +0.62%     
==========================================
  Files          41       41              
  Lines        1914     1920       +6     
  Branches      179      178       -1     
==========================================
+ Hits         1291     1307      +16     
+ Misses        612      601      -11     
- Partials       11       12       +1     
Flag Coverage Δ
unittests 68.07% <84.61%> (+0.62%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chrisdicaprio chrisdicaprio requested review from chrisbc and voj April 13, 2026 03:22
@chrisdicaprio chrisdicaprio marked this pull request as ready for review April 13, 2026 03:26
Copy link
Copy Markdown
Collaborator

@voj voj left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@chrisbc chrisbc left a comment

Choose a reason for hiding this comment

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

@chrisdicaprio all good but the one question re CodedLocation usage.

Comment thread toshi_hazard_store/utils.py Outdated
@chrisdicaprio chrisdicaprio merged commit 5bc6e58 into main Apr 13, 2026
11 checks passed
@chrisdicaprio chrisdicaprio deleted the feature/154-unregistered-rlz branch April 13, 2026 22:15
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.

Feature: allow un-registered realization branches

3 participants