Open source python library for assessing hydrologic model results in Queensland
Project description
bulum
Installation
This package may be installed using pip from GitHub, directly from PyPi (public), or from a .tar.gz. Examples are shown below.
pip install git+https://github.com/odhydrology/bulum
pip install bulum
pip install .\dist\bulum-0.0.32.tar.gz
Usage
import bulum
# returns the package version
bulum.__version__
# prints 'Hello world!' to the console
bulum.hello_world()
API documentation is available at odhydrology.github.io/bulum.
Build and Upload to PyPi
First build a distribution from an anaconda prompt in the root of your project, and then upload the dist to PyPi using Twine.
python setup.py sdist
twine upload dist\bulum-0.0.32.tar.gz
As of Nov 2023, PyPi uses an API token instead of a conventional password. You can still use Twine, but the username is "__token__", and password is the API token which is very long string starting with "pypi-".
username = __token__
password = pypi-#####################################################################################
Where can I find the API token password? Chas has it in his emails. It is also here on the network at .\ODH working files\Professional development, reading, etc\Software\ODHSoftware\bulum\PyPi_password_and_instructions.txt.
How do I make a new API token? Go to your PyPi account settings, and click on "API tokens". Then click on "Add API token", and give it a name. The token will be displayed on the next screen.
Alternatively,
uv build
uv publish --token XXXXX
Unit Tests
For development testing, first sync with extras=dev via
uv sync --extra dev
To run tests with the current or a particular version of python, from the project root run pytest via (for example):
uv run pytest
uv run
uv run tox -e py312 # to run a particular version
Before publishing, check the library is functional across all supported versions of python via (one of):
uv run tox
uv run tox -p auto # This is run in parallel
Note: if you are missing python versions, install via (e.g.)
uv python install 3.12
Legacy
WARNING: Run unit tests from an anaconda environment with compatible dependencies!
Install the nose2 test-runner framework.
pip install nose2
Then from the root project folder run the nose2 module. You can do this as a python modules, or just directly from the anaconda prompt (both examples given below). This will automatically find and run tests in any modules named "test_*".
python -m nose2
nose2
You can run specific tests by specifying the module name. Example below.
nose2 src.bulum.stats.tests
License
Refer to LICENCE.md
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 bulum-0.3.3.dev1.tar.gz.
File metadata
- Download URL: bulum-0.3.3.dev1.tar.gz
- Upload date:
- Size: 128.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7caefda60110f8dfa358cccc662559a52ebf22c8316aa75186825738a676783a
|
|
| MD5 |
3c5aba1b08295f0ea5b23a9213560dd6
|
|
| BLAKE2b-256 |
ef70d43baefb066400123fffb9e5565d53b08033183b12a24e24512f60bd5ca4
|
Provenance
The following attestation bundles were made for bulum-0.3.3.dev1.tar.gz:
Publisher:
release.yml on odhydrology/bulum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bulum-0.3.3.dev1.tar.gz -
Subject digest:
7caefda60110f8dfa358cccc662559a52ebf22c8316aa75186825738a676783a - Sigstore transparency entry: 1636201461
- Sigstore integration time:
-
Permalink:
odhydrology/bulum@6f52aa385363107d5999233b0b13c79247a3c6ea -
Branch / Tag:
refs/tags/v0.3.3-dev1 - Owner: https://github.com/odhydrology
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6f52aa385363107d5999233b0b13c79247a3c6ea -
Trigger Event:
push
-
Statement type:
File details
Details for the file bulum-0.3.3.dev1-py3-none-any.whl.
File metadata
- Download URL: bulum-0.3.3.dev1-py3-none-any.whl
- Upload date:
- Size: 145.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b83faa5382490db21e8885b82c96aa6cdec2839f94dcd58d903fa1bcbd6a3d1f
|
|
| MD5 |
880f81a18aaa4d83a5fc8165c505c7c8
|
|
| BLAKE2b-256 |
72368c301dbc48ac7621d24b4667612cce9affe8b8d45a49608066b03aec1327
|
Provenance
The following attestation bundles were made for bulum-0.3.3.dev1-py3-none-any.whl:
Publisher:
release.yml on odhydrology/bulum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bulum-0.3.3.dev1-py3-none-any.whl -
Subject digest:
b83faa5382490db21e8885b82c96aa6cdec2839f94dcd58d903fa1bcbd6a3d1f - Sigstore transparency entry: 1636201609
- Sigstore integration time:
-
Permalink:
odhydrology/bulum@6f52aa385363107d5999233b0b13c79247a3c6ea -
Branch / Tag:
refs/tags/v0.3.3-dev1 - Owner: https://github.com/odhydrology
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6f52aa385363107d5999233b0b13c79247a3c6ea -
Trigger Event:
push
-
Statement type: