Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bulum-0.3.4.dev1.tar.gz (145.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bulum-0.3.4.dev1-py3-none-any.whl (164.6 kB view details)

Uploaded Python 3

File details

Details for the file bulum-0.3.4.dev1.tar.gz.

File metadata

  • Download URL: bulum-0.3.4.dev1.tar.gz
  • Upload date:
  • Size: 145.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bulum-0.3.4.dev1.tar.gz
Algorithm Hash digest
SHA256 8d12bc6fa7eea5e44011851db145ab479702777d3af09cd81e745f044a6465dc
MD5 de78cfbeb6873e69c13eb82165546496
BLAKE2b-256 ce5f66ecaeadcedaf22e3d516c7a0e4d7864bec6a83d663e01fa7ea8e1917b04

See more details on using hashes here.

File details

Details for the file bulum-0.3.4.dev1-py3-none-any.whl.

File metadata

  • Download URL: bulum-0.3.4.dev1-py3-none-any.whl
  • Upload date:
  • Size: 164.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bulum-0.3.4.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 88e3e5f4dfbed8451926cc86e0e6d9c6fc4434911efd9d44e4905defc8c41d7c
MD5 1cf429cc2071800f3fd9a81ef4b04d50
BLAKE2b-256 62531548b371fdbdf03802ce631e9c6e4d865507c124ce646fd0a9f50249cf48

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page