Skip to content

Fix docstrings copied from sibling packages; bump to 1.1.2 - #18

Merged
iskandr merged 2 commits into
masterfrom
fix-generic-docstrings
Oct 6, 2026
Merged

iskandr merged 2 commits into
masterfrom
fix-generic-docstrings

Conversation

@iskandr

@iskandr iskandr commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #17. Stacked on #19 (the base will retarget to master when #19 merges).

  • Serializable.write_json_file / read_json_file said "VariantCollection", to_json said "Genome", and the class docstring said "PyEnsembl objects". Every subclass inherits these, so they showed up in downstream rendered docs (e.g. PyEnsembl's Genome.read_json_file). They're generic now. Also fixes a code comment that still named the old _KEYWORD_ALIASES hook.
  • Folds in the last two fixes from Fix docs that name the wrong alias attribute and wrong classes #14, which this supersedes: the Serializable class docstring said subclasses need a user-defined to_dict (there's a default one), and the to_serializable_repr helper docstring had a garbled sentence ("wasn't isn't").
  • Adds a write_json_file → read_json_file round-trip test; those two methods had no coverage.
  • Version 1.1.1 (Add reader-oriented docs and executable JSON examples (1.1.1) #19) → 1.1.2.

The README fix this PR originally carried (_KEYWORD_ALIASES → _SERIALIZABLE_KEYWORD_ALIASES) is already in #19, so the rebase dropped it.

https://claude.ai/code/session_01JRDMg3F5kNKmnjv5jvQBgr

@coveralls

coveralls commented Oct 6, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 37522069925

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+2.2%) to 92.0%

Details

  • Coverage increased (+2.2%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 3 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

3 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
serializable.py 3 93.62%

Coverage Stats

Coverage Status
Relevant Lines: 225
Covered Lines: 207
Line Coverage: 92.0%
Coverage Strength: 0.92 hits per line

💛 - Coveralls

@iskandr
iskandr force-pushed the fix-generic-docstrings branch from ef8cf34 to 9ec4a04 Compare October 6, 2026 16:56
@iskandr
iskandr changed the base branch from master to docs/reader-oriented-guides October 6, 2026 16:56
@iskandr iskandr changed the title Fix docstrings copied from sibling packages; bump to 1.1.1 Fix docstrings copied from sibling packages; bump to 1.1.2 Oct 6, 2026
@iskandr
iskandr changed the base branch from docs/reader-oriented-guides to master October 6, 2026 19:50
Serializable's inherited docstrings named VariantCollection, Genome and
PyEnsembl, which leaked into downstream API docs (e.g. PyEnsembl's
Genome.read_json_file). Make them generic, and fix a code comment that
still named the old `_KEYWORD_ALIASES` hook.

Adds a write_json_file/read_json_file round-trip test (previously
uncovered).

Fixes #17

Claude-Session: https://claude.ai/code/session_01JRDMg3F5kNKmnjv5jvQBgr
Serializable provides a default to_dict, so it doesn't need a user-defined
one; also fix the grammar in to_serializable_repr's helper docstring.

Claude-Session: https://claude.ai/code/session_01JyZ1WTFWJ3EZ41QdYzKwGP
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.

Serializable.read_json_file / write_json_file docstrings say "VariantCollection"

2 participants