/python-utility

Python utility classes.

Primary LanguageShellMIT LicenseMIT

PythonUtility

Setup

Install project dependencies:

script/setup.sh

Install pip package from GitHub:

pip3 install git+https://git@github.com/FunTimeCoding/python-utility.git#egg=python-utility

Install pip package from DevPi:

pip3 install -i https://testpypi.python.org/pypi python-utility

Uninstall package:

pip3 uninstall python-utility

Usage

Run the main program:

bin/pu

Run the main program inside the container:

docker run -it --rm funtimecoding/python-utility

Update a spreadsheet:

bin/spreadsheet/update.sh Jane 2020-01-01

Docker commands

Build image:

docker build --tag python-utility-snapshot .

Log into bash:

docker run --rm -it python-utility-snapshot bash

Pass arguments to pu:

docker run --rm -it python-utility-snapshot pu --help

Start spreadsheet service:

docker run --rm -it python-utility-snapshot spreadsheet-service

Docker wrapped in shell scripts

script/docker/build.sh
script/docker/run.sh --development bash
script/docker/run.sh --development pu --help
script/docker/run.sh --development spreadsheet-service

Development

Configure Git on Windows before cloning:

git config --global core.autocrlf input

Install NFS plug-in for Vagrant on Windows:

vagrant plugin install vagrant-winnfsd

Create the development virtual machine on Linux and Darwin:

script/vagrant/create.sh

Create the development virtual machine on Windows:

script\vagrant\create.bat

Run tests, style check and metrics:

script/test.sh [--help]
script/check.sh [--help]
script/measure.sh [--help]

Build project:

script/build.sh

Install Debian package:

sudo dpkg --install build/python3-python-utility_0.1.0-1_all.deb

Show files the package installed:

dpkg-query --listfiles python3-python-utility

Replace Powerline daemon to test changes manually:

bin/powerline/replace-daemon.sh