Generate ready-to-go Python projects.
Project description
Tyrannosaurus Reqs
An opinionated 2020 Python template.
Just clone it and modify or run tyrannosaurus new
.
⚠ Status: Under development. The template works, but the command-line tool doesn't.
Poetry is fantastic and assumed. New projects are configured for:
- Build: Poetry, Tox, Conda, DepHell, wheels, sdist
- Test: Travis, Tox, pytest, Coverage
- Style: Black, Flake8, MyPy, pycodestyle, pydocstyle
- Hooks: EditorConfig, pre-commit-hooks
- Documentation: ReadTheDocs, Sphinx, sphinx-autoapi
- Publish: Twine, Docker, Conda-Forge (with grayskull)
Synchronize repeated metadata
Provides tyrannosaurus sync
to copy metadata from your pyproject.toml
other config files.
The information copied includes version, description, dependencies, maintainers, and style settings.
You can configure these under [tool.tyrannosaurus.sources]
and [tool.tyrannosaurus.targets]
.
Always generates backups before modifying.
Here are most of the available synchronization targets:
- Copyright, status, and date in
__init__.py
- Development dependencies between
tool.poetry.dev-dependencies
,tool.poetry.extras
, andtox.ini
- An
all
optional dependency list with all optional non-dev packages - Dependencies for building docs in
docs/conf.py
- Code line length between
isort
,black
, andpycodestyle
- Python version in
pyproject.toml
,tox.ini
,.travis.yml
,black
, andreadthedocs.yml
- Copyright in
docs/conf.py
- Poetry version in
Dockerfile
- Authors and year listed in the license file
- Dev versions in
.pre-commit-config.yaml
--maintainers
arg for Grayskull intox.ini
doc_url
,dev_url
, andlicense_file
inmeta.yaml
- Most recent version in
CHANGELOG.md
assuming Keep a Changelog
Reference of commands
Here are some useful commands:
pre-commit install
to configure pre-commit hookstox
to sync metadata, build, install, build docs, and testpoetry install
to install and nothing morepoetry build
to build wheels and sdists and nothing morepoetry bump
to bump dependency versions (major or minor)poetry publish
to upload to PyPigrayskull ${yourprojectname} --maintainers $(git config user.email) --output recipes/
to generate a Conda recipetyrannosaurus sync
to sync metadata and nothing elsetyrannosaurus clean --aggressive
to remove lots of temp files
Other things to set up
- More pre-commit-config options, such as
check-yaml
- GPG keys with git:
git config --global user.signingkey
- GPG keys with Twine: use
twine -s
- A certificate with Certbot if you need one
- Github labels, such as Tyrannosaurus's labels
Uploading to Conda-Forge
To upload a package to Conda-Forge:
- Publish to PyPi, then run
grayskull
as above and thentyrannosaurus sync
. - Check over your new recipe in
recipes/projectname/meta.yaml
. - Fork from staged-recipes.
- Copy your recipe from
recipes/projectname/meta.yaml
into the forked repo (keeping the directories). - Make a pull request. If everything goes well, it will be on Conda-Forge soon!
Suggested standards to observe
Here are some potentially useful standards:
- Semantic Versioning
- Keep a Changelog recommendations.
- Conventional Commits.
- According to taste, only Git rebase (never merge)
Building, extending, and contributing
New issues and pull requests are welcome.
Tyrannosaurus is licensed under the Apache License, version 2.0. The author wrote it after making 18 Git commits trying to configure readthedocs, PyPi, and Tox. This avoids that struggle for 99% of projects.
.++++++++++++.
.++HHHHHHH^^HHH+.
.HHHHHHHHHH++-+-++.
.HHHHHHHHHHH:t~~~~~
.+HHHHHHHHHHjjjjjjjj.
.+NNNNNNNNN/++/:--..
........+NNNNNNNNNN.
.++++BBBBBBBBBBBBBBB.
.tttttttt:.. .++BBBBBBBBBBBBBBBBBBB.
+tt+. `` .+BBBBBBBBBBBBBBBBBBBBB+++cccc.
ttt. .-++BBBBBBBBBBBBBBBBBBBBBB++.ccc.
+ttt++++:::::++++++BBBBBBBBBBBBBBBBBBBBBBB+..++.
.+TTTTTTTTTTTTTBBBBBBBBBBBBBBBBBBBBBBBBB+. .ccc.
.++TTTTTTTTTTBBBBBBBBBBBBBBBBBBBBBBBB+. .cc.
..:++++++++++++++++++BBBBBB++++BBBB.
....... -LLLLL+. -LLLLL.
-LLLL+. -LLLL+.
+LLL+ +LLL+
+LL+ +ff+
+ff++ +++:
++++:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for tyrannosaurus-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95d54eb05491f5127d50802e0ff9e4248e01374cbf9a99e14b2f0e01326aec07 |
|
MD5 | 6026ab79e19997dc29fc70acdffa614b |
|
BLAKE2b-256 | 0f85517e02ff1a2f4492d268e068fac8d33ae80e207bfea50dbb1be0e5d44582 |