Skip to content

Split node.py into multiple files #409

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 3 commits into from
May 17, 2025
Merged

Split node.py into multiple files #409

merged 3 commits into from
May 17, 2025

Conversation

dgarros
Copy link
Contributor

@dgarros dgarros commented May 12, 2025

This PR is splitting the node.py into multiple files, it's currently close to 800 lines long.

To reduce the risk of side effect, I haven't changed the content of the file, with the exception that in some places we are now using Protocols to avoid some circular dependencies.

The change is expected to be backward compatible because everything that was part of node.py is exposed from infrahub_sdk.node

Copy link

cloudflare-workers-and-pages bot commented May 12, 2025

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5a27695
Status: ✅  Deploy successful!
Preview URL: https://f0a0dae1.infrahub-sdk-python.pages.dev
Branch Preview URL: https://dga-20250512-node.infrahub-sdk-python.pages.dev

View logs

Copy link

codecov bot commented May 12, 2025

Codecov Report

Attention: Patch coverage is 82.62712% with 82 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
infrahub_sdk/node/relationship.py 71.61% 30 Missing and 14 partials ⚠️
infrahub_sdk/node/related_node.py 87.16% 10 Missing and 9 partials ⚠️
infrahub_sdk/protocols_base.py 56.52% 0 Missing and 10 partials ⚠️
infrahub_sdk/node/attribute.py 94.87% 2 Missing and 2 partials ⚠️
infrahub_sdk/node/parsers.py 63.63% 3 Missing and 1 partial ⚠️
infrahub_sdk/node/property.py 92.85% 0 Missing and 1 partial ⚠️
@@             Coverage Diff             @@
##           develop     #409      +/-   ##
===========================================
+ Coverage    75.10%   75.16%   +0.06%     
===========================================
  Files           93      100       +7     
  Lines         8560     8613      +53     
  Branches      1678     1689      +11     
===========================================
+ Hits          6429     6474      +45     
+ Misses        1677     1676       -1     
- Partials       454      463       +9     
Flag Coverage Δ
integration-tests 34.20% <34.74%> (-0.23%) ⬇️
python-3.10 47.23% <48.09%> (-0.27%) ⬇️
python-3.11 47.23% <48.09%> (-0.27%) ⬇️
python-3.12 47.20% <48.09%> (-0.30%) ⬇️
python-3.13 47.23% <48.09%> (-0.27%) ⬇️
python-3.9 45.56% <48.09%> (-0.24%) ⬇️
python-filler-3.12 24.61% <29.23%> (+0.34%) ⬆️

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

Files with missing lines Coverage Δ
infrahub_sdk/node/__init__.py 100.00% <100.00%> (ø)
infrahub_sdk/node/constants.py 100.00% <100.00%> (ø)
infrahub_sdk/node/node.py 76.56% <100.00%> (ø)
infrahub_sdk/store.py 76.43% <100.00%> (ø)
infrahub_sdk/node/property.py 92.85% <92.85%> (ø)
infrahub_sdk/node/attribute.py 94.87% <94.87%> (ø)
infrahub_sdk/node/parsers.py 63.63% <63.63%> (ø)
infrahub_sdk/protocols_base.py 73.64% <56.52%> (-4.14%) ⬇️
infrahub_sdk/node/related_node.py 87.16% <87.16%> (ø)
infrahub_sdk/node/relationship.py 71.61% <71.61%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dgarros dgarros marked this pull request as ready for review May 12, 2025 13:58
@dgarros dgarros requested a review from a team May 12, 2025 13:59
@dgarros dgarros force-pushed the dga-20250512-node branch from 6fffea9 to 5a27695 Compare May 17, 2025 04:52
@dgarros dgarros changed the base branch from stable to develop May 17, 2025 04:53
@dgarros dgarros merged commit 216a6c6 into develop May 17, 2025
18 checks passed
@dgarros dgarros deleted the dga-20250512-node branch May 17, 2025 05:00
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