[PyFDB] fdb-717: Improvements local dev setup pyfdb - #322
Conversation
d41ad1e to
1f1e3c9
Compare
cfad852 to
f31d4b1
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves the local development workflow for PyFDB by making the CMake staging area directly installable/importable (reducing the need for manual PYTHONPATH manipulation) and by documenting the expected setup and common failure modes.
Changes:
- Make
pyfdb_bindingsbehave as a proper Python package in the staging area by copying an__init__.pyalongside the built extension. - Add pytest configuration (
--import-mode=importlib) and empty test-package__init__.pyfiles to prevent import-name clashes during test collection. - Add/refresh PyFDB documentation: a detailed dev setup guide, staging area internals, and an FAQ; turn the old development page into a redirect.
Reviewed changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/pyfdb_bindings/CMakeLists.txt |
Copies __init__.py into the built extension output directory to make the staged bindings importable as a package. |
src/pyfdb_bindings/__init__.py |
New package initializer intended to import the compiled extension with a clearer error on failure. |
pyproject.toml |
Adds pytest import-mode configuration to avoid test/module name collisions. |
tests/pyfdb/__init__.py |
Marks the tests/pyfdb directory as a Python package (empty file). |
tests/z3fdb/__init__.py |
Marks the tests/z3fdb directory as a Python package (empty file). |
tests/pychunked_data_view/__init__.py |
Marks the tests/pychunked_data_view directory as a Python package (empty file). |
docs/pyfdb/index.rst |
Updates navigation to include the new FAQ and adds a “Technical Insights” section. |
docs/pyfdb/technical_insights.rst |
Adds a comprehensive local development setup guide for a full stack build + editable install. |
docs/pyfdb/staging_area.rst |
Documents the staging directory layout and what gets generated/copied there. |
docs/pyfdb/faq.rst |
Adds troubleshooting guidance for common import and runtime failures. |
docs/pyfdb/development.rst |
Replaces the old content with a note pointing to the new dev setup guide. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
959690f to
2fc0c34
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #322 +/- ##
===========================================
+ Coverage 77.36% 77.51% +0.14%
===========================================
Files 410 411 +1
Lines 27483 27553 +70
Branches 2756 2769 +13
===========================================
+ Hits 21263 21358 +95
+ Misses 6220 6195 -25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
d220545 to
31c0005
Compare
jharwood0
left a comment
There was a problem hiding this comment.
pyfdb_bindings package changes makes sense 😃
few minor comments / questions but no major blockers
ba41d0c to
4547c7d
Compare
Also fixing the naming clash of the test folder with src modules and writing documentation on the setup.
Co-authored-by: Josh Harwood <jharwood0@users.noreply.github.com>
4547c7d to
02c4e40
Compare
Description
Needed for local dev setup. No need to adjust the PYTHONPATH anymore. Installing the staging directories in build is sufficient now (after setting findlibs up for the local dev ofc).
Contributor Declaration
By opening this pull request, I affirm the following:
🌈🌦️📖🚧 Documentation FDB 🚧📖🌦️🌈
https://sites.ecmwf.int/docs/fdb/pull-requests/PR-322