A template for creating the xonsh contributions called xontribs.
If you like the template click ⭐ on the repo.
This template includes good pack of prebuilt files:
READMEwith the info and xontrib promotion instructionsPEP 621orpoetrybasedpyproject.tomlfile to make and install PyPi package easily.gitattributesfile to enable Github syntax highlighting for*.xshfiles.gitignorefile with standard list of directories to ignore.github/workflow/push-test.ymlto automatically test the code using Github Actions.github/*_template.mdfiles to create Github templates for the text of issue and PR..github/FUNDING.ymlfile with template for Github sponsorship button..pre-commit-config.yamlfile with pre-commit-hooksMANIFEST.infile to make Conda feedstock easilyLICENSEfile with standard MIT licensetests/with the test suite
Install copier:
xpip install copier jinja2-time cookiecutter
# OR using pipx (https://pypa.github.io/pipx/):
pipx install copier>=9
pipx inject copier copier-templates-extensionsCreate your new xontrib:
copier copy --trust gh:xonsh/xontrib-template .Advent of PEP-621
Older projects can use the following tools to upgrade their setup to use pyproject.toml
- https://github.com/asottile/setup-py-upgrade
- https://ini2toml.readthedocs.io/en/latest/setuptools_pep621.html
- https://validate-pyproject.readthedocs.io/
- https://github.com/denkiwakame/py-tiny-pkg
copierselects the latest tag when--vcs-refoption is not given. So it is important to tag the main branch after important template updates.
How to fix pre-commit-hooks
If you're using .pre-commit-config.yaml and have an error during testing you need fix the code i.e.:
xpip install pre-commit-hooks
pre-commit run --all-files black # or isort, etc