xonsh/xontrib-template
Tentang
Full-featured template for building extension (xontrib) for the xonsh shell.
Alat pengembanganYang dapat Anda lakukan
- README with the info and xontrib promotion instructions
- setuptools — classic PEP 621 layout
- poetry — Poetry project layout
- uv — uv-managed project with hatchling backend and PEP 735 dependency groups
Pertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- Mengumpulkan riwayat
- dalam 15 hari
- Mengumpulkan riwayat
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
AsliA template for creating the xonsh extensions called xontribs.
If you like the template, click ⭐ on the repo.
Why use this template?
This template includes a good pack of prebuilt files:
READMEwith the info and xontrib promotion instructionspyproject.tomlfile to make and install PyPi package easily — pick a build backend when prompted bycopier:.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
Create new xontrib
Install copier:
From pip:
pip install copier copier-templates-extensionsFrom xonsh-env (xonsh mamba install):
xpip install copier copier-templates-extensions xbin-add copierFrom uv:
# Start creating a xontrib using a one-liner: uvx --with copier-templates-extensions copier copy --trust gh:xonsh/xontrib-template . # or just install: uv tool install --with copier-templates-extensions copierFrom pipx:
pipx install copier>=9 pipx inject copier copier-templates-extensions
Then create 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
If you have an idea for xontrib but have no time to implement
Development
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 to fix the code, i.e.:
xpip install pre-commit-hooks
pre-commit install # in your xontrib project dir
pre-commit run --all-files black # or isort, etc
Keep in mind that pre-commit-hooks and pre-commit are two distinct PyPI packages. pre-commit must be on your PATH before you try to run the commands above. If you don't have it yet, install it with pipx install pre-commit or uv tool install pre-commit or your system package manager.
Links
Jelajahi proyek terkait
Memuat…