Skip to content

🐛 Fix cyclic imports #1443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Apr 26, 2025
Merged

🐛 Fix cyclic imports #1443

merged 20 commits into from
Apr 26, 2025

Conversation

ubmarco
Copy link
Member

@ubmarco ubmarco commented Apr 22, 2025

This PR fixes circular SN imports by moving exceptions.py to the root.

A test case was added to prevent this in future.

Note

Ruff might support this in future: astral-sh/ruff#2914

@ubmarco ubmarco changed the title 🧪 Cleanup sphinx_needs sys modules 🧪 Cleanup sys modules between tests Apr 22, 2025
Copy link

codecov bot commented Apr 22, 2025

Codecov Report

Attention: Patch coverage is 94.87179% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.56%. Comparing base (4e10030) to head (1898050).
Report is 129 commits behind head on master.

Files with missing lines Patch % Lines
sphinx_needs/config.py 0.00% 1 Missing ⚠️
sphinx_needs/exceptions.py 95.65% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1443      +/-   ##
==========================================
+ Coverage   86.87%   88.56%   +1.68%     
==========================================
  Files          56       61       +5     
  Lines        6532     7242     +710     
==========================================
+ Hits         5675     6414     +739     
+ Misses        857      828      -29     
Flag Coverage Δ
pytests 88.56% <94.87%> (+1.68%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ubmarco ubmarco changed the title 🧪 Cleanup sys modules between tests 🧪 Isolate sys modules for tests, fix cyclic imports Apr 22, 2025
@ubmarco ubmarco requested a review from chrisjsewell April 22, 2025 20:43
@ubmarco ubmarco marked this pull request as ready for review April 22, 2025 20:56
@ubmarco ubmarco changed the title 🧪 Isolate sys modules for tests, fix cyclic imports 🐛 Fix cyclic imports Apr 24, 2025
@ubmarco ubmarco force-pushed the mh-test-cleanup-sys branch from 5400c5a to 8a35842 Compare April 26, 2025 10:47
@chrisjsewell chrisjsewell merged commit 500a448 into master Apr 26, 2025
19 checks passed
@chrisjsewell chrisjsewell deleted the mh-test-cleanup-sys branch April 26, 2025 11:06
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