A pypi release of the MDAT
Project description
poetry_pypi_template
A minimal template for creating a pypi package using poetry and github actions
This template allows the creation of python projects managed by poetry to be submitted to PyPi. All the github actions have been setup too. The github actions run tests on every push and also creates and new pacakage and pushes to the pypi when a merge happens to the release branch.
Just follow the seteps below for an hassle free setup of the project.
Create from the Project Template
- Click here to create a new repo (you need to be logged in to GitHub for this link to work), and follow the instructions to create a new repo from this template.
git cloneyour new repo
Install Poetry in your Environment
- activate your environment.
- install poetry
python -m pip install poetry
Update the Project Toml
- Insert/Update the values in the
pyproject.tomlundertool.poetry - Dont forget to update the desired python version under the
tool.poetry.dependencies - Dont forget to modify the release branch under
tool.semantic_release(assumption ismainis the release branch) - add project dependancies. eg - if you want
numpyas an dependancy simply runpoetry add numpy - install the dependancies by running
poetry install - More information on setting up a project with poetry
Write Code for your python package
- Create a project folder. eg.
hapi_pypihere - add all the code/implemenations in the folder.
Implement the Tests
- Check the functionality of the project folder by implementing tests.
- Implement tests in the
testsfolder. - All the tests should pass when you run the command
poetry run pytest tests/ - Details on how to implement tests with pytest.
Github Actions Configuration
- all the github actions are defined in the
.github/workflowsfolder - setup the
test.yml. Update the env variables according to the project setup before. The default coverage limit is set to 90% ie the test will fail below the coverage of 90.
env:
PYTHON_VERSION: "3.8.5"
PROJECT_FOLDER: hapy_pypi
TEST_FOLDER: tests
COVERAGE_LIMIT: 90
- setup the similar env variables in
release.ymlas well.
Setup Secrets
Pypi Creds
These secrets are used to push releases to the pypi repository.
- Generate a pypi api token
- Set Repo Secrets
- Add
PYPI_USERas__token__ - Add
PYPI_TOKENas the token from above step including thepypi-prefix
Github Token
This secret is required to generate the CHANGELOG.MD and update the version by SemRel.
- Generate a github token
- Set Repo Secrets
- Add
GH_TOKENas the token from github.
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
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 mdatpy-0.0.4.tar.gz.
File metadata
- Download URL: mdatpy-0.0.4.tar.gz
- Upload date:
- Size: 133.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.10.6 Linux/5.15.0-48-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d18a2fc74b45db4b9a63b6a6d290c8bb1a02cc218acf29dcbb1f561093519d9
|
|
| MD5 |
8e45c323ba182be23e2fdeb702b99ddb
|
|
| BLAKE2b-256 |
21e272451faa0315d09a5b5027ca47078dbffbeadc798ad9e2931fc12d30921c
|
File details
Details for the file mdatpy-0.0.4-py3-none-any.whl.
File metadata
- Download URL: mdatpy-0.0.4-py3-none-any.whl
- Upload date:
- Size: 191.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.10.6 Linux/5.15.0-48-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3abd2f058f3d9b7790db79ca76e28d95231ac2ebde6ca1eac089e17edbea964e
|
|
| MD5 |
54078b7ecb2b6d57c8685b63a8de696b
|
|
| BLAKE2b-256 |
b450bb42029038e51f9703f8c3aff6dabafd98dedb5e9c6e1a1d3d3ff6a360ef
|