Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #193 +/- ##
========================================
Coverage 71.18% 71.18%
========================================
Files 376 376
Lines 23709 23709
Branches 2476 2476
========================================
Hits 16877 16877
Misses 6832 6832 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
91dfeff to
2be9698
Compare
Works now with shutil and there is the option to zero-copy read into a buffer.
The individual objects now return proper python objects. It's possible to compare ControlElements with StatusElements. Adjusted the tests accordingly.
Now checking the actual content of what is moved and also checks whether the cleanup was successful.
Now comparable with a Dict[str, Collection[str]] and constructable, as well.
To streamline with the other pyfdb API, I made the identifier also accept python dicts. Also, the internal representation is now a list of tuples, as for the identifier there is only a list of key and singular value pairs. I decoupled the external and internal representation so that this can be changed quickly.
There was a problem hiding this comment.
Pull request overview
This PR ports PyFDB from SWIG to PyBind11, creating a more Pythonic interface with comprehensive test coverage and documentation. The changes introduce a complete rewrite of the Python API with new test infrastructure and documentation generation setup.
Changes:
- Replaces SWIG-based bindings with PyBind11 implementation in
src/pyfdb_bindings/bindings.cc - Adds comprehensive Python API layer with type hints and helper classes in
src/pyfdb/ - Introduces extensive test suite covering all API functionality in
tests/pyfdb/integration/ - Adds Sphinx-based documentation with examples and API references in
docs/pyfdb/ - Updates build system to support PyFDB alongside existing Z3FDB
Reviewed changes
Copilot reviewed 66 out of 84 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/pyfdb_bindings/bindings.cc | New PyBind11 C++ bindings for FDB core functionality |
| src/pyfdb/pyfdb.py | Main FDB Python class with all public API methods |
| src/pyfdb/pyfdb_type.py | Type definitions and helper classes (DataHandle, URI, etc.) |
| src/pyfdb/pyfdb_iterator.py | Iterator wrapper classes for various FDB operations |
| tests/pyfdb/integration/*.py | Comprehensive integration tests for all API functions |
| tests/pyfdb/conftest.py | Test fixtures and FDB setup helpers |
| docs/pyfdb/*.rst | Documentation pages for installation, examples, and API |
| CMakeLists.txt | Build configuration for PyFDB feature flag |
| src/CMakeLists.txt | PyFDB package staging and wheel build setup |
| tests/CMakeLists.txt | Test registration for PyFDB |
| .github/workflows/pyfdb.yml | CI workflow for PyFDB builds and tests |
Comments suppressed due to low confidence (3)
tests/pyfdb/integration/test_uri.py:1
- The assertion is comparing a string with a URI object, which will always be True. Based on the test name and context, this should compare
test_uriwithtest_uri_section3instead.
src/z3fdb/simple_store_builder.py:1 - Corrected spelling of 'spefified' to 'specified'.
src/pyfdb/pyfdb_type.py:1 - Corrected spelling of 'singluar' to 'singular'.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
simondsmart
left a comment
There was a problem hiding this comment.
This is looking really good, except for the execute() method still persisting in the move() api.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 64 out of 82 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Also modified wrong python executable env var in CMake
Description
I'm aware that this is a somewhat mid-sized PR 😉 It's also a complete rewrite with tests and documentation.
Porting FDB to PyBind11, making the Python-API more user-friendly and introducing tests for the API layer which are testing core functionality of the FDB in an ephemeral FDB setup.
Documentation is added to the code base as well as the sphinx generated side.
The coverage was tested and is close to 100% testing all provided use-cases and functionalities.
For now I keep this PR in WIP status and I'm open to discuss Implementation details.
Notes for reviewers:
Contributor Declaration
By opening this pull request, I affirm the following:
🌈🌦️📖🚧 Documentation FDB 🚧📖🌦️🌈
https://sites.ecmwf.int/docs/dev-section/fdb/pull-requests/PR-193