-
Notifications
You must be signed in to change notification settings - Fork 18
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
Proposal for cookiecutting sandboxed environments #118
Comments
An alternative to modifying the project is to add a poetry config file for the system/user, see https://python-poetry.org/docs/configuration/ I do this plus use a global (company wide) |
Agree - thanks for confirming so cookiecutter is not good solution for poetry nuances! The remaining issue is blocked CDN. |
The documentation describes three possible ways to load mermaid2:
POSSIBLE SOLUTION If we included a snapshot in cookiecutter.json (allow some people to choose local library)
mkdocs.yaml (version may not match local JS but this is nuance)
|
Ok. I had another look how I did it: I use a plugin poetry-plugin-pypi-mirror. Sorry, completely forgot about the plugin. The [virtualenvs]
in-project = true
[plugins]
[plugins.pypi_mirror]
# https://jacobhenner.com/2022/11/pypi-mirror-support-in-poetry/
# Plugin must be installed with "poetry self add poetry-plugin-pypi-mirror"
# or "pipx inject poetry poetry-plugin-pypi-mirror"
url = "https://pypi-mirror.example.com/group/stable/+simple/" |
When using this tool in a sandboxed environment there are issues with poetry and mkdocs.
Problems.
Poetry: Our README states:
In sandboxed environments (proxy or internal repositories), you must configure poetry source in
~/.config/pypoetry/pyproject.toml
to allow software installationMkdocs: CDN is blocked so cannot retrieve
mermaid.min.js
Potential solution
One solution updating
cookiecutter.json
to model a sandboxed user (default "no"):Poetry: We could manage poetry repository using cookiecutter rendering. However, poetry repository can also be supplied by environment variable instead.
CDN: Cookiecutter seems only solution. The documentation suggests we could render correct mermaid source in
mkdocs.yml
by defaulting to standard CDN but allowing sandboxed user to say I need (a) different CDN/version OR (b) I need to use localsrc/docs/mermaid.min.js
file.I need to do some testing on both issues.
The text was updated successfully, but these errors were encountered: