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

Improve IPAConfig #183

Merged
merged 5 commits into from
Oct 7, 2024
Merged

Improve IPAConfig #183

merged 5 commits into from
Oct 7, 2024

Conversation

imagejan
Copy link
Member

  • Add method to prompt for fields on an IPAConfig (or pydantic.BaseModel) instance, using questionary and validating directly with pydantic.
  • Add methods to save and load an IPAConfig model.

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 95.15152% with 8 lines in your changes missing coverage. Please review.

Project coverage is 93.47%. Comparing base (932f0a6) to head (300ddd9).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/faim_ipa/utils.py 91.20% 6 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #183      +/-   ##
==========================================
+ Coverage   92.99%   93.47%   +0.48%     
==========================================
  Files          55       55              
  Lines        3481     3630     +149     
  Branches      353      376      +23     
==========================================
+ Hits         3237     3393     +156     
+ Misses        232      223       -9     
- Partials       12       14       +2     

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

src/faim_ipa/utils.py Show resolved Hide resolved
src/faim_ipa/utils.py Show resolved Hide resolved
src/faim_ipa/utils.py Show resolved Hide resolved
src/faim_ipa/utils.py Outdated Show resolved Hide resolved
This feature only works in Python 3.12+
Default to get_git_root as reference for storing relative paths.
For validating user input and handling paths in the config, we consistently use absolute paths.
Only for serialization, paths are converted relative to the reference directory.
@imagejan imagejan merged commit d3f4b15 into main Oct 7, 2024
12 checks passed
@imagejan imagejan deleted the pydantic-questionary branch October 7, 2024 10:20
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