Skip to content
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

Move the function read_file from the ctl module to the SDK. #275

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

dgarros
Copy link
Contributor

@dgarros dgarros commented Feb 19, 2025

Small fix to avoid having infrahub_sdk/yaml.py import a function from the ctl directory.

@dgarros dgarros force-pushed the dga-20250219-fix-read-file branch from 40b24e2 to 760260d Compare February 19, 2025 05:37
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

@@            Coverage Diff             @@
##           stable     #275      +/-   ##
==========================================
- Coverage   70.36%   70.35%   -0.02%     
==========================================
  Files          82       81       -1     
  Lines        7502     7499       -3     
  Branches     1391     1391              
==========================================
- Hits         5279     5276       -3     
  Misses       1849     1849              
  Partials      374      374              
Flag Coverage Δ
integration-tests 22.45% <0.00%> (+<0.01%) ⬆️
python-3.10 45.52% <80.00%> (-0.07%) ⬇️
python-3.11 45.52% <80.00%> (-0.07%) ⬇️
python-3.12 45.52% <80.00%> (-0.07%) ⬇️
python-3.13 45.52% <80.00%> (-0.07%) ⬇️
python-3.9 45.52% <80.00%> (-0.07%) ⬇️
python-filler-3.12 24.00% <20.00%> (+0.04%) ⬆️

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

Files with missing lines Coverage Δ
infrahub_sdk/ctl/exceptions.py 60.00% <ø> (-17.78%) ⬇️
infrahub_sdk/ctl/repository.py 81.57% <100.00%> (ø)
infrahub_sdk/ctl/utils.py 66.42% <100.00%> (ø)
infrahub_sdk/exceptions.py 80.23% <100.00%> (+0.96%) ⬆️
infrahub_sdk/utils.py 78.84% <100.00%> (+0.84%) ⬆️
infrahub_sdk/yaml.py 78.48% <100.00%> (-0.27%) ⬇️

@dgarros dgarros marked this pull request as ready for review February 19, 2025 05:44
@dgarros dgarros requested a review from a team February 19, 2025 05:44
Copy link
Contributor

@ogenstad ogenstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though I think we have a FileNotValidError exception class that we can delete from infrahub_sdk/ctl/exceptions.py as well as a cleanup.

@dgarros dgarros force-pushed the dga-20250219-fix-read-file branch from 760260d to 61adb22 Compare February 20, 2025 05:00
@dgarros dgarros merged commit d9ed642 into stable Feb 20, 2025
15 checks passed
@dgarros dgarros deleted the dga-20250219-fix-read-file branch February 20, 2025 05:12
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.

3 participants