Proposal for a notebook for a test case of environment variables list #2538
Replies: 5 comments
-
The above is a BAD idea as what has been discussed. But someone was hinting a similar problem: edgi-govdata-archiving/web-monitoring-diff#27 but it's unanswered. Based on @mtitov @andre-merzky ideas, here are certain ways we can document env variables -
We'll write this wherever this is being used, if used multiple times then might be multiple times, in docstring. We need to write Role Processor in sphinx so, we might be able to get a list of USAGEs of env and we could dereference back from the list of the source.
There is an open question of how this will behave with env variables since a lot of times they are accessed directly like Other URLs which actually creates confusion/ask questions - https://stackoverflow.com/questions/12527783/how-to-create-custom-directives-in-sphinx |
Beta Was this translation helpful? Give feedback.
-
There seems to be an |
Beta Was this translation helpful? Give feedback.
-
Update -
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Given those problems and the effort spent on that topic, maybe we should reconsider the idea to manually compile a page with the relevant set of env variables? As to the specific observations above, I don't really have any useful insight to provide, sorry :-/ |
Beta Was this translation helpful? Give feedback.
-
With a detailed input from @andre-merzky here and previous inputs by @mturilli on #1578 and some with discussion -
Idea: To make a notebook as a test case to ensure the pre-defined list of environment variables are in sync with usage, validity w.r.t. to the codebase.
Covering Cases:
If the environment variable is marked as deprecated in the list, it should not be used in code anymore, so documentation generation would fail.
If the environment variable is present in the list and not getting used anywhere in the codebase, then a warning will be thrown. This is because environment variables are known to be used in a dynamic fashion in code, which is out of scope, for now, so only warning no fail.
Plan:
The single quotes could have been the double-quotes.
Open doubts:
This seems to be a highly volatile task. Since it involves code parsing, less certainty, and could involve known scenarios of env variable usage.
The needs to explore -
Future Scope -
Generate a list of variables from the codebase if possible. Don't know how? Static code parsing won't work.
Get a list of variables from a running RP session, production machine etc.
Beta Was this translation helpful? Give feedback.
All reactions