NWON Python baseline package
This package provides some basic python functions that can be used across several projects.
The dependencies of the project are kept to a minimum in order to prevent version conflicts with other projects.
Package is meant for internal use at NWON as breaking changes may occur on version changes. This may change at some point but not for now 😇.
Development Setup
We recommend developing using poetry.
This are the steps to setup the project with a local virtual environment:
- Tell poetry to create dependencies in a
.venvfolder withing the project:poetry config virtualenvs.in-project true - Create a virtual environment using the local python version:
poetry env use $(cat .python-version) - Install dependencies:
poetry install
Prepare Package
As we want to include types with the package it is not as straight forward as just calling poetry build 😥.
We need to:
- Clean dist folder
- Bump up the version of the package
- Build the package
Luckily we provide a script for doing all of this python scripts/prepare.py patch. Alternatively you can run the script in a poetry context poetry run prepare patch. The argument at the end defines whether you want a patch, minor or major version bump.
The final zipped data ends up in the dist folder.
Publish Package
Before publishing the package we need to:
- Add test PyPi repository:
poetry config repositories.testpypi https://test.pypi.org/legacy/ - Publish the package to the test repository:
poetry publish -r testpypi - Test package:
pip install --index-url https://test.pypi.org/simple/ nwon_baseline
If everything works fine publish the package via poetry publish.
Release files for nwon_baseline 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nwon_baseline-0.4.0.tar.gz | 399.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nwon_baseline-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 421.8 kB
Release files / nwon_baseline-0.4.0.tar.gz
| Download URL | nwon_baseline-0.4.0.tar.gz |
|---|---|
| Size | 399.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db7bc82b544c3911000d8d235c3bf9dccdf175ee97dbbc84896ecda7e6867b25
|
|
BLAKE2b-256 checksum How to use checksums |
a847abb97e725aeab675ec75ab4e9cb619ec9334e2c16e1d1df467f03623fb30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.11.6 Linux/6.5.0-45-generic
|
Release files / nwon_baseline-0.4.0-py3-none-any.whl
| Download URL | nwon_baseline-0.4.0-py3-none-any.whl |
|---|---|
| Size | 22.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6ab75418b3a98eb6e3c8754d56b90fb244fbadf5bb6083c9fc93949ebda69e0
|
|
BLAKE2b-256 checksum How to use checksums |
6782aa493b946856b17d57a2fc575336617750173a9bf8bd5ad5fac9fa16984f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.11.6 Linux/6.5.0-45-generic
|