odhpy
Installation
This package may be installed using pip from Bitbucket (requires authentication), or directly from PyPi (public), or from a .tar.gz. Examples are shown below.
pip install git+https://bitbucket.org/odhydrology/odhpy.git
pip install odhpy
pip install .\dist\odhpy-0.0.32.tar.gz
Usage
import odhpy
# returns the package version
odhpy.__version__
# prints 'Hello world!' to the console
odhpy.hello_world()
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\odhpy-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\ODHPy\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.
Unit Tests
WARNING: Run unit tests from an anaconda environment with compatable 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 direcly 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.odhpy.stats.tests
License
None.
Metadata
Release files for odhpy 0.2.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| odhpy-0.2.9.tar.gz | 47.4 kB | Without provenance | Details for odhpy-0.2.9.tar.gz |
Release files / odhpy-0.2.9.tar.gz
| Download URL | odhpy-0.2.9.tar.gz |
|---|---|
| Size | 47.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c37964de388261dcfc55c84768d4e7bdfd0d6f590917a52966a055b6f5c4dda
|
|
BLAKE2b-256 checksum How to use checksums |
4c7b87000edca85acf5aaf375f0cf7c18a73d7f6cefd14487bf3e337e953b904
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.2
|
Security for odhpy 0.2.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.