1
0
mirror of https://github.com/inofix/maestro.py.git synced 2026-02-05 09:45:24 +01:00
2019-03-07 11:06:02 +01:00
2018-07-03 15:05:17 +02:00
2019-03-07 11:06:02 +01:00
2019-02-25 16:38:31 +01:00
2019-02-25 16:38:31 +01:00
2018-07-03 13:19:03 +02:00
2019-03-07 11:06:02 +01:00
2018-07-03 15:10:36 +02:00
2018-07-03 15:10:36 +02:00

Maestro (python)

Development

The entry point of the applicationis ./main.py

Dependencies management, with pip

Dependencies are listed in ./requirements.txt. We install them through pip, python's package manager.

Environement management with virtualenv

Source: https://click.palletsprojects.com/en/7.x/quickstart/

We install virtualenv. It enables multiple side-by-side installations of Python and librairies, one for each project. It doesnt actually install separate copies of Python, but it does provide a clever way to keep different project environments isolated.

sudo pip install virtualenv

Now, whenever we want to work on a project, we only have to activate the corresponding environment

. venv/bin/activate

To stop working on the project:

deactivate

Modules, setuptools integration

When writing command line utilities, its recommended to write them as modules that are distributed with setuptools instead of using Unix shebangs. Source: https://click.palletsprojects.com/en/7.x/setuptools/#setuptools-integration

In ./setup.py is written the setup for the application.

Test the script

To test the script we can make a new virtualenv and then install our package:

virtualenv venv
. venv/bin/activate
pip install --editable .

Afterwards, the command should be available as maestro

Note: the pip install --editable command, is suffixed with a . (dot); the venv/bin/activate, prefixed with a .; it represents the current directory in unix systems.

Description
Semi- to full-automation. The realistic approach for SMBs.
Readme GPL-3.0 177 KiB
Languages
Python 80.7%
Shell 19.1%
Makefile 0.2%