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

Only override default config values if config file exists and is valid #354

Conversation

johannaengland
Copy link
Contributor

Scope and purpose

Fixes something overlooked in #315. In case no config file is given and none exists under the default name the function load_config returns None, which overrides the default values that state.config has before.

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Zino can be found in the
README.

  • Added a changelog fragment for towncrier
    • the oversight has not made it into a release yet
  • Added/amended tests for new/changed code
    • but manually tested
  • Added/changed documentation
  • Linted/formatted the code with black, ruff and isort, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done

@johannaengland johannaengland added the bug Something isn't working label Aug 21, 2024
@johannaengland johannaengland self-assigned this Aug 21, 2024
Copy link

sonarcloud bot commented Aug 21, 2024

Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.63%. Comparing base (3078e55) to head (67323c9).
Report is 26 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #354      +/-   ##
==========================================
+ Coverage   98.60%   98.63%   +0.03%     
==========================================
  Files          77       77              
  Lines        9688     9690       +2     
==========================================
+ Hits         9552     9557       +5     
+ Misses        136      133       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@johannaengland johannaengland merged commit 054171e into Uninett:master Aug 27, 2024
9 of 10 checks passed
@johannaengland johannaengland deleted the config/use-defaults-for-no-config-file branch August 27, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants