-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
docs: autogenerate app config docs #5892
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psychedelicious
requested review from
ebr,
lstein,
hipsterusername,
blessedcoolant and
brandonrising
as code owners
March 8, 2024 01:00
github-actions
bot
added
python
PRs that change python files
Root
services
PRs that change app services
python-tests
PRs that change python tests
docs
PRs that change docs
labels
Mar 8, 2024
psychedelicious
force-pushed
the
psyche/docs/config-docstrings
branch
from
March 8, 2024 01:45
671bc88
to
2759194
Compare
brandonrising
force-pushed
the
psyche/docs/config-docstrings
branch
from
March 8, 2024 18:28
2759194
to
60a2a02
Compare
maryhipp
approved these changes
Mar 8, 2024
It's not clear why these are still in the config class.
mkdocs can autogenerate python class docs from its docstrings. Our config is a pydantic model. It's tedious and error-prone to duplicate docstrings from the pydantic field descriptions to the class docstrings. - Add helper function to generate a mkdocs-compatible docstring from the InvokeAIAppConfig class fields
- Add script to call config docstring helper function and write the docstring to the file directly - Add `make` target for this script
The tests were testing deprecated settings (not the settings themselves, just the class's functionality).
brandonrising
force-pushed
the
psyche/docs/config-docstrings
branch
from
March 8, 2024 20:36
c3a899d
to
160fc2d
Compare
brandonrising
approved these changes
Mar 8, 2024
hipsterusername
approved these changes
Mar 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
docs
PRs that change docs
python
PRs that change python files
python-tests
PRs that change python tests
Root
services
PRs that change app services
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Have you updated all relevant documentation?
Description
While iterating on MM2 configs, I wanted to update the docs. This proved very tedious and I discovered the configuration docs were terribly out of date.
This prompted me to automate updating the app config docs. The meat-n-potatoes are these changes:
docs: autogenerated app config docs
mkdocs can autogenerate python class docs from its docstrings. Our config is a pydantic model.
It's tedious and error-prone to duplicate docstrings from the pydantic field descriptions to the class docstrings.
scripts: add script to update config docstring
make
target for this scriptThe docstrings for
InvokeAIAppConfig
now have a test that confirms they are current. If the test fails, you can runmake update-config-docstring
to update the docstrings.The
CONFIGURATION.md
doc is updated to autogenerate docs forInvokeAIAppConfig
. Much of the individual setting documentation is removed, but a few bits that give extra useful context are retained.QA Instructions, Screenshots, Recordings
Run
mkdocs serve
and go toFeatures
->Configuration
to see the docs.Merge Plan
This PR can be merged when approved