Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(copier): enhance copier.yml #681

Open
wants to merge 92 commits into
base: main
Choose a base branch
from
Open

Conversation

34j
Copy link
Contributor

@34j 34j commented Mar 4, 2024

Closes #497

Environmental variables

The following environment variables can be optionally set to save some time and effort:

  • copier.yml
    • PYPACKAGE_TEMPLATE_GITHUB_TOKEN or GITHUB_TOKEN
    • PYPACKAGE_TEMPLATE_GITHUB_USER†
    • PYPACKAGE_TEMPLATE_EMAIL†
    • PYPACKAGE_TEMPLATE_NAME†
  • source/.github/setup-github.bash
    • PYPACKAGE_TEMPLATE_INSTALLATION_IDS (can be empty)

†: If not specified, gets values using github cli.
cli/cli#6096 (comment)

Requires jinja2-env to get enviromental variables.

New Features

  • Create venv and activate it, then install packages
  • Automatically set workflow permissions, branch protection rules and install applications for the repo.
  • Run pre-commit autoupdate
  • Avoid running unnecessary setup commands when running copier update
  • Assume project name from copier command arguments using jinja2-eval
  • Get copyright year using jinja2-time (which depends on arrow)
  • Enable Windows test

Many features depend on each other and are difficult to separate PRs.

Todo

  • update README.md
  • fix sed command error in MacOS
  • test manually
  • understand why only some CI's are git config'd. (because --global flag was not set)
copier copy --trust --vcs-ref refine-copier "gh:34j/pypackage-template"

@34j 34j changed the title feat: enhance copier.yml feat(copier): enhance copier.yml Mar 4, 2024
@34j 34j force-pushed the refine-copier branch from 6ec1792 to 05b1efd Compare March 4, 2024 07:34
@34j 34j marked this pull request as ready for review March 5, 2024 06:53
@34j 34j marked this pull request as draft October 22, 2024 08:13
@34j 34j marked this pull request as draft November 1, 2024 11:39
@34j 34j marked this pull request as ready for review December 20, 2024 09:32
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.

Improvements for copier.yml
2 participants