Skip to content

[PyFDB] fdb-717: Improvements local dev setup pyfdb - #322

Merged
danovaro merged 2 commits into
developfrom
feature/fdb-717-pyfdb-dev-setup
Aug 25, 2026
Merged

[PyFDB] fdb-717: Improvements local dev setup pyfdb#322
danovaro merged 2 commits into
developfrom
feature/fdb-717-pyfdb-dev-setup

Conversation

@tbkr

@tbkr tbkr commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

🌈🌦️📖🚧 Documentation FDB 🚧📖🌦️🌈
https://sites.ecmwf.int/docs/fdb/pull-requests/PR-322

@tbkr
tbkr force-pushed the feature/fdb-717-pyfdb-dev-setup branch 4 times, most recently from d41ad1e to 1f1e3c9 Compare August 6, 2026 13:55
@tbkr tbkr changed the title feat(fdb-717): Improvements local dev setup pyfdb [PyFDB] fdb-717: Improvements local dev setup pyfdb Aug 6, 2026
@tbkr
tbkr force-pushed the feature/fdb-717-pyfdb-dev-setup branch 4 times, most recently from cfad852 to f31d4b1 Compare August 7, 2026 09:20
@tbkr
tbkr requested a lite review from Copilot August 10, 2026 07:56
@tbkr
tbkr marked this pull request as ready for review August 10, 2026 07:56

Copilot AI 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.

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_bindings behave as a proper Python package in the staging area by copying an __init__.py alongside the built extension.
  • Add pytest configuration (--import-mode=importlib) and empty test-package __init__.py files 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.

Comment thread src/pyfdb_bindings/__init__.py
Comment thread docs/pyfdb/index.rst
Comment thread docs/pyfdb/technical_insights.rst Outdated
Comment thread pyproject.toml Outdated
Comment thread docs/pyfdb/technical_insights.rst Outdated
@tbkr
tbkr force-pushed the feature/fdb-717-pyfdb-dev-setup branch from 959690f to 2fc0c34 Compare August 10, 2026 09:03
@tbkr
tbkr requested review from caraghbiner and jharwood0 August 10, 2026 09:09
@codecov-commenter

codecov-commenter commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.51%. Comparing base (a29adbb) to head (02c4e40).
⚠️ Report is 2 commits behind head on develop.

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.
📢 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.

@tbkr tbkr added the approved-for-ci Approved for CI run label Aug 10, 2026
@tbkr
tbkr force-pushed the feature/fdb-717-pyfdb-dev-setup branch 4 times, most recently from d220545 to 31c0005 Compare August 10, 2026 13:05

@jharwood0 jharwood0 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.

pyfdb_bindings package changes makes sense 😃

few minor comments / questions but no major blockers

Comment thread docs/pyfdb/technical_insights.rst Outdated
Comment thread docs/pyfdb/technical_insights.rst
Comment thread docs/pyfdb/technical_insights.rst
Comment thread pytest.toml Outdated
@tbkr
tbkr force-pushed the feature/fdb-717-pyfdb-dev-setup branch 2 times, most recently from ba41d0c to 4547c7d Compare August 17, 2026 10:25
tbkr and others added 2 commits August 25, 2026 15:19
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>
@danovaro
danovaro force-pushed the feature/fdb-717-pyfdb-dev-setup branch from 4547c7d to 02c4e40 Compare August 25, 2026 13:19
@danovaro
danovaro merged commit e5a5a47 into develop Aug 25, 2026
132 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-for-ci Approved for CI run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants