Skip to main content

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:

  1. Tell poetry to create dependencies in a .venv folder withing the project: poetry config virtualenvs.in-project true
  2. Create a virtual environment using the local python version: poetry env use $(cat .python-version)
  3. 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:

  1. Clean dist folder
  2. Bump up the version of the package
  3. 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:

  1. Add test PyPi repository: poetry config repositories.testpypi https://test.pypi.org/legacy/
  2. Publish the package to the test repository: poetry publish -r testpypi
  3. Test package: pip install --index-url https://test.pypi.org/simple/ nwon_baseline

If everything works fine publish the package via poetry publish.

Metadata

Release files for nwon_baseline 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nwon_baseline 0.4.1
File Size Uploaded
nwon_baseline-0.4.1.tar.gz 400.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nwon_baseline 0.4.1
File Interpreter ABI Platform
nwon_baseline-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 422.3 kB

Release files / nwon_baseline-0.4.1.tar.gz

Download URL nwon_baseline-0.4.1.tar.gz
Size 400.1 kB
Tags Source
SHA-256 checksum
How to use checksums
177dd9ef59f612798ff0d1594cf05d0ccb796d9d44db04c880928e131f8c78ec
BLAKE2b-256 checksum
How to use checksums
0346772e0daf87afa6ad32a9aef5a61961ab0b57dad7055ee24bafcd018f040e
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.1-py3-none-any.whl

Download URL nwon_baseline-0.4.1-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d98f9e1adca7432077db1549f2aa8a096c1dd61473d290acb303090587c9d07
BLAKE2b-256 checksum
How to use checksums
167fa00ac4abfb991f83136b577c86d55e896e5e4fe3ba9d128a5d1357a97d75
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
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page