A python package template with tox testing environments.
Project description
Using this template
- Create a new repository using Github's template interface, or run the following commands:
git clone https://github.com/pcsagan/tethys <your_package_name> cd <your_package_name> rm -rf .git git init .
- Find and replace all instances of
tethysandtethys-templatewith your package name- Your project name can match your package name. The name
tethys-templatewas required becausetethysalready exists on PyPI
- Your project name can match your package name. The name
- Update
pyproject.tomlto reflect its new author and requirements- Update the Security Policy and the Code of Conduct with your e-mail address
- Set the version to a value that hasn't already been published to PyPI (and TestPyPI)
- List of Classifiers
- Configuration for mypy
- Update
tox.inito build the desired testing environments- Configuration for black
- Configuration for flake8
- Configuration for pycodestyle
- Configuration for pydocstyle
- Configuration for pytest
- Configuration for pytest-cov
- Update
cli.pyto customize the command line interface- Documentation for click
- The entry point is defined in the project.scripts table in the
pyproject.tomlfile
- Update
.git/workflows/tests.yamlto specify the various operating systems and python versions used for testing - Install your package dependencies into your development environment
- Install the package locally in editable mode using the command:
pip install -e .
- Install the package locally along with all testing libraries used by
toxwith the command:pip install -r requirements.txt
- Install the package locally in editable mode using the command:
- Add your code to the package while regularly committing your changes to your Github repository
- Add your tests to the
testsdirectory - Test your package using
tox- Run all tasks in their own environments using the command:
tox
- Run specific tasks using
toxwith the-eflag:tox -e black tox -e docs tox -e flake8 tox -e mypy tox -e pycodestyle tox -e pydocstyle tox -e pytest tox -e validate-pyproject
- If you installed the
requirements.txtfile then you can use testing packages in your local environment:black src sphinx-apidoc -f -o docs/source src/<my_package_name> sphinx-build -b html docs/source docs/build/html flake8 src tests mypy src pycodestyle src pydocstyle src pytest tests
- Run all tasks in their own environments using the command:
- Register on PyPI (and TestPyPI) and generate API tokens
- Add your tokens as a secret variable named
pypi_api_tokenandtestpypi_api_tokento your Github repository - Manually run the
Publish Testaction to verify that your token and package version are accepted using TestPyPI - Manually run the
Publishaction to publish your package on PyPI
Help
Usage: tethys [OPTIONS] COMMAND [ARGS]...
Tethys is a moon of Saturn.
Options:
--version Show the version and exit.
--debug Run the command in debug mode.
--help Show this message and exit.
Commands:
data Print the shared context data to the screen.
foo Print the result of calling the foo function to the screen.
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
tethys-template-1.0.3.tar.gz
(10.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tethys-template-1.0.3.tar.gz.
File metadata
- Download URL: tethys-template-1.0.3.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
410f1e462c66d2b86b997320709206d59b4eca395faf9cd51d9f1d3571c49c28
|
|
| MD5 |
b8ba9391c9442e1c2024f0674cc53b22
|
|
| BLAKE2b-256 |
51d29c486ec800013468bdde4297e6afbbeb1654708370b6e3c1ce3749a2cf63
|
File details
Details for the file tethys_template-1.0.3-py3-none-any.whl.
File metadata
- Download URL: tethys_template-1.0.3-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f36bbfb5afc96ffba1f849195f6af4f8d1a20c1e17fa225f2cc2fceea3fbd458
|
|
| MD5 |
16c6c6c1aab492e4209621f59e739623
|
|
| BLAKE2b-256 |
e87f166fe7b2bc10d794522601a92bf1658acc2c0f74c7ea4fd20de9327c9cdc
|