Skip to content

feat: utils to repack and replace .h5 and .hdf5 files#838

Merged
Qazalbash merged 2 commits into
devfrom
h5repack-util
Jun 1, 2026
Merged

feat: utils to repack and replace .h5 and .hdf5 files#838
Qazalbash merged 2 commits into
devfrom
h5repack-util

Conversation

@Qazalbash

Copy link
Copy Markdown
Member

No description provided.

@Qazalbash Qazalbash self-assigned this Jun 1, 2026
@Qazalbash Qazalbash added the enhancement New feature or request label Jun 1, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new script, gwk_h5repack, to repack HDF5 files using the h5repack command-line utility, and registers it as an entry point in pyproject.toml. The review feedback correctly identifies a critical argument parsing issue where using nargs=argparse.REMAINDER before another positional argument (file) causes parsing to fail. The reviewer suggests using parser.parse_known_args() to properly handle arbitrary options and the target file argument.

Comment thread src/gwkokab_scripts/h5repack.py Outdated
Comment thread src/gwkokab_scripts/h5repack.py Outdated
@Qazalbash Qazalbash merged commit 50e8501 into dev Jun 1, 2026
5 checks passed
@Qazalbash Qazalbash deleted the h5repack-util branch June 1, 2026 17:53
Qazalbash added a commit that referenced this pull request Jun 2, 2026
… file tools, and API consistency improvements (#840)

* feat: implement HDF5 support for saving inference data and configurations (#836)

* feat: implement HDF5 support for saving inference data and configurations

* fix: convert HDF5 dataset attributes to a dictionary

* Add report generation functionality with Papermill and Jupyter Notebook template

- Introduced `generate_report.py` to handle report generation from input data files.
- Integrated Papermill for executing Jupyter Notebook templates and generating HTML reports.
- Added a new Jupyter Notebook template `template_report.ipynb` for report formatting.
- Updated `pyproject.toml` to include new dependencies: `nbconvert`, `papermill`, and `plotly`.
- Registered new command line entry point for report generation in `pyproject.toml`.
- Included the notebook template in package data for distribution.

* Update src/gwkokab/analysis/report/generate_report.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* style: format output notebook path assignment

* feat: add corner library dependency for enhanced plotting capabilities

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix: ensure compatibility with JAX Array in HDF5 write function

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* feat: using file descriptor to reduce IO overhead

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* refactor: rename parameters for consistency in `MultiSourceModelCore` and `SubPopulationModelCore` (#837)

* refactor: rename parameters for consistency in `MultiSourceModelCore` and `SubPopulationModelCore`

* Update src/gwkokab/analysis/multisource/common.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix: reorder parameters in `MultiSourceModelCore`

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix: correct quotation marks in HTML script tag for virtual-webgl.js

* feat: utils to repack and replace `.h5` and `.hdf5` files (#838)

* feat: utils to repack and replace `.h5` and `.hdf5` files

* fix: remove bugs from option parsing and update epilog

* feat: utilities to calculate marginal probabilities of mixture models (#833)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update src/gwkokab/analysis/core/utils.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update src/gwkokab/analysis/utils/marginals.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update src/gwkokab/analysis/report/generate_report.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix: reorder imports

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant