-
Notifications
You must be signed in to change notification settings - Fork 0
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
✨ [open-zaak/open-zaak#1649] Command to document envvars #22
Conversation
b5a713c
to
57f12cf
Compare
f2bff21
to
cef41ca
Compare
8710224
to
01a6fac
Compare
@annashamray let me know if this approach is something that you think is worthwhile, I think it could save us a lot of hassle when it comes to documenting envvars (especially those that are used by every project). Here is an example of what it looks like after running the command: https://github.com/maykinmedia/objecttypes-api/blob/66a942d613776cb1766d3da025ce5e321103cf40/docs/env_config.rst |
I quite like it! It also forces you to write what the env variable actually does, which is a good thing for me. |
I'm not sure, since there already were docs for those I excluded them, also because they maybe require a bit more explanation to describe the |
1826777
to
c8277c0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #22 +/- ##
==========================================
+ Coverage 76.00% 82.35% +6.35%
==========================================
Files 4 4
Lines 50 68 +18
==========================================
+ Hits 38 56 +18
Misses 12 12 ☔ View full report in Codecov by Sentry. |
a306feb
to
791e9de
Compare
8082666
to
7202c38
Compare
@annashamray this PR is now ready for review :) |
7202c38
to
22c43ef
Compare
22c43ef
to
2ce02ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
It would be nice to have tests for the command (and perhaps config util but it's optional)
testapp/settings.py
seems like a perfect place to add a couple of settings with env vars
`decouple.config` is overridden to accept help text and several other attributes, as well as to add the loaded environment variables to a registry. This registry is used by the `generate_envvar_docs` management command to generate RST style documentation based on a template. This removes the need for duplication for these envvar docs in all the components that use open-api-framework
2ce02ab
to
c3387c5
Compare
c3387c5
to
2867cb7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Closes open-zaak/open-zaak#1649 partly
TODO: