Skip to content

Conversation

@pedrocamargo
Copy link
Owner

This PR contains the following items:

  • Substitutes PyTables with H5Py
  • Implements packaging and metadata through pyproject.toml, replacing the old setup.py
  • Switches testing framework from nosetests to pytest
  • Adds CI workflows
  • Incorporates testing for the validator
  • Increases test coverage for file.py to nearly 100%

Copilot AI review requested due to automatic review settings December 30, 2025 01:49
Copy link

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 performs a major refactoring to modernize the OpenMatrix Python library by replacing PyTables with h5py as the underlying HDF5 library. The changes include updating the build system, testing framework, and adding continuous integration workflows.

Key changes:

  • Replaces PyTables dependency with h5py for HDF5 file operations
  • Migrates from setup.py to modern pyproject.toml-based packaging
  • Switches from nosetests to pytest for testing with significantly expanded test coverage

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 22 comments.

Show a summary per file
File Description
tests/test_validator.py New comprehensive test suite for the validator module with ~495 lines covering all validation checks
tests/test_file.py New comprehensive test suite for file operations with ~598 lines achieving nearly 100% coverage
openmatrix/init.py Updated to use h5py instead of PyTables, simplified imports and file opening logic
openmatrix/File.py Complete rewrite to extend h5py.File instead of tables.File, replacing PyTables API calls with h5py equivalents
openmatrix/validator.py Refactored to use h5py API for checking OMX file validity and format compliance
openmatrix/Exceptions.py Added MappingError exception class alongside existing ShapeError
pyproject.toml New modern packaging configuration defining project metadata, dependencies, and build system
setup.py Removed in favor of pyproject.toml
.github/workflows/ci.yml New CI workflow for linting and testing across multiple Python versions and operating systems
README.md Updated documentation to reflect h5py usage instead of PyTables
example/python-omx-sample.py Code formatting improvements and style consistency updates
CHANGES.txt Added version 0.4.0 release entry

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pedrocamargo
Copy link
Owner Author

@Jake-Moss, can you review this PR when you get back so I can submit it against the main repo? It is almost a complete rewrite, but much of it should be easy to go over.

pedrocamargo and others added 5 commits January 5, 2026 20:44
Co-authored-by: Jake Moss <jake@outerloop.io>
Co-authored-by: Jake Moss <jake@outerloop.io>
Co-authored-by: Jake Moss <jake@outerloop.io>
Co-authored-by: Jake Moss <jake@outerloop.io>
Co-authored-by: Jake Moss <jake@outerloop.io>
@Jake-Moss
Copy link
Collaborator

Jake-Moss commented Jan 6, 2026

At this point I think I'll need a review from you @pedrocamargo haha. I also brought the codebase up to 100% branch coverage for both the codebase and test suite. https://github.com/pedrocamargo/omx-python/actions/runs/20740677926?pr=1

Should also reuse some of the old doc strings, but a few need to be updated

@pedrocamargo pedrocamargo merged commit 7bdd19c into master Feb 2, 2026
17 checks passed
@pedrocamargo pedrocamargo deleted the pedro/refactor_h5py branch February 2, 2026 01:15
Jake-Moss pushed a commit that referenced this pull request Feb 2, 2026
Refactoring pytables out and h5py in
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