Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gabryelreyes committed Jun 28, 2024
1 parent fd20d14 commit 04ac0a2
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 18 deletions.
53 changes: 46 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pyMetricCli is a collection of scripts and API implementations for generating an
- [Installation](#installation)
- [Overview](#overview)
- [Usage](#usage)
- [Commands](#commands)
- [Examples](#examples)
- [Used Libraries](#used-libraries)
- [Issues, Ideas And Bugs](#issues-ideas-and-bugs)
Expand All @@ -16,29 +15,69 @@ pyMetricCli is a collection of scripts and API implementations for generating an

## Installation

WIP
```cmd
git clone https://github.com/NewTec-GmbH/pyMetricCli.git
cd pyMetricCli
pip install .
```

This will also install the latest version of [pyJiraCli](https://github.com/NewTec-GmbH/pyJiraCli), [pyPolarionCli](https://github.com/NewTec-GmbH/pyPolarionCli), and [pySupersetCli](https://github.com/NewTec-GmbH/pySupersetCli) in your Python environment.

## Overview

WIP
pyMetricCli requires an adapter file to be supplied by the user. This shall contain the credentials and result-handling logic for the seach results. Please **DO NOT** commit this file into any public repository as your credentials might be exposed.

An example adapter can be found [here](examples/adapter/adapter.py).

## Usage

WIP
Show help information:

```cmd
pyJiraCli --help
```

Usage:

```cmd
usage: pyMetricCli [-h] -a <adapter_file> [--version] [-v]
Collection of scripts and API implementations for generating and playing with metrics.
options:
-h, --help show this help message and exit
--version show program's version number and exit
-v, --verbose Print full command details before executing the command. Enables logs of type INFO and WARNING.
required arguments:
-a <adapter_file>, --adapter_file <adapter_file>
Adapter file to be used.
```

Example:

```cmd
pyJiraCli --verbose --adapter_file "examples\adapter\adapter.py"
```

### Adapter

## Commands
The adapter file must contain the `Adapter` Class derived from the `AdapterInterface`, including all the methods and members defined in the interface.

WIP
The `***_config` dictionaries must be filled with the user credentials for each service. The `output` dictionary defines the columns of the table that will be sent to Superset, and this cannot be changed after the first time the script is ran. If you are receiving an Error 422 from Superset, a change in this dictionary may be the reason and you should contact your administrator so resolve the issue.

## Examples

Check out the all the [Examples](./examples).
Check out the [Examples](./examples) in the corresponding folder.

## Used Libraries

Used 3rd party libraries which are not part of the standard Python package:

- [toml](https://github.com/uiri/toml) - Parsing [TOML](https://en.wikipedia.org/wiki/TOML) - MIT License
- [pyJiraCli](https://github.com/NewTec-GmbH/pyJiraCli) - Interfacing with Jira - BSD-3 License
- [pyPolarionCli](https://github.com/NewTec-GmbH/pyPolarionCli) - Interfacing with Polarion - BSD-3 License
- [pySupersetCli](https://github.com/NewTec-GmbH/pySupersetCli) - Interfacing with Superset - BSD-3 License

## Issues, Ideas And Bugs

Expand Down
7 changes: 2 additions & 5 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# Examples

## Configuration File

The configuration file must have the same structure as `examples\config.json`.

## Adapter

Each project must provide an `Adapter` class with the methods `handle_jira` and `handle_polarion` to pack the data from the search results into the output dictionary.
The declaration, arguments and name of the methods must remain the same as in `examples\adapter\adapter.py`, otherwise the program will not work correctly.
Additionally, the dictionaries `output`, `jira_config`, `polarion_config` and `superset_config` must also be supplied.
The declaration, arguments and name of the methods must remain the same as in `examples\adapter\adapter.py`, otherwise the program will not work correctly.
6 changes: 0 additions & 6 deletions examples/config.json

This file was deleted.

0 comments on commit 04ac0a2

Please sign in to comment.