Metadata-Version: 2.4
Name: idmtools_cli
Version: 2.2.1
Summary: CLI for IDM-Tools
Author-email: Sharon Chen <schen@idmod.org>, Clinton Collins <ccollins@idmod.org>, Zhaowei Du <zdu@idmod.org>, Mary Fisher <mfisher@idmod.org>, Clark Kirkman IV <ckirkman@idmod.org>, Benoit Raybaud <braybaud@idmod.org>
Project-URL: Homepage, https://github.com/InstituteforDiseaseModeling/idmtools
Keywords: modeling,IDM,cli
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.TXT
Requires-Dist: click~=8.1.7
Requires-Dist: click-plugins
Requires-Dist: colorama~=0.4.6
Requires-Dist: cookiecutter~=2.6.0
Requires-Dist: idmtools~=2.2.1
Requires-Dist: tabulate<0.10,>=0.8.9
Requires-Dist: pyperclip~=1.8
Requires-Dist: yaspin<3.1.0,>=1.2.0
Provides-Extra: dev
Requires-Dist: flake8; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: bump2version; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-timeout; extra == "test"
Requires-Dist: pytest-cache; extra == "test"
Requires-Dist: flake8; extra == "test"
Requires-Dist: coverage; extra == "test"
Requires-Dist: bump2version; extra == "test"
Provides-Extra: packaging
Requires-Dist: flake8; extra == "packaging"
Requires-Dist: coverage; extra == "packaging"
Requires-Dist: bump2version; extra == "packaging"
Dynamic: license-file

![Staging: idmtools-cli](https://github.com/InstituteforDiseaseModeling/idmtools/workflows/Staging:%20idmtools-cli/badge.svg?branch=dev)

# idmtools-cli

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**

  - [Installing](#installing)
- [Development tips](#development-tips)
- [Using the CLI](#using-the-cli)
  - [Version command](#version-command)
  - [Experiment commands for Local Platform](#experiment-commands-for-local-platform)
    - [Status](#status)
    - [Delete](#delete)
  - [Simulation commands for Local Platform](#simulation-commands-for-local-platform)
  - [Status](#status-1)
  - [GitRepo commands](#gitrepo-commands)
    - [View](#view)
    - [Repos](#repos)
    - [Releases](#releases)
    - [Peep](#peep)
    - [Download](#download)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Installing

```bash
pip install idmtools-cli --index-url=https://packages.idmod.org/api/pypi/pypi-production/simple
```

# Development tips

There is a Makefile file available for most common development tasks. Here is a list of commands
```bash
clean       -   Clean up temproary files
lint        -   Lint package and tests
test        -   Run All tests
coverage    -   Run tests and generate coverage report that is shown in browser
```
On Windows, you can use `pymake` instead of `make`

# Using the CLI

The CLI requires the workers service to already be running.
`idmtools`

## Version command

To determine version of idmtools and related plugins, use the version cli command.


```
> idmtools version
```

Example output
```bash
emodpy                               Version: 1.3.0                           
  Plugins:
    EMODTask                  
idmtools                             Version: 1.4.0+nightly.0                 
  Plugins:
    CommandTask               
idmtools-cli                         Version: 1.4.0+nightly.0                 
idmtools-models                      Version: 1.4.0+nightly.0                 
  Plugins:
    JSONConfiguredPythonTask  
    JSONConfiguredRTask       
    JSONConfiguredTask        
    PythonTask                
    RTask                     
    ScriptWrapperTask         
    TemplatedScriptTask       
idmtools-platform-comps              Version: 1.4.0+nightly.0                 
  Plugins:
    COMPSPlatform             
    SSMTPlatform                        
idmtools-platform-slurm              Version: 1.0.0+nightly                   
  Plugins:
    SlurmPlatform             
```


## Experiment commands for Local Platform

### Status

You can check the status of experiments use the follow command. It will also summarize the simulations under
the experiment as a progress bar with green section for completed tasks, yellow for in progress, red for failed, and
white for queued. 

```
> idmtools experiment --platform Local status --help
```
 

In addition, we used in conjunction with a console that supports auto-highlighting of hyperlinks, you will be able to
easily open up the asset directories by clicking on the data path URLs.

You can also perform filtering on the experiments
```bash
> idmtools experiment --platform Local status --tag type PythonExperiment
> idmtools experiment --platform Local status --id 8EHU147Z
```

### Delete

You can delete experiments and their child simulations using the following command. Optionally you can also delete
the associated data directories as well by using the *--data* option.

```
>idmtools experiment --platform Local delete <experiment_id>
```

## Simulation commands for Local Platform

## Status 

You can check the status of simulations use the follow command.

```
>idmtools simulation --platform Local status
```

You can also filter by a either id, experiment id, status, and tags or any combination of the aforementioned

```bash
> idmtools simulation --platform Local status --experiment-id EFX6JXBV
> idmtools simulation --platform Local status --id XDT0VMVV
> idmtools simulation --platform Local status --tag a 5 --tag b
> idmtools simulation --platform Local status --experiment-id --status failed
```


## GitRepo commands

### View

You can check idmtools available examples. You can use --raw to determine to display in detailed or simplified format

```
> idmtools gitrepo view
```

### Repos

You can list all public repos for a GitHub owner. You can use --owner to specify an owner and --page for pagination
--owner default to 'institutefordiseasemodeling'
--page default to 1

```
> idmtools gitrepo repos
```

### Releases

You can list all releases of a repo by providing --owner and --repo
--owner default to 'institutefordiseasemodeling' and --repo default to 'idmtools'

```
> idmtools gitrepo releasess
```

### Peep

You can list all current files/dirs of a repo folder by providing --url

```
> idmtools gitrepo peep
```

### Download

You can download files from a public repo to a specified local folder (default to current folder). By default, it will 
download idmtools examples. You can also download any files from any public repo by using --url (multiple is supported)

```
> idmtools gitrepo download
```
