Skip to main content

Herman Tai's base library for common utilities

Project description

My base libraries. sorno is just a brand name that I use for my stuff. It’s convenient to use that as a package name instead of the usual “org.xxx”.

The source code of the whole project is in github: https://github.com/hermantai/sornobase

PyPI page: https://pypi.python.org/pypi/sornobase

Installation

If you don’t have Python installed, you first need to install it from https://www.python.org/downloads/. You need a version at least 3.

For the following commands, add sudo in front of the commands if you are getting permission error.

A Python package management system will make your life easier, so install pip: https://pip.pypa.io/en/stable/installation/

Install libmagic

The library depends on python-magic: https://pypi.org/project/python-magic/

That requires the installation of libmagic:

$ brew install libmagic

Install with pip

$ pip install sornobase

Install from source

You can install sornobase from the source code by cloning the git repo:

$ git clone https://github.com/hermantai/sornobase

Then cd to the sornobase directory:

$ cd sornobase

Install it:

$ python setup.py install

Running the tests

In the directory containing the ./test.sh file, then run it:

$ ./test.sh

You can run tests only for the sorno library:

$ ./test_sornobase.sh

Or tests only for the scripts:

$ ./test_scripts.sh

Unit testing

You can run the unit tests in the sornobase/tests directory. First, set up the testing environment by running:

$ source setup_test_env.sh

If you have installed sornobase in your machine, the sornobase library from the installation is used instead of your local changes because of easy-install messing with the search path. In that case you need to either remove the egg manually or bump up the version and install it with your local changes to override the existing version.

Then you can run individual unit tests with:

$ python sornobase/tests/test_xxx.py

Deployment

The only deployment destinations for now is github and PyPI. In github, this project resides in the sornobase project: https://github.com/hermantai/sornobase

To deploy to PyPI, first install twine:

$ pip install twine

Then you can use the script to deploy to PyPI:

$ ./pypi_deploy_with_twine.sh

Use sudo if you encounter permission issues when running the commands.

Use the following if you get an error saying “twine cannot be found” even twine is on your PATH:

sudo env "PATH=$PATH" ./pypi_deploy_with_twine.sh

If twine does not work, use the old school:

$ ./pypi_deploy.sh

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

sornobase-0.2.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

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

sornobase-0.2-py3.9.egg (34.7 kB view details)

Uploaded Egg

File details

Details for the file sornobase-0.2.tar.gz.

File metadata

  • Download URL: sornobase-0.2.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.2

File hashes

Hashes for sornobase-0.2.tar.gz
Algorithm Hash digest
SHA256 9324566dedf94c4573452f98b8683333932b3c784bb796524bda88a94b0d65eb
MD5 9b722653a965f742e3a22c4e2b6f931c
BLAKE2b-256 6d39a2e72ff271d75ae70a8b734c144a5ab787eddc51ff0707d3dac7282a6285

See more details on using hashes here.

File details

Details for the file sornobase-0.2-py3.9.egg.

File metadata

  • Download URL: sornobase-0.2-py3.9.egg
  • Upload date:
  • Size: 34.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.2

File hashes

Hashes for sornobase-0.2-py3.9.egg
Algorithm Hash digest
SHA256 1efe269d91bf77c03fe4bb52a8955617222655fc03f971499cbed899016a8c4c
MD5 4e302c8dd1afb0a90a3080bb94d9be54
BLAKE2b-256 c52c571c46de131f1776710d5fa5928f8d2c7a51dabf1b1a34bd0eacf0653235

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