A collection of splashings to master that which has no form and count that which is uncountable.
Project description
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.
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
File details
Details for the file odhpy-0.0.40.tar.gz
.
File metadata
- Download URL: odhpy-0.0.40.tar.gz
- Upload date:
- Size: 32.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0785a715884fe44b2be00ce2261de2c3590471b3234a22efd8b9ef477cfb821d |
|
MD5 | c5b08a741b510a543156482fe69c817c |
|
BLAKE2b-256 | 7ef3c9ac3494b76101029ca12ce4fb5b5eac45ced50e12eb67ea0cc434a22ed3 |