Skip to content

fix: remove deprecated edge methods from SimplicialComplex#696

Merged
leotrs merged 3 commits intodevfrom
remove-deprecated-methods
Mar 5, 2026
Merged

fix: remove deprecated edge methods from SimplicialComplex#696
leotrs merged 3 commits intodevfrom
remove-deprecated-methods

Conversation

@leotrs
Copy link
Collaborator

@leotrs leotrs commented Mar 5, 2026

Summary

  • Removed 5 deprecated methods from SimplicialComplex: add_edge, add_edges_from, add_weighted_edges_from, remove_edge, remove_edges_from
  • These methods previously issued a UserWarning and silently delegated to the simplex equivalents (add_simplex, add_simplices_from, etc.)
  • They now raise XGIError with a message pointing to the correct method

Since SimplicialComplex inherits from Hypergraph, these methods must be explicitly overridden — otherwise the parent's add_edge would be exposed, which would add edges without simplicial closure.

Note: read_json/write_json deprecation is tracked separately in #697.

Test plan

  • All 392 tests pass
  • Doctests pass
  • No tests or internal code used the deprecated methods on SimplicialComplex

🤖 Generated with Claude Code

leotrs and others added 2 commits March 5, 2026 11:58
Replace the 5 deprecated methods (add_edge, add_edges_from,
add_weighted_edges_from, remove_edge, remove_edges_from) with hard
errors pointing users to the simplex equivalents. Previously these
issued a UserWarning and delegated silently, which masked API misuse.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.77%. Comparing base (6e7fe50) to head (672dd76).
⚠️ Report is 23 commits behind head on dev.

Files with missing lines Patch % Lines
xgi/core/simplicialcomplex.py 50.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #696      +/-   ##
==========================================
+ Coverage   93.59%   93.77%   +0.18%     
==========================================
  Files          66       66              
  Lines        5120     5112       -8     
==========================================
+ Hits         4792     4794       +2     
+ Misses        328      318      -10     

☔ View full report in Codecov by Sentry.
📢 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.

…orts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@leotrs leotrs merged commit 91aa386 into dev Mar 5, 2026
17 checks passed
@leotrs leotrs deleted the remove-deprecated-methods branch March 5, 2026 21:13
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.

2 participants