Metadata-Version: 2.1
Name: gridworks-debug-cli
Version: 0.2.2
Summary: Gridworks Debug Cli
Home-page: https://github.com/anschweitzer/gridworks-debug-cli
License: MIT
Author: Andrew Schweitzer
Author-email: schweitz72@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: aiobotocore (>=2.4.2,<3.0.0)
Requires-Dist: anyio (>=3.6.2,<4.0.0)
Requires-Dist: asyncio-mqtt (>=0.16.1,<0.17.0)
Requires-Dist: click (>=8.0.1)
Requires-Dist: gridworks-protocol (>=0.3.6)
Requires-Dist: pandas (>=1.5.3,<2.0.0)
Requires-Dist: pydantic (>=1.10.4,<2.0.0)
Requires-Dist: pytimeparse2 (>=1.6.0,<2.0.0)
Requires-Dist: result (>=0.9.0,<0.10.0)
Requires-Dist: rich (>=13.2.0,<14.0.0)
Requires-Dist: typer (>=0.7.0,<0.8.0)
Requires-Dist: types-aiobotocore[essential] (>=2.4.2,<3.0.0)
Requires-Dist: xdg (>=5.1.1,<6.0.0)
Requires-Dist: yarl (>=1.8.2,<2.0.0)
Project-URL: Changelog, https://github.com/anschweitzer/gridworks-debug-cli/releases
Project-URL: Documentation, https://gridworks-debug-cli.readthedocs.io
Project-URL: Repository, https://github.com/anschweitzer/gridworks-debug-cli
Description-Content-Type: text/markdown

# Gridworks Debug Cli

[![PyPI](https://img.shields.io/pypi/v/gridworks-debug-cli.svg)][pypi_]
[![Status](https://img.shields.io/pypi/status/gridworks-debug-cli.svg)][status]
[![Python Version](https://img.shields.io/pypi/pyversions/gridworks-debug-cli)][python version]
[![License](https://img.shields.io/pypi/l/gridworks-debug-cli)][license]

[![Read the documentation at https://gridworks-debug-cli.readthedocs.io/](https://img.shields.io/readthedocs/gridworks-debug-cli/latest.svg?label=Read%20the%20Docs)][read the docs]
[![Tests](https://github.com/thegridelectric/gridworks-debug-cli/workflows/Tests/badge.svg)][tests]
[![Codecov](https://codecov.io/gh/thegridelectric/gridworks-debug-cli/branch/main/graph/badge.svg)][codecov]

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]

[pypi_]: https://pypi.org/project/gridworks-debug-cli/
[status]: https://pypi.org/project/gridworks-debug-cli/
[python version]: https://pypi.org/project/gridworks-debug-cli
[read the docs]: https://gridworks-debug-cli.readthedocs.io/
[tests]: https://github.com/anschweitzer/gridworks-debug-cli/actions?workflow=Tests
[codecov]: https://app.codecov.io/gh/anschweitzer/gridworks-debug-cli
[pre-commit]: https://github.com/pre-commit/pre-commit
[black]: https://github.com/psf/black

Internal debugging tools for Gridworks systems:

```shell
brew install awscli
aws configure
pip install gridworks-debug-cli
gwd --help
gwd csv --help
gwd csv egd --help
gwd events --help
gwd events mkconfig
gwd events show
```

This tool will be maintained only as long as it is internally useful. YMMV.

## Features

- Event viewing, either from local directory of events or from the cloud, via `events` subcommand.
- Data download, via `csv` subcommand.

## Requirements

- [awscli](https://aws.amazon.com/cli/). This should be installable
  per [Amazon instructions](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) or on a
  mac with:
  ```shell
  brew install awscli
  ```
- AWS credentials from Gridworks installed per
  [Amazon instructions](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) or:
  ```shell
  aws configure
  ```

## Installation

You can install _Gridworks Debug Cli_ via [pip] from [PyPI]:

Install awscli per per [Amazon instructions](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
or on a mac with:

```shell
brew install awscli
```

Get AWS credentials from Gridworks and install them with:

```shell
aws configure
```

Install gridworks-debug-cli with:

```shell
pip install gridworks-debug-cli
```

### Vieweing events

Configure _events_ subcommand with:

```shell
gwd events mkconfig
open $HOME/.config/gridworks/debug-cli/events/gwd.events.config.json
```

You **must** fill in values for the following keys with information from Gridworks:

```json
{
  "mqtt": {
    "hostname": "USE REAL VALUE",
    "password": "USE REAL VALUE",
    "username": "USE REAL VALUE"
  },
  "sync": {
    "s3": {
      "bucket": "USE REAL VALUE",
      "prefix": "USE REAL VALUE",
      "profile": "USE NAME YOU CHOSE in 'aws configure'"
    }
  }
}
```

### Data download

Configure _csv_ subcommand with:

```shell
gwd csv mkconfig
open $HOME/.config/gridworks/debug-cli/csv/gwd.csv.config.json
```

## Usage

Please see the [Command-line Reference] for details.

## Contributing

Contributions are very welcome.
To learn more, see the [Contributor Guide].

## License

Distributed under the terms of the [MIT license][license],
_Gridworks Debug Cli_ is free and open source software.

## Issues

If you encounter any problems,
please [file an issue] along with a detailed description.

## Credits

This project was generated from [@cjolowicz]'s [Hypermodern Python Cookiecutter] template.

[@cjolowicz]: https://github.com/cjolowicz
[pypi]: https://pypi.org/
[hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
[file an issue]: https://github.com/anschweitzer/gridworks-debug-cli/issues
[pip]: https://pip.pypa.io/

<!-- github-only -->

[license]: https://github.com/anschweitzer/gridworks-debug-cli/blob/main/LICENSE
[contributor guide]: https://github.com/anschweitzer/gridworks-debug-cli/blob/main/CONTRIBUTING.md
[command-line reference]: https://gridworks-debug-cli.readthedocs.io/en/latest/usage.html

