Skip to content

[PyFDB] Findlibs version display - #293

Merged
simondsmart merged 6 commits into
developfrom
feature/pyfdb/fdb-679-findlibs-version-check
Jul 7, 2026
Merged

[PyFDB] Findlibs version display#293
simondsmart merged 6 commits into
developfrom
feature/pyfdb/fdb-679-findlibs-version-check

Conversation

@tbkr

@tbkr tbkr commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Description

Add feature to display runtime information of findlibs for pyfdb and its dependencies.

This was a direct feature request in #288.

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-293

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

Adds a small diagnostic CLI to PyFDB to help users inspect how findlibs resolves fdb5 and related runtime dependencies, and documents how to use it (addresses feature request in issue #288).

Changes:

  • Add python -m pyfdb CLI flags to print resolved library “home” paths and show relevant findlibs environment variables.
  • Document the new diagnostic commands in the PyFDB installation guide.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/pyfdb/__main__.py Adds a python -m pyfdb CLI with --print-home and --findlibs-setup diagnostics powered by findlibs.
docs/pyfdb/installation.rst Documents how to use the new CLI to diagnose library resolution issues.

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

Comment thread src/pyfdb/__main__.py
Comment thread src/pyfdb/__main__.py Outdated
Comment thread src/pyfdb/__main__.py Outdated
Comment thread src/pyfdb/__main__.py
Comment thread src/pyfdb/__main__.py
tbkr added 2 commits June 30, 2026 16:50
This leverages findlibs to figure out the configured runtime path for
the dependencies.
@tbkr
tbkr force-pushed the feature/pyfdb/fdb-679-findlibs-version-check branch from a89ecab to d0eabe4 Compare June 30, 2026 14:50
@codecov-commenter

codecov-commenter commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.02%. Comparing base (6c9e5cd) to head (bfbcf97).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #293      +/-   ##
===========================================
- Coverage    71.06%   71.02%   -0.04%     
===========================================
  Files          370      370              
  Lines        23455    23455              
  Branches      2463     2463              
===========================================
- Hits         16669    16660       -9     
- Misses        6786     6795       +9     

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

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

nothing major but see my comments. (in PR description, a sample output could be helpful)

Comment thread src/pyfdb/__main__.py Outdated
Comment thread src/pyfdb/__main__.py Outdated
Comment thread src/pyfdb/__main__.py Outdated
Comment thread src/pyfdb/__main__.py Outdated
Comment thread docs/pyfdb/installation.rst Outdated
Comment thread src/pyfdb/__main__.py Outdated
Comment thread src/pyfdb/__main__.py Outdated

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

this is really good -- it is just a question of how much should be here, and how much in findlibs themselves, as this is a really general-purpose code that should benefit all packages. I included some concrete feedback, but thats not really crucial -- maybe a good strategy is to merge as is, gather real feedback from users, and then refactor the improved code into findlibs, and retain the original CLI option in pyfdb but instead invoke the findlibs with fdb5lib as a param

cc @iainrussell -- we discussed some time ago (not sure if week or year ago) to have a diagnostics command in either earthkit or findlibs. This is a good basis for it. Note at that time we had additionally consistency in mind (same buildcounter) which is absent here

Also added tests for the cli functionality.
Due to the lack of dependency resolution during runtime execution this
has to be written down in the __main__.py.
@tbkr
tbkr force-pushed the feature/pyfdb/fdb-679-findlibs-version-check branch from f8c56a5 to 9da4588 Compare July 1, 2026 12:43
@tbkr
tbkr requested a review from mcakircali July 1, 2026 12:50
@tbkr tbkr self-assigned this Jul 1, 2026
@tbkr tbkr added enhancement New feature or request documentation Improvements or additions to documentation labels Jul 1, 2026

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

look good to me

Comment thread src/pyfdb/__main__.py
Comment thread tests/pyfdb/cli/test_cli.py

@caraghbiner caraghbiner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved, though are you assuming #292 is merged first?

Comment thread src/pyfdb_bindings/bindings.cc Outdated
@tbkr
tbkr force-pushed the feature/pyfdb/fdb-679-findlibs-version-check branch from 151d66e to bfbcf97 Compare July 3, 2026 09:46
@simondsmart
simondsmart merged commit e43c817 into develop Jul 7, 2026
169 of 212 checks passed
@simondsmart
simondsmart deleted the feature/pyfdb/fdb-679-findlibs-version-check branch July 7, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants