Skip to content

Conversation

@dgarros
Copy link
Contributor

@dgarros dgarros commented Oct 15, 2024

Related to opsmill/infrahub#4234

In order to use a different package name within Infrahub, we need to convert the internal hardcoded import paths into relative paths.

@codecov
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 57.47126% with 74 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
infrahub_sdk/client.py 0.00% 18 Missing ⚠️
infrahub_sdk/__init__.py 0.00% 12 Missing ⚠️
infrahub_sdk/node.py 0.00% 6 Missing ⚠️
infrahub_sdk/config.py 0.00% 5 Missing ⚠️
infrahub_sdk/schema.py 0.00% 5 Missing ⚠️
infrahub_sdk/branch.py 0.00% 3 Missing ⚠️
infrahub_sdk/query_groups.py 0.00% 3 Missing ⚠️
infrahub_sdk/checks.py 0.00% 2 Missing ⚠️
infrahub_sdk/playback.py 0.00% 2 Missing ⚠️
infrahub_sdk/pytest_plugin/plugin.py 0.00% 2 Missing ⚠️
... and 16 more
@@           Coverage Diff            @@
##           develop      #80   +/-   ##
========================================
  Coverage    43.28%   43.28%           
========================================
  Files           74       74           
  Lines         6847     6847           
  Branches      1353     1353           
========================================
  Hits          2964     2964           
- Misses        3552     3614   +62     
+ Partials       331      269   -62     
Flag Coverage Δ
python-3.10 43.28% <57.47%> (ø)
python-3.11 43.28% <57.47%> (ø)
python-3.12 43.28% <57.47%> (ø)
python-3.9 43.23% <57.47%> (ø)

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

Files with missing lines Coverage Δ
infrahub_sdk/code_generator.py 25.39% <100.00%> (ø)
infrahub_sdk/ctl/branch.py 76.81% <100.00%> (ø)
infrahub_sdk/ctl/check.py 27.00% <100.00%> (ø)
infrahub_sdk/ctl/cli_commands.py 37.05% <100.00%> (ø)
infrahub_sdk/ctl/client.py 47.61% <100.00%> (ø)
infrahub_sdk/ctl/exporter.py 52.17% <100.00%> (ø)
infrahub_sdk/ctl/generator.py 21.56% <100.00%> (ø)
infrahub_sdk/ctl/importer.py 55.00% <100.00%> (ø)
infrahub_sdk/ctl/menu.py 65.38% <100.00%> (ø)
infrahub_sdk/ctl/object.py 65.38% <100.00%> (ø)
... and 40 more

@dgarros dgarros added type/feature New feature or request type/housekeeping Maintenance task and removed type/feature New feature or request labels Oct 15, 2024
@ogenstad
Copy link
Contributor

I think we might run into issues with this:

https://github.com/opsmill/infrahub-sdk-python/blob/develop/infrahub_sdk/schema.py#L111-L112

When we import the generators from the Git Agent and run this check on the imported objects we're probably going to get a mismatch. I still think we can move forward with this PR, but potentially we'll need to switch to using a protocol definition instead of pointing to the expected base class.

@dgarros dgarros requested a review from a team October 17, 2024 17:06
@dgarros dgarros marked this pull request as ready for review October 17, 2024 17:06
@dgarros
Copy link
Contributor Author

dgarros commented Oct 17, 2024

I think we might run into issues with this:

https://github.com/opsmill/infrahub-sdk-python/blob/develop/infrahub_sdk/schema.py#L111-L112

When we import the generators from the Git Agent and run this check on the imported objects we're probably going to get a mismatch. I still think we can move forward with this PR, but potentially we'll need to switch to using a protocol definition instead of pointing to the expected base class.

This is a good point, I'll check that

@dgarros dgarros merged commit 7040f72 into develop Oct 17, 2024
12 checks passed
@dgarros dgarros deleted the dga-20241015 branch October 17, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/housekeeping Maintenance task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants