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.7.11.tar.gz
.
File metadata
- Download URL: dice_cli-2023.7.11.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5270eb600a9030013e57972711b637b013dad1fe0f0360b60809184c0a4c7d13 |
|
MD5 | 905cbcf4e054908e852879b936cba718 |
|
BLAKE2b-256 | a84919c9f4b51e768910013b23c1b35983f86bfd5ad7200478a190868b97da41 |
File details
Details for the file dice_cli-2023.7.11-py3-none-any.whl
.
File metadata
- Download URL: dice_cli-2023.7.11-py3-none-any.whl
- Upload date:
- Size: 26.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9888be0ba013b94c19b2144becac5b2c5fe1ee8031551104f0587147c8b4a03 |
|
MD5 | 59e750888bfbce30ed903a0f6f629adf |
|
BLAKE2b-256 | 4b73265b27b8b517e29b5add2dfe6c7968d214b56e15bb87b8cadf594b75d35f |