From 7a627c40c0d37fe4d25c2527b0ebdc791594fc0f Mon Sep 17 00:00:00 2001 From: Chris Mungall Date: Fri, 31 May 2024 15:25:44 -0700 Subject: [PATCH 1/5] add mknotebooks to pyproject and mkdocs. This allows notebooks to be rendered alongside other documentation. This can be useful for sites that want to include executable examples. --- {{cookiecutter.project_name}}/mkdocs.yml | 2 ++ {{cookiecutter.project_name}}/pyproject.toml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_name}}/mkdocs.yml b/{{cookiecutter.project_name}}/mkdocs.yml index 4a01fff..a73a2d7 100644 --- a/{{cookiecutter.project_name}}/mkdocs.yml +++ b/{{cookiecutter.project_name}}/mkdocs.yml @@ -10,6 +10,8 @@ theme: plugins: - search - mermaid2 + - mknotebooks: + execute: false nav: # - Home: home.md - Index: index.md diff --git a/{{cookiecutter.project_name}}/pyproject.toml b/{{cookiecutter.project_name}}/pyproject.toml index c23ae5f..e0976b8 100644 --- a/{{cookiecutter.project_name}}/pyproject.toml +++ b/{{cookiecutter.project_name}}/pyproject.toml @@ -21,10 +21,12 @@ linkml = "^1.3.5" mkdocs-material = "^8.2.8" mkdocs-mermaid2-plugin = "^0.6.0" schemasheets = "^0.1.14" +jupyter = "^1.0.0" +mknotebooks = "*" [build-system] requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"] build-backend = "poetry_dynamic_versioning.backend" [tool.poetry.extras] -docs = ["linkml", "mkdocs-material"] \ No newline at end of file +docs = ["linkml", "mkdocs-material"] From b6bac39c99cf35c8941e9bf596ce0d1c8cad4dc9 Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Sun, 18 Aug 2024 00:47:25 +0100 Subject: [PATCH 2/5] chore: cookiecutter copy-without-rendor support --- cookiecutter.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cookiecutter.json b/cookiecutter.json index 29ea7ec..0aff389 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -17,5 +17,9 @@ "google_sheet_id": "1wVoaiFg47aT9YWNeRfTZ8tYHN8s8PAuDx5i2HUcDpvQ", "google_sheet_tabs": "personinfo enums", "__google_sheet_module": "{{ cookiecutter.google_sheet_tabs|lower()|replace(' ', '_')|replace('-', '_') }}", - "github_token_for_pypi_deployment": "PYPI_PASSWORD" + "github_token_for_pypi_deployment": "PYPI_PASSWORD", + "_copy_without_render": [ + "src/docs/js/*", + "src/docs/javascript/*" + ] } From 5cba3e5ffad11788817f70c0ad987ce5afa0d180 Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Mon, 19 Aug 2024 14:17:40 +0100 Subject: [PATCH 3/5] chore: add skip section to github action --- .github/workflows/codespell.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 3ebbf55..96a61d0 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -20,3 +20,5 @@ jobs: uses: actions/checkout@v3 - name: Codespell uses: codespell-project/actions-codespell@v2 + with: + skip: '*.js' From 5878d966177e9c7f8e754c723e2a1a22d33b9ae4 Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Sun, 18 Aug 2024 22:22:04 +0100 Subject: [PATCH 4/5] docs: correct/update poetry config --- README.md | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 60038c8..a7da6d3 100644 --- a/README.md +++ b/README.md @@ -18,20 +18,20 @@ The following are required and recommended tools for using this cookiecutter and * **Poetry** - Poetry is a Python project management tool. You will use it in your generated project to manage dependencies and build distribution files. If you have pipx installed you can install Poetry by running: + Poetry is a Python project management tool. You will use it in your generated project to manage dependencies and build distribution files. If you have pipx installed ([alternative installation methods](https://python-poetry.org/docs/#installation) are available) you can install Poetry by running: ```shell pipx install poetry ``` - For other installation methods see: https://python-poetry.org/docs/#installation - * **Poetry behind firewalls** + This project manages project-level configuration. User-level [configuration](https://python-poetry.org/docs/configuration/), if needed, is your responsibility. - In sandboxed environments (proxy or internal repositories), you must configure poetry source in `~/.config/pypoetry/pyproject.toml` to allow software installation, illustrated below: + * **Poetry private repository** + + Sandboxed environments have private pypi repositories. Poetry supports project-level [repository](https://python-poetry.org/docs/repositories/), but it is recommended to configure [this plugin](https://pypi.org/project/poetry-plugin-pypi-mirror) to persist repository across all poetry projects (and avoid cookiecutter failure): ```shell - [[tool.poetry.source]] - name = "myproxy" - url = "https://repo.example.com/repository/pypi-all/simple" - priority = "default" + pip3 install poetry-plugin-pypi-mirror --user + # example, add line to `~/.profile` for persistence + export POETRY_PYPI_MIRROR_URL = "https://pypi-proxy.myorg.com/repository/pypi-all/simple" ``` * **Poetry Dynamic Versioning Plugin**: @@ -113,11 +113,6 @@ Optionally customize your project if needed: * pass arguments to linkml generators via 'config.yaml' configuration file; * pass supported environment variables via '.env.public' configuration file; -* configure proxy server via project configuration file (as illustrated): - ```bash - git init - poetry source add --priority=default myproxy https://repo.example.com/repository/pypi-all/simple - ``` Setup your project ```bash From e0fdb6e2af386444273e920aa5ad22441e0c2229 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Tue, 7 Jan 2025 11:10:56 -0800 Subject: [PATCH 5/5] block pycharm added project config by default --- {{cookiecutter.project_name}}/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_name}}/.gitignore b/{{cookiecutter.project_name}}/.gitignore index e110be5..36c1f4a 100644 --- a/{{cookiecutter.project_name}}/.gitignore +++ b/{{cookiecutter.project_name}}/.gitignore @@ -1,7 +1,7 @@ /docs/ /project/docs/ /tmp/ - +.idea/ # PyCharm files # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod]