Skip to content

Add tests for copier template - #140

Merged
amc-corey-cox merged 9 commits into
linkml:mainfrom
dalito:issue8-add-template-tests
Feb 27, 2026
Merged

Add tests for copier template#140
amc-corey-cox merged 9 commits into
linkml:mainfrom
dalito:issue8-add-template-tests

Conversation

@dalito

@dalito dalito commented Feb 15, 2026

Copy link
Copy Markdown
Member

These test only affect the template but do not change the generated project at all.

  • Add a two-tier pytest test suite that validates the copier template itself: fast structural tests (file existence, content, template variable substitution, license variants, boolean option toggling) and slow integration tests that generate a project and run just install, just test, and just lint inside it
  • Add test-template.yml CI workflow with separate structural (Python 3.10-3.13, Linux) and integration (Python 3.10+3.13, Linux + Windows) jobs
  • Add root pyproject.toml with test dependencies (copier, pytest, pyyaml)
  • Add CONTRIBUTING.md for the template

Closes #8

Structural tests validate generated project files, content,
and template variable substitution. Integration tests run
just commands in generated projects. CI workflow runs both.
Strip VIRTUAL_ENV from subprocess env in run_just to prevent
uv venv mismatch warnings. Skip test_just_test on Python >= 3.13
due to upstream pyjsg incompatibility in linkml's ShEx generator.
Allow exit code 1 (warnings-only) from `just lint` and
verify 0 errors / 4 warnings via linkml-lint JSON output.
@dalito
dalito marked this pull request as ready for review February 25, 2026 20:40
@dalito dalito added the _repo Related to the template-repository label Feb 26, 2026

@amc-corey-cox amc-corey-cox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this looks good to me!

@amc-corey-cox
amc-corey-cox merged commit 7e9f7c0 into linkml:main Feb 27, 2026
10 checks passed
@dalito
dalito deleted the issue8-add-template-tests branch February 27, 2026 19:54
@dalito dalito added this to the Release 0.5.0 milestone May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

_repo Related to the template-repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for the template

2 participants