Skip to content

Make Archive.get_entry_by_id public and deprecate _get_entry_by_id - #274

Open
Sriram-Nambiar wants to merge 1 commit into
openzim:mainfrom
Sriram-Nambiar:make-get-entry-by-id-public
Open

Sriram-Nambiar wants to merge 1 commit into
openzim:mainfrom
Sriram-Nambiar:make-get-entry-by-id-public

Conversation

@Sriram-Nambiar

@Sriram-Nambiar Sriram-Nambiar commented Oct 19, 2026 •

Copy link
Copy Markdown

Fixes #225.

  • Exposes public Archive.get_entry_by_id(entry_id).
  • Removes private Archive._get_entry_by_id(entry_id).
  • Updates type hints in libzim/reader.pyi.
  • Updates tests in tests/test_libzim_reader.py.

@benoit74

Copy link
Copy Markdown
Contributor

@Sriram-Nambiar please rebase on main and force push with lease, so that we have tests running on this PR

@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.12%. Comparing base (727f77f) to head (81f7dce).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #274      +/-   ##
==========================================
+ Coverage   94.08%   94.12%   +0.04%     
==========================================
  Files           1        1              
  Lines         541      545       +4     
==========================================
+ Hits          509      513       +4     
  Misses         32       32              

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

@benoit74

Copy link
Copy Markdown
Contributor

@Sriram-Nambiar please immediately remove _get_entry_by_id since this will land in a major release, no need to deprecate now and remove later ; should fix the linting issue ^^

@Sriram-Nambiar
Sriram-Nambiar force-pushed the make-get-entry-by-id-public branch from 81f7dce to 27a87ec Compare October 22, 2026 13:38

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

Please fix your first PR comment and the CHANGELOG below

Comment thread CHANGELOG.md Outdated

- Add a CI job building the documentation on every PR/push so this kind of breakage is caught automatically (#279)
- Add support for Python 3.15 (#281)
- Add `Archive.get_entry_by_id()` (#225)

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.

No need for this extra entry, it is already obvious when reading the other CHANGELOG entry

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

i have removed this extra entry and updated the pr

@Sriram-Nambiar
Sriram-Nambiar force-pushed the make-get-entry-by-id-public branch from 27a87ec to b6dad96 Compare October 22, 2026 14:14

This branch has not been deployed

No deployments
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.

Remove private prefix of Archive._get_entry_by_id

2 participants