diff --git a/.zenodo.json b/.zenodo.json index 1048cce..7dd8ac2 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -17,6 +17,9 @@ "name": "Linke, David", "orcid": "0000-0002-5898-1820", "affiliation": "Leibniz Institute for Catalysis, Albert-Einstein-Str. 29 A, 18059 Rostock, Germany" + }, + { + "name": "McLoughlin, Noel" } ], "description": "
linkml-project-copier is a modern template for creating LinkML-based data modelling projects on GitHub. Built with copier, it supports lifecycle management, enabling updates of derived projects as the template evolves. The template contains various cross-platform usable recipes to help in day-to-day schema development. One of the first applications of the template is the pid4cat-model, a metadata model for handle-based persistent identifiers.
", diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b9b0a8..da48e0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,14 +15,32 @@ The format is inspired by [Keep a Changelog](https://keepachangelog.com/en/1.1.0 --> ## Unreleased -[Full changelog](https://github.com/linkml/linkml-project-copier/compare/v0.4.1...main) +[Full changelog](https://github.com/linkml/linkml-project-copier/compare/v0.5.0...main) -### Changed +## Release [0.5.0] - 2026-05-27 + +[Full changelog](https://github.com/linkml/linkml-project-copier/compare/v0.4.2...v0.5.0) -- Default `license` is now `Apache-2.0` (was `MIT`). #151 +[0.5.0]: https://github.com/linkml/linkml-project-copier/releases/tag/v0.5.0 ### Added +- Pytest-based integration test suite for the copier template, including + helpers module and CONTRIBUTING.md for the template. #140 +- Submission of releases to the LinkML community on Zenodo. #141 +- List of recommended mkdocs/material extensions in the project mkdocs + configuration. #148 +- Support for Python 3.14 in the template's CI matrix. #160 +- README in the `project/` directory so the folder is tracked even before + generation. #161 (fixes #124) +- Auto-detect WSL2 in `just setup` and advise the user accordingly. #149 +- Copier prompt for an existing custom LICENSE file; when set, the user's + file is preserved and `pyproject.toml`'s `license-files` references it + (using the PEP 639 SPDX expression `LicenseRef-Custom`). #162 (closes #151) +- Add Noel McLoughlin as a co-creator in the Zenodo metadata. #165 +- `tool.ruff` section in `pyproject.toml` excluding auto-generated `_version.py` + and setting the minimum Python version. #170 +- Module docstrings in template `__init__.py` files to avoid ruff D104. #170 - New `existing_license_file` prompt: when set to the path of a license file already present in the project (e.g. `LICENSE.md`, `LICENSE.txt`), the template skips generating a new `LICENSE` and points `license-files` in @@ -33,7 +51,73 @@ The format is inspired by [Keep a Changelog](https://keepachangelog.com/en/1.1.0 ### Fixed -- Fix `uv tool` command that includes jinja2-time into copier. #90 +- `just gen-project` tolerates a missing `project/` directory. #161 +- Generated YAML files (GitHub Actions, mkdocs) and `test_data.py` now pass + default yamllint/ruff checks. #170 +- `just _update-linkml` uses `uv lock` instead of `uv add` to avoid side-effect + of adding linkml as main dependency. #159 +- Reject invalid `project_name` input (e.g. trailing dot, single character) at + the prompt with a friendly message instead of crashing later. #159 +- Force-push to `gh-pages` during docs deployment to avoid history conflicts. #154 +- Align `uv sync` invocation in template workflows. #150 +- Skip ShEx integration test on Python 3.13 and install dependencies in the + integration test fixture. #140 +- Lint test tolerates warnings; example reduced to 4 warnings. #140 + +### Changed + +- Default license for new projects is now Apache-2.0 (was MIT), matching + linkml core. #162 +- Drop Python 3.9 from the supported version matrix; bump minimum Python + requirement to >=3.10. #155 +- Update pre-commit configuration and recommend installing pre-commit via + `pre-commit-uv`. #145 +- Group Dependabot updates into a single monthly PR. #139 +- Update URLs throughout the project to the new linkml monorepo / template + location (README, migration notes, CHANGELOG). #132 +- Cleaner linter defaults: yamllint ignores non-compliant generated files and + uses line-length 88; pre-commit skips `.copier-answers.yml` and pins newer + tool versions. #170 +- Enable `set windows-shell` by default in the template `justfile` + (no-op on Linux/macOS). #170 +- README notes that migrating existing projects should review/merge template + linter configs rather than overwrite. #170 + +## Release [0.4.2] - 2026-02-25 + +[Full changelog](https://github.com/linkml/linkml-project-copier/compare/v0.4.1...v0.4.2) + +[0.4.2]: https://github.com/linkml/linkml-project-copier/releases/tag/v0.4.2 + +### Added + +- Generate TypeScript output and allow regeneration of OWL artifacts. #113 +- `just` improvements: allow overriding generator commands and generating + additional formats. #114 +- mkdocs customizations and pymdown extensions in the generated project. #101 +- Document the `UV_DEFAULT_INDEX` environment variable for custom package + indexes. #97 +- Document handling of the WSL2 `just setup` error in the README. #99 + +### Fixed + +- Fix `uv tool` install command so that `jinja2-time` is included with + copier. #90 +- Disable Jinja interpolation of `{{ }}` in generated outputs to avoid + double-brace breakage. #105 +- `just setup` no longer fails when the working tree is not git-clean. #102 +- Skip the docs-preview action on PRs originating from forks. #111 + +### Changed + +- Adjust README and project metadata for the new home under the `linkml` + GitHub organization (replace `dalito` references, spelling fixes, remove + cookiecutter-era text). #94, #104 +- Update OWL settings in `config.yaml`. #96 +- Improve the docs-preview action and activate it by default. #115 +- Update all GitHub actions in the template to current versions. #108 +- Rename the example schema container slot `entries` to `people`. #110 +- Allow a configurable Python version in the template workflows' matrix. #100 ## Release [0.4.1] - 2025-08-02 @@ -57,7 +141,7 @@ The format is inspired by [Keep a Changelog](https://keepachangelog.com/en/1.1.0 ### Added - New pre-commit command that updates the uv.lock file. #81 -- Automatic publishing of releases to Zenodo ([doi:10.5281/zenodo.15163584](https://doi.org/10.5281/zenodo.15163584)). # +- Automatic publishing of releases to Zenodo ([doi:10.5281/zenodo.15163584](https://doi.org/10.5281/zenodo.15163584)). ### Fixed diff --git a/README.md b/README.md index ecbeae5..e2a60f1 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ 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; -* Set 'export JUST_TEMPDIR=/tmp' on WSL2. +* run 'export JUST_TEMPDIR=/tmp' on WSL2. Setup your project @@ -262,6 +262,6 @@ The code in this repository is distributed under MIT license. ## Acknowledgement -This template was initially authored by David Linke ([dalito](https://github.com/dalito)) for the NFDI4Cat project ([doi:10.5281/zenodo.15163584](https://doi.org/10.5281/zenodo.15163584)) and later adopted here as new default LinkML project template. +This template was initially authored by David Linke ([dalito](https://github.com/dalito)) for the NFDI4Cat project ([doi:10.5281/zenodo.15163584](https://doi.org/10.5281/zenodo.15163584)) and later adopted here as the new default LinkML project template. -[linkml-project-cookiecutter](https://github.com/linkml/linkml-project-cookiecutter) provided a great basis for starting this new linkml project template. +The now archived [linkml-project-cookiecutter](https://github.com/linkml/linkml-project-cookiecutter) served as the starting point for this template. diff --git a/copier.yaml b/copier.yaml index 7e865c5..bd0587d 100644 --- a/copier.yaml +++ b/copier.yaml @@ -9,6 +9,12 @@ project_name: type: str help: What is your project name? default: my-awesome-schema + # Catch invalid input and show a friendly message. + validator: >- + {% if not (project_name | regex_search('^[A-Za-z][A-Za-z0-9 _\-]*[A-Za-z0-9]$', + ignorecase=False)) %} + Use 2+ of letters, digits, space, '-', '_'; start with letter, end alnum. + {% endif %} project_slug: type: str @@ -22,8 +28,7 @@ project_slug: validator: >- {% if not (project_slug | regex_search('^[a-z][_a-z0-9\-]+$', ignorecase=False)) %} - project_slug must start with a lowercase letter, followed by lowercase - letters, digits, dashes or underscores. + Start with a lowercase letter, then lowercase letters, digits, '-' or '_'. {% endif %} email: diff --git a/template/.pre-commit-config.yaml b/template/.pre-commit-config.yaml index e4b0b47..0e6536d 100644 --- a/template/.pre-commit-config.yaml +++ b/template/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: - id: yamllint args: [-c=.yamllint.yaml] exclude: ^\.copier-answers\.yml$ - verbose: true # Show warnings but don't fail the commit. + verbose: true # Show warnings. - repo: https://github.com/codespell-project/codespell rev: v2.4.2 diff --git a/template/src/{{project_slug}}/__init__.py.jinja b/template/src/{{project_slug}}/__init__.py.jinja index cb33d6e..2f38674 100644 --- a/template/src/{{project_slug}}/__init__.py.jinja +++ b/template/src/{{project_slug}}/__init__.py.jinja @@ -1,4 +1,4 @@ -"""{{project_name}} +"""{{project_name}}. {{project_description}} """