-
-
Notifications
You must be signed in to change notification settings - Fork 87
feat: add pyproject.toml config provider #1179
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1179 +/- ##
==========================================
- Coverage 89.69% 89.61% -0.09%
==========================================
Files 78 79 +1
Lines 14631 14804 +173
==========================================
+ Hits 13124 13266 +142
- Misses 1507 1538 +31 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
📦 Cargo Bloat ComparisonBinary size change: +0.61% (16.4 MiB → 16.5 MiB) Expand for cargo-bloat outputHead Branch ResultsBase Branch Results |
0880ac7 to
b9bd64c
Compare
|
What do you make of this approach using figment @j178? Figment is a settings provider handling tool - docs I put an initial draft of what this would look like in the PR to see the effect on the size (+1.83% or +0.3MB)
|
c655a64 to
d87dcc8
Compare
d87dcc8 to
beb4e4e
Compare
beb4e4e to
cf99192
Compare
See discussion in SergioBenitez/Figment#148
|
Haven’t looked too closely yet (work’s been crazy busy), but I’m not really a fan of using such a complicated config framework for the pretty simple configs we use in prek. I might take a closer look later, but it’s probably not going to be a high priority for me. |
|
Ahh ok. I see its benefit as simpler handling of configs from multiple places. If there's an alternative that you'd prefer to land support for #1175 with let me know. |
|
I've rewritten without figment in that case, I guess we can add it back if we end up with many providers to handle. Renamed the PR/description accordingly. |
|
Thank you, @lmmx, as always for your great contribution! Since support of |
|
Most welcome and not a problem :) |
Providing config from pyproject.toml as well as env vars and CLI flags
Allows configuration of what were previously env var only settings via pyproject.toml
[tool.prek](closes #1175)