Skip to content

Add license picker - #6

Open
C-Achard wants to merge 1 commit into
mainfrom
cy/license-picker
Open

C-Achard wants to merge 1 commit into
mainfrom
cy/license-picker

Conversation

@C-Achard

@C-Achard C-Achard commented Nov 4, 2026

Copy link
Copy Markdown
Contributor
  • Introduced license options: Apache-2.0, MIT, and BSD-3-Clause.
  • Updated CLI to prompt for license selection and include it in generated files.
  • Modified README, pyproject.toml, and myst.yml templates to reflect chosen license.
  • Added LICENSE files for MIT and BSD-3-Clause.
  • Tests to verify license functionality and defaults.

@C-Achard
C-Achard added this pull request to stack #4 November 4, 2026 10:19
@C-Achard C-Achard self-assigned this Nov 4, 2026
Base automatically changed from cy/scene-template-mkdocs to main November 4, 2026 15:26
- Introduced license options: Apache-2.0, MIT, and BSD-3-Clause.
- Updated CLI to prompt for license selection and include it in generated files.
- Modified README, pyproject.toml, and myst.yml templates to reflect chosen license.
- Added LICENSE files for MIT and BSD-3-Clause.
- Enhanced tests to verify license functionality and defaults.
@C-Achard
C-Achard requested review from deruyter92 and a balanced review from Copilot November 4, 2026 15:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The license-selection wording is ambiguous because it presents --license as a fourth license rather than a flag for choosing one of the three licenses.

1 open issue
What changed in this PR

Adds license selection to the project generator, keeping generated license text, package metadata, and documentation aligned.

Changes:

  • Supports Apache-2.0, MIT, and BSD-3-Clause through an interactive prompt or --license, with Apache-2.0 as the default.
  • Adds license-specific files and fills in the year and author for MIT and BSD-3-Clause.
  • Documents selection and adds tests for license propagation, defaults, and invalid choices.
File Description
tests/​test_cli.py Tests license selection, generated content, defaults, and rejection of unsupported choices.
src/​scene_repo_template/​skeleton/​licenses/​MIT/​LICENSE.tmpl Adds MIT text with year and author placeholders.
src/​scene_repo_template/​skeleton/​licenses/​BSD-3-Clause/​LICENSE.tmpl Adds BSD-3-Clause text with copyright placeholders.
src/​scene_repo_template/​skeleton/​licenses/​Apache-2.0/​LICENSE Supplies Apache-2.0 text for license-specific generation.
src/​scene_repo_template/​skeleton/​jupyter-book/​docs/​myst.yml.tmpl Uses the selected license in Jupyter Book metadata.
src/​scene_repo_template/​skeleton/​common/​README.md.tmpl Names the selected license in generated READMEs.
src/​scene_repo_template/​skeleton/​common/​pyproject.toml.tmpl Sets package metadata to the selected license.
src/​scene_repo_template/​cli.py Adds license choices, shared choice prompting, and license-file generation.
docs/​guides/​using-the-template.md Explains supported licenses and how to change them.

Review effort: Balanced


Projects start with Apache-2.0.
To change it, replace `LICENSE` and update every place that names the license:
The template supports Apache-2.0 (the default), MIT or BSD-3-Clause, or `--license`.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants