-
-
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
New get-deps
command: infer PyPI dependencies from mkdocs.yml
#3205
Conversation
The user story is that the following command should let you "just build" any MkDocs site: pip install $(mkdocs get-deps) && mkdocs build This cross-references 2 files: * mkdocs.yml - `theme`, `plugins`, `markdown_extensions` * projects.yaml - a registry of all popular MkDocs-related projects and which entry points they provide - downloaded on the fly -and prints the names of Python packages from PyPI that need to be installed to build the current MkDocs project
Thank you @oprypin, that's a great addition! |
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.
Missing n in "dependencies" (first commit summary)
mkdocs/commands/get_deps.py
Outdated
"""Get names of plugins/extensions from the config - in either a list of dicts or a dict.""" | ||
|
||
def dig(cfg, keys: str): | ||
"""Receives a string such 'foo.bar' and returns `cfg['foo']['bar']`, or `NotFound`. |
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.
"""Receives a string such 'foo.bar' and returns `cfg['foo']['bar']`, or `NotFound`. | |
"""Receives a string such as 'foo.bar' and returns `cfg['foo']['bar']`, or `NotFound`. |
get-deps
command: infer PyPI depedencies from mkdocs.ymlget-deps
command: infer PyPI dependencies from mkdocs.yml
Welp, that's staying that way, that commit is very old 🥲 |
It means I can add an |
Yes and it's already there https://github.com/mkdocs/catalog/blob/269c3bfb3ff9e0bb9a7b588e52e227206c914c69/projects.yaml#L258 Or did you have something else in mind? |
Nice! No no, just asking. What do the keys mean in: extra_dependencies:
plugins.mkdocstrings.handlers.crystal: mkdocstrings-crystal
plugins.mkdocstrings.handlers.python: mkdocstrings-python
|
Ah, I think I got it, it's the keys in mkdocs.yml 👍 |
This is inferred from particular config keys The current known plugin in need of this is mkdocstrings (handlers)
The user story is that the following command should let you "just build" any MkDocs site:
This cross-references 2 files:
theme
,plugins
,markdown_extensions
-and prints the names of Python packages from PyPI that need to be installed to build the current MkDocs project
Thanks @pawamoy for inspiration and starting https://github.com/pawamoy/best-of-mkdocs