Python Development CLI
Project description
PIB CLI
A development environment CLI, complete with tooling.
Develop Branch
Master Branch
Installation
This is a development environment CLI, with a customizable yaml config.
It's built into this Cookie Cutter template:
To install, simply use: pip install pib_cli
Usage
- use the
dev
command for details once inside the container
Container
License
Installed Packages:
package | Description |
---|---|
bandit | Finds common security issues |
commitizen | Standardizes commit messages |
isort | Sorts imports |
poetry | Python Package Manager |
pylint | Static Code Analysis |
pytest | Test suite |
pytest-cov | Coverage support for pytest |
sphinx | Generating documentation |
safety | Dependency vulnerability scanning |
wheel | Package distribution tools |
yamllint | Lint yaml configuration files |
yapf | Customizable Code Formatting |
Customizing the Command Line Interface
The CLI has some defaults built in, but is customizable by setting the PIB_CONFIG_FILE_LOCATION
environment variable.
The default config file can be found here.
Each command is described by a yaml key in this format :
- name: "command-name"
path_method: "location_string"
commands:
- "one or more"
- "shell commands"
- "each run in a discrete environment"
success: "Success Message"
failure: "Failure Message"
where location_string
is one of:
project_root
(/app
)project_docs
(/app/documentation
)project_home
(/app/${PROJECT_HOME}
)
Installing a virtual environment, and the CLI on your host machine
The scripts/extras.sh script does this for you.
First install poetry on your host machine:
pip install poetry
Then source this script, setup the extras, and you can use the dev
command on your host:
source scripts/extras.sh
pib_setup_hostmachine
(to install the poetry dependencies)dev --help
(to run the cli outside the container)
This is most useful for making an IDE like pycharm aware of what's installed in your project.
It is still recommended to work inside the container, as you'll have access to the full managed python environment, as well as any additional services you are running in containers.
If you wish to use the cli outside the container for all tasks, tomll and gitleaks will also need to be installed, or the cli.yml configuration will need to be customized to remove these commands. (Not recommended.)
Development Dependencies
You'll need to install:
Setup the Development Environment
Build the development environment container (this takes a few minutes):
docker-compose build
Start the environment container:
docker-compose up -d
Spawn a shell inside the container:
./container
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
Built Distribution
File details
Details for the file pib_cli-0.0.9.tar.gz
.
File metadata
- Download URL: pib_cli-0.0.9.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.7.10 Linux/5.4.0-1041-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e74bf2138a8b307bffb466b4ba007b3ff5b26cca98261985b269df7687b19faa |
|
MD5 | ecdcc155a5bb239c7c925d3b42b81828 |
|
BLAKE2b-256 | 084ce9302d43e16d3b9edd0b109345f8015bec22cfa78e02ade3d81eaedb4286 |
File details
Details for the file pib_cli-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: pib_cli-0.0.9-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.7.10 Linux/5.4.0-1041-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6c7cf4966773612cda955d240a7cd473c07a5307d4007e7d7a6bdc60b55cada |
|
MD5 | a261ec59148ba9bf4778640454a45b02 |
|
BLAKE2b-256 | be55b4328102b828ed61e477a1073d63592e0359ecf251bea32eb6aeebb0bed6 |