refactor: mark read_json/write_json as internal helpers (#697)#738
Open
leotrs wants to merge 1 commit into
Open
refactor: mark read_json/write_json as internal helpers (#697)#738leotrs wants to merge 1 commit into
leotrs wants to merge 1 commit into
Conversation
These functions were already removed from the public API (in #692) but still lived under public names and emitted DeprecationWarnings that users could no longer act on. They cannot simply be deleted because xgi-data datasets are still stored in the legacy hypergraph-dict JSON format and xgi_data.py needs to read/write them. This commit completes the Option 1 path agreed in #697: - Rename read_json -> _read_json and write_json -> _write_json - Remove from __all__ (was empty after #692 anyway, now explicit) - Drop the DeprecationWarning calls (advice was misleading: the internal callers had nowhere else to go) - Update the only internal caller (xgi_data.py) to use the new names - Update See Also references in hypergraph_dict.py to point at read_hif / write_hif instead - Tests adjusted to import via aliases Once xgi-data migrates fully to HIF (issue separate), the two helpers can be deleted entirely. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #738 +/- ##
==========================================
+ Coverage 93.65% 94.58% +0.93%
==========================================
Files 66 66
Lines 5168 5268 +100
==========================================
+ Hits 4840 4983 +143
+ Misses 328 285 -43 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #697 (Option 1 path).
`read_json`/`write_json` had already been pulled from the top-level public API in #692 but still lived under public names and emitted `DeprecationWarning`s. The advice in those warnings ('use `read_hif`/`write_hif` instead') was misleading for the only remaining caller — `xgi_data.py` — because xgi-data still stores datasets in the legacy hypergraph-dict JSON format, not HIF, and the internal caller had nowhere else to go.
This PR completes the cleanup:
Once xgi-data finishes migrating to HIF (tracked separately by Nich/Dan), these helpers can be deleted entirely.
Test plan