Command-line interface for DICE
Project description
DICE Command Line Interface (CLI)
Installation
The best way to install dice-cli
is via pipx
.
This will setup a separate virtualenv
for dice-cli
preventing interference with your normal Python setup.
pipx install dice-cli
For tab-completion of the DICE CLI, you can run
dice --install-completion
which will install the completion for your shell.
Should you be using a "non-standard" shell, you can check what will be installed through
dice --show-completion
Development
Development cycle
dice-cli
has a direct, tight dependency on dice-lib.
New features are usually developed within dice-cli
first, and then common functionality is moved to dice-lib
.
Code layout
CLI commands are currently grouped into two categories: admin
and user
.
All categories, except for user
need to be placed in their respective folders.
Each category should use its own logging and error handling to allow for individual tuning.
Main commands are implemented directly into <category>/__init__.py
, e.g. dice admin scan_groups_and_users
, while subcommands should be placed in <category>/<command>/__init__.py
, e.g. dice job why_is_my_job_not_running
.
Should a command require extensive logic, it should be placed in its own file , e.g. admin/_print_used_id_ranges.py
. This will be the main point of change when things move to dice-lib
.
Snapshot (2022.02.17):
src/dice_cli/
├── __init__.py
├── _io
│ ├── __init__.py
│ └── _csv.py
├── admin # `dice admin` category
│ ├── __init__.py
│ ├── _print_unused_id_ranges.py # main command functionality for `dice admin print_unused_id_ranges`
│ ├── _print_used_id_ranges.py
│ ├── _scan_groups_and_users.py
│ └── report # all `dice admin report` commands
│ ├── __init__.py
│ ├── __pycache__
│ ├── _consistency_check_grid.py
│ ├── _inventory.py
│ ├── _network.py
│ └── _storage.py
├── benchmark
│ ├── __init__.py
├── docs
│ ├── __init__.py
├── fs # user command example: `dice fs`
│ ├── __init__.py
│ └── _copy_from_local.py
├── info
│ ├── __init__.py
├── job
│ ├── __init__.py
├── logger.py
├── main.py
└── py.typed
Local installation
conda create -n dice python=3.8
conda activate dice
# make sure to have the latst pip
pip install -U pip
# install dice-cli
pip install -e .
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
Built Distribution
File details
Details for the file dice_cli-2023.11.1.tar.gz
.
File metadata
- Download URL: dice_cli-2023.11.1.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 351815a3d45c1736baaae6d2d57da55358348c68b24f9df3bad3353f41fca820 |
|
MD5 | 8e6a6797d2b1c4906f13e675120ed8f7 |
|
BLAKE2b-256 | b20f585d6bfe7e7d388a33ea25a2f08d08480ba957ba3336485e09ae69182418 |
File details
Details for the file dice_cli-2023.11.1-py3-none-any.whl
.
File metadata
- Download URL: dice_cli-2023.11.1-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a691a8e99cbe36cd3acf9c636fc728cd3cc2737225407d124e29a7e4447eef1e |
|
MD5 | 1bd8fc65663afc57cdadfb666d21641e |
|
BLAKE2b-256 | 7bcb409f99033fcdcad9a0b61bacacc4f4ee9e63e772eb82449b44220d6592fa |