GitHub - joaopalmeiro/template-python-package: Opinionated Python template for new packages. (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
template-python-package
Opinionated Python template for new packages.
Getting Started
- Go to or create the package folder.
- Get the template files:
npx degit github:joaopalmeiro/template-python-package
or
npx degit github:joaopalmeiro/template-python-package --force
- Search for
template-python-package
and replace it with the package name. Ignore the template repository URL in the NOTES.md file. - Search for
template_python_package
and replace it with the underscored version of the package name. - Search for
Opinionated Python template for new packages.
and replace it with the (short) package description. - Search for
João Palmeiro
and replace it with the author's name. - Search for
joaopalmeiro@proton.me
and replace it with the author's email address. - Open the pyproject.toml file and add the package-specific dependencies. See the Dependency configuration and Environment configuration pages in the Hatch documentation for more information (if necessary).
- Update the
Source code
link at the top to the package repository link (if necessary). - Change
GitHub
in the Deployment section toGitLab
orCodeberg
and update the link to the corresponding Tags page (if necessary). - Update the
Issues
andSource
fields in the pyproject.toml file with their respective repository-related links (if necessary). - Remove
hatch-demo/
from the .gitignore file. - Delete the TEMPLATE.md file.
- Delete the Getting Started section.
Development
Install pyenv (if necessary).
pyenv install && pyenv versions
pip install hatch==1.12.0 && hatch --version
hatch config set dirs.env.virtual .hatch
Deployment
echo "v$(hatch version)" | pbcopy
- Commit and push changes.
- Create a tag on GitHub Desktop.
- Check GitHub.
- Check PyPI.