-
Notifications
You must be signed in to change notification settings - Fork 6
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
[#2297] Add documentation for automating configurations #1150
Conversation
dc750d6
to
56a9628
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1150 +/- ##
===========================================
- Coverage 95.18% 95.17% -0.01%
===========================================
Files 956 958 +2
Lines 34603 34750 +147
===========================================
+ Hits 32937 33075 +138
- Misses 1666 1675 +9 ☔ View full report in Codecov by Sentry. |
00051a2
to
4fca189
Compare
c15fb7e
to
0a3b142
Compare
3bc5139
to
9653cdd
Compare
a8e94fb
to
a14f561
Compare
src/open_inwoner/configurations/management/commands/create_docs.py
Outdated
Show resolved
Hide resolved
d609e5d
to
62d5e08
Compare
src/open_inwoner/configurations/management/commands/create_docs.py
Outdated
Show resolved
Hide resolved
9e33830
to
f78f67e
Compare
0d62a80
to
5579bb4
Compare
87c07d0
to
8a698bf
Compare
8a698bf
to
185d817
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.
Just the final comment regarding the descriptions for JSONFields and PrivateMediaFileFields, if that is addressed I'll approve :)
def get_model_fields(self, model) -> Iterator[Any]: | ||
return ( | ||
field | ||
for field in model._meta.concrete_fields |
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.
Hmm you're right, I see it fails on configurations.customfontset
for example. Can you make a separate issue for this to check if we need to handle these relations?
config_field.name in self.included_fields | ||
and config_field not in self.excluded_fields |
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.
Can you make a separate issue for this or add a TODO?
1061410
to
8c8faa8
Compare
@stevenbal I simplified the filtering of config fields. Think we can double-check this when we migrate to the library. The migration user story now has an issue for checking the handling relational fields: https://taiga.maykinmedia.nl/project/open-inwoner/task/2437 |
@Bartvaderkin please re-review this PR, imho we can merge this in without the CMS envvars |
match field_type: | ||
case item if item in BasicFieldDescription.names: | ||
return getattr(BasicFieldDescription, field_type) | ||
case _: | ||
return "No information available" |
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.
This could be a normal if/else statement that would be readable at a glance.
Documentation for configuration setup via environment variables:
Docs are generated by running
python src/manage.py generate_config_docs
. Pass one of the supported options ("siteconfig", "kic", "zgw", "digid_oidc", "eherkenning_oidc") to generate docs for a specific config, or run the command without arguments to generate all.The docs are made available under `docs/configuration/".
Taiga: #2297
Related: