From b7234fe7dd5056c1c609371905d038b7b7cbd07b Mon Sep 17 00:00:00 2001 From: Chen Kasirer Date: Fri, 15 May 2026 14:57:54 +0200 Subject: [PATCH 1/7] migrated to mkdocs --- .gitignore | 3 +- .../docs/_images/PLACEHOLDER | 1 - .../_images/compas_logo_white_transparent.png | Bin 0 -> 7852 bytes {{cookiecutter.project_folder}}/docs/api.rst | 8 - .../docs/api/{{cookiecutter.project_slug}}.md | 1 + .../api/{{cookiecutter.project_slug}}.rst | 9 - .../docs/assets/css/custom.css | 5 + {{cookiecutter.project_folder}}/docs/conf.py | 160 ------------------ .../docs/examples.md | 1 + .../docs/examples.rst | 10 -- {{cookiecutter.project_folder}}/docs/index.md | 17 ++ .../docs/index.rst | 33 ---- .../docs/installation.md | 29 ++++ .../docs/installation.rst | 36 ---- .../docs/license.md | 3 + .../docs/license.rst | 5 - .../docs/tutorial.rst | 3 - {{cookiecutter.project_folder}}/mkdocs.yml | 136 +++++++++++++++ .../requirements-dev.txt | 3 +- .../{{cookiecutter.project_slug}}/__init__.py | 2 +- {{cookiecutter.project_folder}}/tasks.py | 12 +- 21 files changed, 198 insertions(+), 279 deletions(-) delete mode 100644 {{cookiecutter.project_folder}}/docs/_images/PLACEHOLDER create mode 100644 {{cookiecutter.project_folder}}/docs/_images/compas_logo_white_transparent.png delete mode 100644 {{cookiecutter.project_folder}}/docs/api.rst create mode 100644 {{cookiecutter.project_folder}}/docs/api/{{cookiecutter.project_slug}}.md delete mode 100644 {{cookiecutter.project_folder}}/docs/api/{{cookiecutter.project_slug}}.rst create mode 100644 {{cookiecutter.project_folder}}/docs/assets/css/custom.css delete mode 100644 {{cookiecutter.project_folder}}/docs/conf.py create mode 100644 {{cookiecutter.project_folder}}/docs/examples.md delete mode 100644 {{cookiecutter.project_folder}}/docs/examples.rst create mode 100644 {{cookiecutter.project_folder}}/docs/index.md delete mode 100644 {{cookiecutter.project_folder}}/docs/index.rst create mode 100644 {{cookiecutter.project_folder}}/docs/installation.md delete mode 100644 {{cookiecutter.project_folder}}/docs/installation.rst create mode 100644 {{cookiecutter.project_folder}}/docs/license.md delete mode 100644 {{cookiecutter.project_folder}}/docs/license.rst delete mode 100644 {{cookiecutter.project_folder}}/docs/tutorial.rst create mode 100644 {{cookiecutter.project_folder}}/mkdocs.yml diff --git a/.gitignore b/.gitignore index 8cd0df3..569e6d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .vscode -.idea \ No newline at end of file +.idea +.DS_Store \ No newline at end of file diff --git a/{{cookiecutter.project_folder}}/docs/_images/PLACEHOLDER b/{{cookiecutter.project_folder}}/docs/_images/PLACEHOLDER deleted file mode 100644 index 48f73eb..0000000 --- a/{{cookiecutter.project_folder}}/docs/_images/PLACEHOLDER +++ /dev/null @@ -1 +0,0 @@ -# container for images to be included in the docs diff --git a/{{cookiecutter.project_folder}}/docs/_images/compas_logo_white_transparent.png b/{{cookiecutter.project_folder}}/docs/_images/compas_logo_white_transparent.png new file mode 100644 index 0000000000000000000000000000000000000000..5dd158c84d0aeaebe246993a3a6090bc9803e299 GIT binary patch literal 7852 zcmV;d9#i3oP)s0Nakg zcm4YmFTmr`XZ4ByOGM0XNyt%>?T(ziI5XhQ1Z8<(FYIP_JnlYAL_!ks^yG+8jaaXy zEQ|%uh^T8s*hc7y2}nX7mklD^91-qZL_3scM9?*RfhR^F2{}ADaJ~EUa?+BF&nqJ6 z``w?-gk@PYNyz@$Ai_1`y_mE#aq)x*x+3+~UP(gs!=ZRTOk9?^@Qn1-6-m_2Bq6(T z4HP8tx?)6qOESMzBq7_A0XK+%liBQ_Cq&Tqq$#e!Bq0x{*d0srG{?#-Vs@uqdH_kt zr`fRYeWwVs-XpUIGl@^RW?B+ifoeMAzn zkTFjIKe2ZRHR#5YTVx0U)5UXZNrK+7b|G(&itu^ja`f@aK92c?{TQ+C`MxjALXE=( z8yWFB`ks-Y(EZc}nTj)Lj>JSTa58olaMoHEH#yR_{x6qK+Uo%nGyCi(?0K8M9_<8 zEkZ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(sf28tU#^~P5HY8D=7g3E ze+9iBQB4w~%2!&+Jpom&i*lJzg^r2N~iM@#U2^ z+!3*eA$}plz6bRYn|(;?otH%k{Eb_x+Ah8^gLwWq2pRUyD&Jx@z4I-}vprXGq(S}? z;M$*jX1gBCULlwEBs7C=ko(3;yPX z4>3-yCcw3WGFKtPUTD6@&4w$)c~X%CJv9X)uJ42qFi1jxf`~oSr1MXoT+Uvg04wp=#XrX_t_9uz#tn9nh3C2vlJo2 z-qd#41#$>i$Qb&O}~saV1)gMW8=5BZKp27RG9h78>a0!j(KG->}Ge= zme;5`?Lhj9-Fob7cWe)iv8|eOnB3C!#O0WTwe`q{ydahNc6Wpbz}Ikri11j5M&K{( z0~qRq|F6-Ju^+o1{yj$;yVwMK%ro*Ht7(fdEo<(PkI9e<5sRP`r%3`nU=3dDp)|Mi4YxD&&9Mgo2^l8FBy^~n9iI)+{=56BQ`X`X&BBq5(?gG{HC#Nm})8)mE0*)MDe zNfNRhIbwdNadcRo5%E^6WFFX+BxD^MM9>BCdv)i;9U|U(+G5O)BxH9?fXOw<^w#hL z8Ta0kdS5k3$bLzp9!3(cXOfV^ks*Snb<6#yOE$B!DAPG5s zHb}2+{)BxNPoIk#%%Tj~i_|R8I9#Zah>#@YWpOC>b0l#ti2nmA<`vwJUg1ap0000< KMNUMnLSTYD|Am_X literal 0 HcmV?d00001 diff --git a/{{cookiecutter.project_folder}}/docs/api.rst b/{{cookiecutter.project_folder}}/docs/api.rst deleted file mode 100644 index 1cc0e4d..0000000 --- a/{{cookiecutter.project_folder}}/docs/api.rst +++ /dev/null @@ -1,8 +0,0 @@ -******************************************************************************** -API Reference -******************************************************************************** - -.. toctree:: - :maxdepth: 1 - - api/{{cookiecutter.project_slug}} diff --git a/{{cookiecutter.project_folder}}/docs/api/{{cookiecutter.project_slug}}.md b/{{cookiecutter.project_folder}}/docs/api/{{cookiecutter.project_slug}}.md new file mode 100644 index 0000000..563b755 --- /dev/null +++ b/{{cookiecutter.project_folder}}/docs/api/{{cookiecutter.project_slug}}.md @@ -0,0 +1 @@ +# ::: {{ cookiecutter.project_slug }} diff --git a/{{cookiecutter.project_folder}}/docs/api/{{cookiecutter.project_slug}}.rst b/{{cookiecutter.project_folder}}/docs/api/{{cookiecutter.project_slug}}.rst deleted file mode 100644 index 109fcbe..0000000 --- a/{{cookiecutter.project_folder}}/docs/api/{{cookiecutter.project_slug}}.rst +++ /dev/null @@ -1,9 +0,0 @@ -******************************************************************************** -{{cookiecutter.project_slug}} -******************************************************************************** - -.. currentmodule:: {{cookiecutter.project_slug}} - - -.. toctree:: - :maxdepth: 1 diff --git a/{{cookiecutter.project_folder}}/docs/assets/css/custom.css b/{{cookiecutter.project_folder}}/docs/assets/css/custom.css new file mode 100644 index 0000000..2b0551f --- /dev/null +++ b/{{cookiecutter.project_folder}}/docs/assets/css/custom.css @@ -0,0 +1,5 @@ +:root > * { + --md-primary-fg-color: #0092d2; + --md-primary-fg-color--light: #0092d2; + --md-primary-fg-color--dark: #0092d2; +} diff --git a/{{cookiecutter.project_folder}}/docs/conf.py b/{{cookiecutter.project_folder}}/docs/conf.py deleted file mode 100644 index c8ee6ff..0000000 --- a/{{cookiecutter.project_folder}}/docs/conf.py +++ /dev/null @@ -1,160 +0,0 @@ -# flake8: noqa -# -*- coding: utf-8 -*- - -from sphinx.writers import html, html5 -import sphinx_compas2_theme - -# -- General configuration ------------------------------------------------ - -project = "{{ cookiecutter.project_name }}" -copyright = "{{ cookiecutter.copyright }}" -author = "{{ cookiecutter.author_name }}" -package = "{{ cookiecutter.project_slug }}" -organization = "{{ cookiecutter.github_organization }}" - -master_doc = "index" -source_suffix = {".rst": "restructuredtext", ".md": "markdown"} -templates_path = sphinx_compas2_theme.get_autosummary_templates_path() -exclude_patterns = sphinx_compas2_theme.default_exclude_patterns -add_module_names = True -language = "en" - -latest_version = sphinx_compas2_theme.get_latest_version() - -if latest_version == "Unreleased": - release = "Unreleased" - version = "latest" -else: - release = latest_version - version = ".".join(release.split(".")[0:2]) # type: ignore - -# -- Extension configuration ------------------------------------------------ - -extensions = sphinx_compas2_theme.default_extensions -extensions.remove("sphinx.ext.linkcode") - -# numpydoc options - -numpydoc_show_class_members = False -numpydoc_class_members_toctree = False -numpydoc_attributes_as_param_list = True - -# bibtex options - -# autodoc options - -autodoc_type_aliases = {} - -autodoc_typehints = "description" -autodoc_typehints_format = "short" -autodoc_typehints_description_target = "documented" - -autodoc_mock_imports = sphinx_compas2_theme.default_mock_imports - -autodoc_default_options = { - "undoc-members": True, - "show-inheritance": True, -} - -autodoc_member_order = "groupwise" - -autoclass_content = "class" - - -def setup(app): - app.connect("autodoc-skip-member", sphinx_compas2_theme.skip) - - -# autosummary options - -autosummary_generate = True -autosummary_mock_imports = sphinx_compas2_theme.default_mock_imports - -# graph options - -# plot options - -# intersphinx options - -intersphinx_mapping = { - "python": ("https://docs.python.org/", None), - "compas": ("https://compas.dev/compas/latest/", None), -} - -# linkcode - -linkcode_resolve = sphinx_compas2_theme.get_linkcode_resolve(organization, package) - -# extlinks - -extlinks = {} - -# from pytorch - -sphinx_compas2_theme.replace(html.HTMLTranslator) -sphinx_compas2_theme.replace(html5.HTML5Translator) - -# -- Options for HTML output ---------------------------------------------- - -html_theme = "sidebaronly" -html_title = project - -favicons = [ - { - "rel": "icon", - "href": "compas.ico", - } -] - -html_theme_options = { - "icon_links": [ - { - "name": "GitHub", - "url": f"https://github.com/{organization}/{package}", - "icon": "fa-brands fa-github", - "type": "fontawesome", - }, - { - "name": "Discourse", - "url": "http://forum.compas-framework.org/", - "icon": "fa-brands fa-discourse", - "type": "fontawesome", - }, - { - "name": "PyPI", - "url": f"https://pypi.org/project/{package}/", - "icon": "fa-brands fa-python", - "type": "fontawesome", - }, - ], - "switcher": { - "json_url": f"https://raw.githubusercontent.com/{organization}/{package}/gh-pages/versions.json", - "version_match": version, - }, - "check_switcher": False, - "logo": { - "image_light": "_static/compas_icon_white.png", - "image_dark": "_static/compas_icon_white.png", - "text": project, - }, - "navigation_depth": 3, -} - - -html_context = { - "github_url": "https://github.com", - "github_user": organization, - "github_repo": package, - "github_version": "main", - "doc_path": "docs", -} - -html_static_path = sphinx_compas2_theme.get_html_static_path() + ["_static"] -html_css_files = [] -html_extra_path = [] -html_last_updated_fmt = "" -html_copy_source = False -html_show_sourcelink = True -html_permalinks = False -html_permalinks_icon = "" -html_compact_lists = True diff --git a/{{cookiecutter.project_folder}}/docs/examples.md b/{{cookiecutter.project_folder}}/docs/examples.md new file mode 100644 index 0000000..df635b4 --- /dev/null +++ b/{{cookiecutter.project_folder}}/docs/examples.md @@ -0,0 +1 @@ +# Examples diff --git a/{{cookiecutter.project_folder}}/docs/examples.rst b/{{cookiecutter.project_folder}}/docs/examples.rst deleted file mode 100644 index 49e8715..0000000 --- a/{{cookiecutter.project_folder}}/docs/examples.rst +++ /dev/null @@ -1,10 +0,0 @@ -******************************************************************************** -Examples -******************************************************************************** - -.. toctree:: - :maxdepth: 1 - :titlesonly: - :glob: - - examples/* diff --git a/{{cookiecutter.project_folder}}/docs/index.md b/{{cookiecutter.project_folder}}/docs/index.md new file mode 100644 index 0000000..3aa10d7 --- /dev/null +++ b/{{cookiecutter.project_folder}}/docs/index.md @@ -0,0 +1,17 @@ +# {{ cookiecutter.project_name }} + +{{ cookiecutter.project_short_description }} + +## Installation + +Stable releases can be installed from PyPI. + +```bash +pip install {{ cookiecutter.project_slug }} +``` + +## First Steps + +```python +import {{ cookiecutter.project_slug }} +``` diff --git a/{{cookiecutter.project_folder}}/docs/index.rst b/{{cookiecutter.project_folder}}/docs/index.rst deleted file mode 100644 index 35a683d..0000000 --- a/{{cookiecutter.project_folder}}/docs/index.rst +++ /dev/null @@ -1,33 +0,0 @@ -******************************************************************************** -{{cookiecutter.project_slug}} -******************************************************************************** - -.. rst-class:: lead - -{{cookiecutter.project_short_description}} - -.. .. figure:: /_images/ - :figclass: figure - :class: figure-img img-fluid - - -Table of Contents -================= - -.. toctree:: - :maxdepth: 3 - :titlesonly: - - Introduction - installation - tutorial - examples - api - license - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` diff --git a/{{cookiecutter.project_folder}}/docs/installation.md b/{{cookiecutter.project_folder}}/docs/installation.md new file mode 100644 index 0000000..e992f89 --- /dev/null +++ b/{{cookiecutter.project_folder}}/docs/installation.md @@ -0,0 +1,29 @@ +# Installation + +## Stable + +Stable releases are available on PyPI and can be installed with pip. + +```bash +pip install {{ cookiecutter.project_slug }} +``` + +## Latest + +The latest version can be installed from local source. + +```bash +git clone https://github.com/{{ cookiecutter.github_organization }}/{{ cookiecutter.project_slug }}.git +cd {{ cookiecutter.project_slug }} +pip install -e . +``` + +## Development + +To install `{{ cookiecutter.project_slug }}` for development, install from local source with the "dev" requirements. + +```bash +git clone https://github.com/{{ cookiecutter.github_organization }}/{{ cookiecutter.project_slug }}.git +cd {{ cookiecutter.project_slug }} +pip install -e .[dev] +``` diff --git a/{{cookiecutter.project_folder}}/docs/installation.rst b/{{cookiecutter.project_folder}}/docs/installation.rst deleted file mode 100644 index 29ffc82..0000000 --- a/{{cookiecutter.project_folder}}/docs/installation.rst +++ /dev/null @@ -1,36 +0,0 @@ -******************************************************************************** -Installation -******************************************************************************** - -Stable -====== - -Stable releases are available on PyPI and can be installed with pip. - -.. code-block:: bash - - pip install {{ cookiecutter.project_slug }} - - -Latest -====== - -The latest version can be installed from local source. - -.. code-block:: bash - - git clone https://github.com/{{ cookiecutter.github_organization }}/{{ cookiecutter.project_slug }}.git - cd compas_tna - pip install -e . - - -Development -=========== - -To install `{{ cookiecutter.project_slug }}` for development, install from local source with the "dev" requirements. - -.. code-block:: bash - - git clone https://github.com/{{ cookiecutter.github_organization }}/{{ cookiecutter.project_slug }}.git - cd compas_tna - pip install -e ".[dev]" diff --git a/{{cookiecutter.project_folder}}/docs/license.md b/{{cookiecutter.project_folder}}/docs/license.md new file mode 100644 index 0000000..0e8c6fc --- /dev/null +++ b/{{cookiecutter.project_folder}}/docs/license.md @@ -0,0 +1,3 @@ +# License + +--8<-- "LICENSE" diff --git a/{{cookiecutter.project_folder}}/docs/license.rst b/{{cookiecutter.project_folder}}/docs/license.rst deleted file mode 100644 index e6a80ce..0000000 --- a/{{cookiecutter.project_folder}}/docs/license.rst +++ /dev/null @@ -1,5 +0,0 @@ -******************************************************************************** -License -******************************************************************************** - -.. literalinclude:: ../LICENSE diff --git a/{{cookiecutter.project_folder}}/docs/tutorial.rst b/{{cookiecutter.project_folder}}/docs/tutorial.rst deleted file mode 100644 index 34e1184..0000000 --- a/{{cookiecutter.project_folder}}/docs/tutorial.rst +++ /dev/null @@ -1,3 +0,0 @@ -******************************************************************************** -Tutorial -******************************************************************************** diff --git a/{{cookiecutter.project_folder}}/mkdocs.yml b/{{cookiecutter.project_folder}}/mkdocs.yml new file mode 100644 index 0000000..0665ff0 --- /dev/null +++ b/{{cookiecutter.project_folder}}/mkdocs.yml @@ -0,0 +1,136 @@ +site_name: {{ cookiecutter.project_name }} +site_url: https://{{ cookiecutter.github_organization }}.github.io/{{ cookiecutter.project_slug }}/ + +repo_name: {{ cookiecutter.github_organization }} +repo_url: https://github.com/{{ cookiecutter.github_organization }}/{{ cookiecutter.project_slug }}/ + +copyright: Copyright © {{ cookiecutter.copyright }} + +extra: + homepage: https://{{ cookiecutter.github_organization }}.github.io/{{ cookiecutter.project_slug }}/ + version: + provider: mike + +theme: + name: material + palette: + # Palette toggle for light mode + - scheme: default + primary: indigo + accent: indigo + toggle: + icon: material/brightness-7 + name: Switch to dark mode + + # Palette toggle for dark mode + - scheme: slate + primary: indigo + accent: indigo + toggle: + icon: material/brightness-4 + name: Switch to light mode + font: + text: Roboto + code: Roboto Mono + logo: _images/compas_logo_white_transparent.png + favicon: _images/compas_logo_white_transparent.png + features: + - content.code.copy + - content.footnote.tooltips + - navigation.expand + - navigation.footer + - navigation.indexes + - navigation.sections + - navigation.top + - search.highlight + - search.suggest + - toc.follow + +extra_css: + - assets/css/custom.css + +markdown_extensions: + - abbr + - attr_list + - admonition + - footnotes + - md_in_html + - pymdownx.caret + - pymdownx.emoji: + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg + - pymdownx.keys + - pymdownx.mark + - pymdownx.tasklist: + custom_checkbox: true + - pymdownx.tilde + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets: + check_paths: true + - pymdownx.superfences + - toc: + permalink: "ยค" + +plugins: + - search + - mkdocstrings: + default_handler: python + handlers: + python: + paths: [src] + inventories: + - https://docs.python.org/3/objects.inv + - https://compas.dev/compas/latest/objects.inv + options: + allow_inspection: true + backlinks: tree + docstring_options: + ignore_init_summary: true + trim_doctest_flags: true + docstring_style: numpy + docstring_section_style: list + filters: public + group_by_category: true + heading_level: 1 + inherited_members: false + line_length: 88 + merge_init_into_class: true + modernize_annotations: true + parameter_headings: false + preload_modules: [mkdocstrings, compas] + relative_crossrefs: true + scoped_crossrefs: true + separate_signature: true + show_bases: false + show_category_heading: true + show_docstring_attributes: true + show_docstring_functions: true + show_docstring_modules: false + show_if_no_docstring: false + show_inheritance_diagram: false + show_root_heading: true + show_root_full_path: true + show_signature: true + show_signature_annotations: true + show_signature_type_parameters: true + show_source: false + show_submodules: false + show_symbol_type_heading: true + show_symbol_type_toc: true + signature_crossrefs: true + summary: + modules: false + type_parameter_headings: true + unwrap_annotated: true + +nav: + - Home: index.md + - Installation: installation.md + - Examples: examples.md + - API Reference: + - {{ cookiecutter.project_slug }}: api/{{ cookiecutter.project_slug }}.md + - License: license.md diff --git a/{{cookiecutter.project_folder}}/requirements-dev.txt b/{{cookiecutter.project_folder}}/requirements-dev.txt index c03471d..7a1b22f 100644 --- a/{{cookiecutter.project_folder}}/requirements-dev.txt +++ b/{{cookiecutter.project_folder}}/requirements-dev.txt @@ -1,9 +1,8 @@ attrs >=17.4 build bump-my-version -compas_invocations2 +compas_invocations2[mkdocs] invoke >=0.14 ruff -sphinx_compas2_theme twine wheel diff --git a/{{cookiecutter.project_folder}}/src/{{cookiecutter.project_slug}}/__init__.py b/{{cookiecutter.project_folder}}/src/{{cookiecutter.project_slug}}/__init__.py index 47aea8b..ff859bb 100644 --- a/{{cookiecutter.project_folder}}/src/{{cookiecutter.project_slug}}/__init__.py +++ b/{{cookiecutter.project_folder}}/src/{{cookiecutter.project_slug}}/__init__.py @@ -2,4 +2,4 @@ __copyright__ = "{{cookiecutter.copyright}}" __license__ = "MIT License" __email__ = "{{cookiecutter.author_email}}" -__version__ = "0.1.0" +__version__ = "0.0.0" diff --git a/{{cookiecutter.project_folder}}/tasks.py b/{{cookiecutter.project_folder}}/tasks.py index ddabbf4..8e42d0b 100644 --- a/{{cookiecutter.project_folder}}/tasks.py +++ b/{{cookiecutter.project_folder}}/tasks.py @@ -1,33 +1,25 @@ import os from compas_invocations2 import build -from compas_invocations2 import docs +from compas_invocations2 import mkdocs from compas_invocations2 import style from compas_invocations2 import tests from invoke.collection import Collection ns = Collection( - docs.help, style.check, style.lint, style.format, - docs.docs, - docs.linkcheck, + mkdocs.docs, tests.test, tests.testdocs, tests.testcodeblocks, build.prepare_changelog, build.clean, build.release, - build.build_ghuser_components, ) ns.configure( { "base_folder": os.path.dirname(__file__), - "ghuser": { - "source_dir": "src/{{ cookiecutter.project_slug }}_ghpython/components", - "target_dir": "src/{{ cookiecutter.project_slug }}_ghpython/components/ghuser", - "prefix": "{{ cookiecutter.project_slug }}: ", - }, } ) From 92cb57b57ecbc82ee54498f7c9b8ea9f5c023ae1 Mon Sep 17 00:00:00 2001 From: Chen Kasirer Date: Fri, 15 May 2026 14:58:09 +0200 Subject: [PATCH 2/7] removed the jinja extension as not used --- cookiecutter.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/cookiecutter.json b/cookiecutter.json index 2fcb3e1..21a212d 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -8,7 +8,4 @@ "author_email": "", "github_username": "", "github_organization": "", - "_extensions": [ - "jinja2_time.TimeExtension" - ] } \ No newline at end of file From 9eb430fbd9a3639a7c32ca6ced8fc173c84ddcda Mon Sep 17 00:00:00 2001 From: Chen Kasirer Date: Fri, 15 May 2026 15:01:55 +0200 Subject: [PATCH 3/7] removed root tasks, requiements and tests as there isn't actually python code in the template --- requirements.txt | 5 ----- tasks.py | 17 ----------------- tests/test_trivial.py | 2 -- 3 files changed, 24 deletions(-) delete mode 100644 requirements.txt delete mode 100644 tasks.py delete mode 100644 tests/test_trivial.py diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 25bcbdf..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -bump-my-version -compas_invocations2 -invoke >=0.14 -ruff -sphinx_compas2_theme diff --git a/tasks.py b/tasks.py deleted file mode 100644 index 2099b2c..0000000 --- a/tasks.py +++ /dev/null @@ -1,17 +0,0 @@ -from compas_invocations2 import build -from compas_invocations2 import docs -from compas_invocations2 import style -from compas_invocations2 import tests -from invoke.collection import Collection - -ns = Collection( - style.check, - style.lint, - style.format, - docs.docs, - docs.linkcheck, - tests.test, - tests.testdocs, - tests.testcodeblocks, - build.prepare_changelog, -) diff --git a/tests/test_trivial.py b/tests/test_trivial.py deleted file mode 100644 index 50b2c76..0000000 --- a/tests/test_trivial.py +++ /dev/null @@ -1,2 +0,0 @@ -def test_trivial(): - assert True From 8617219d2591059f5f177353fa3dbeefe6fd68c4 Mon Sep 17 00:00:00 2001 From: Chen Kasirer Date: Fri, 15 May 2026 15:02:30 +0200 Subject: [PATCH 4/7] zeroed out version so that first minor release (after bumping) is 0.1.0 --- {{cookiecutter.project_folder}}/pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/{{cookiecutter.project_folder}}/pyproject.toml b/{{cookiecutter.project_folder}}/pyproject.toml index 6fc97ab..64c5a55 100644 --- a/{{cookiecutter.project_folder}}/pyproject.toml +++ b/{{cookiecutter.project_folder}}/pyproject.toml @@ -66,7 +66,6 @@ python_files = ["test_*.py", "*_test.py", "test.py"] addopts = [ "-ra", "--strict-markers", - "--doctest-glob=*.rst", "--tb=short", "--import-mode=importlib", ] @@ -83,7 +82,7 @@ doctest_optionflags = [ # ============================================================================ [tool.bumpversion] -current_version = "0.1.0" +current_version = "0.0.0" message = "Bump version to {new_version}" commit = true tag = true From 3c673b039d40b77ec2686584a87375eb51794d8f Mon Sep 17 00:00:00 2001 From: Chen Kasirer Date: Fri, 15 May 2026 15:02:38 +0200 Subject: [PATCH 5/7] updated github workflows --- {{cookiecutter.project_folder}}/.github/workflows/build.yml | 2 +- {{cookiecutter.project_folder}}/.github/workflows/docs.yml | 4 +++- .../.github/workflows/pr-checks.yml | 4 ++-- {{cookiecutter.project_folder}}/.github/workflows/release.yml | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/{{cookiecutter.project_folder}}/.github/workflows/build.yml b/{{cookiecutter.project_folder}}/.github/workflows/build.yml index 5e9ce0d..6cf3c37 100644 --- a/{{cookiecutter.project_folder}}/.github/workflows/build.yml +++ b/{{cookiecutter.project_folder}}/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: python: ["3.10", "3.11", "3.12"] steps: - - uses: compas-dev/compas-actions.build@v4 + - uses: compas-dev/compas-actions.build@v5 with: python: ${{ '{{' }} matrix.python {{ '}}' }} invoke_lint: true diff --git a/{{cookiecutter.project_folder}}/.github/workflows/docs.yml b/{{cookiecutter.project_folder}}/.github/workflows/docs.yml index df8fbdc..1ac1657 100644 --- a/{{cookiecutter.project_folder}}/.github/workflows/docs.yml +++ b/{{cookiecutter.project_folder}}/.github/workflows/docs.yml @@ -14,6 +14,8 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: compas-dev/compas-actions.docs@v4 + - uses: compas-dev/compas-actions.docs@v5.0.1 with: github_token: ${{ '{{' }} secrets.GITHUB_TOKEN {{ '}}' }} + generator: mkdocs + extras: dev diff --git a/{{cookiecutter.project_folder}}/.github/workflows/pr-checks.yml b/{{cookiecutter.project_folder}}/.github/workflows/pr-checks.yml index b1dffba..25878b5 100644 --- a/{{cookiecutter.project_folder}}/.github/workflows/pr-checks.yml +++ b/{{cookiecutter.project_folder}}/.github/workflows/pr-checks.yml @@ -11,9 +11,9 @@ jobs: name: Check Actions runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v6 - name: Changelog check - uses: Zomzog/changelog-checker@v1.2.0 + uses: Zomzog/changelog-checker@v1.3.0 with: fileName: CHANGELOG.md checkNotification: Simple diff --git a/{{cookiecutter.project_folder}}/.github/workflows/release.yml b/{{cookiecutter.project_folder}}/.github/workflows/release.yml index 6c35830..ed6ad1f 100644 --- a/{{cookiecutter.project_folder}}/.github/workflows/release.yml +++ b/{{cookiecutter.project_folder}}/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: python: ['3.9', '3.10', '3.11'] steps: - - uses: compas-dev/compas-actions.build@v4 + - uses: compas-dev/compas-actions.build@v5 with: python: ${{ '{{' }} matrix.python {{ '}}' }} invoke_lint: true @@ -24,7 +24,7 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: compas-dev/compas-actions.publish@v3 + - uses: compas-dev/compas-actions.publish@v3.1.0 with: pypi_token: ${{ '{{' }} secrets.PYPI {{ '}}' }} github_token: ${{ '{{' }} secrets.GITHUB_TOKEN {{ '}}' }} From 1b091dbad0d6bb674a3a2b43d901e9870f2d61c7 Mon Sep 17 00:00:00 2001 From: Chen Kasirer Date: Fri, 15 May 2026 15:07:14 +0200 Subject: [PATCH 6/7] oops --- cookiecutter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookiecutter.json b/cookiecutter.json index 21a212d..81e16d1 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -7,5 +7,5 @@ "author_name": "", "author_email": "", "github_username": "", - "github_organization": "", + "github_organization": "" } \ No newline at end of file From 3883906729c8aef1044346d58d9f56bd9d6d97f3 Mon Sep 17 00:00:00 2001 From: Chen Kasirer Date: Fri, 15 May 2026 15:09:25 +0200 Subject: [PATCH 7/7] added pytest to dev reqs --- {{cookiecutter.project_folder}}/requirements-dev.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.project_folder}}/requirements-dev.txt b/{{cookiecutter.project_folder}}/requirements-dev.txt index 7a1b22f..f370adf 100644 --- a/{{cookiecutter.project_folder}}/requirements-dev.txt +++ b/{{cookiecutter.project_folder}}/requirements-dev.txt @@ -6,3 +6,4 @@ invoke >=0.14 ruff twine wheel +pytest \ No newline at end of file