Skip to content

Commit

Permalink
Merge pull request #11 from NewTec-GmbH/release/v1.0.x
Browse files Browse the repository at this point in the history
Release v1.0.2
  • Loading branch information
gabryelreyes authored Jul 18, 2024
2 parents 7d53275 + 909936a commit 3ebc777
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 32 deletions.
48 changes: 21 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,18 @@ pyMetricCli is a collection of scripts and API implementations for generating an

[![License](https://img.shields.io/badge/license-bsd-3.svg)](https://choosealicense.com/licenses/bsd-3-clause/) [![Repo Status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![CI](https://github.com/NewTec-GmbH/pyMetricCli/actions/workflows/test.yml/badge.svg)](https://github.com/NewTec-GmbH/pyMetricCli/actions/workflows/test.yml)

- [Installation](#installation)
- [Overview](#overview)
- [Deployment](#deployment)
- [Installation](#installation)
- [Usage](#usage)
- [Flags](#flags)
- [Adapter](#adapter)
- [Examples](#examples)
- [Used Libraries](#used-libraries)
- [Issues, Ideas And Bugs](#issues-ideas-and-bugs)
- [License](#license)
- [Contribution](#contribution)

## Installation

```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

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.
Expand All @@ -33,30 +26,31 @@ An example adapter can be found [here](examples/adapter/adapter.py).

![deployment](https://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/NewTec-GmbH/pyMetricCli/main/doc/uml/deployment.puml)

## Usage
More information on the deployment and architecture can be found in the [doc](./doc/README.md) folder.

Show help information:
## Installation

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

Usage:
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.

```cmd
usage: pyMetricCli [-h] -a <adapter_file> [--version] [-v]
## Usage

Collection of scripts and API implementations for generating and playing with metrics.
```cmd
pyMetricCli [-h] -a <adapter_file> [--version] [-v]
```

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.
### Flags

required arguments:
-a <adapter_file>, --adapter_file <adapter_file>
Adapter file to be used.
```
| Flag | Description |
| :-----------: | ----------------------------------------------------------------------------------------------- |
| --verbose , -v | Print full command details before executing the command. Enables logs of type INFO and WARNING. |
| --version | Import a ticket from a JSON file. |
| --help , -h | Show the help message and exit. |

Example:

Expand All @@ -66,7 +60,7 @@ pyJiraCli --verbose --adapter_file "examples\adapter\adapter.py"

### Adapter

The adapter file must contain the `Adapter` Class derived from the `AdapterInterface`, including all the methods and members defined in the interface.
The adapter file must contain the `Adapter` Class derived from the `AdapterInterface`, including all the methods and members defined in the interface. It is passed to the tool via the `--adapter_file <adapter_file>` option.

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.

Expand Down
10 changes: 9 additions & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# Documentation
# Documentation

## Deployment

![deployment](https://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/NewTec-GmbH/pyMetricCli/main/doc/uml/deployment.puml)

## Architecture

![architecture](https://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/NewTec-GmbH/pyMetricCli/main/doc/uml/architecture.puml)
37 changes: 37 additions & 0 deletions doc/uml/architecture.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@startuml ArchitectureDiagram

package "pyMetricCli" as pyMetricCli {
component "Main Entry Point" as main
component "jira" as jira
component "polarion" as polarion
component "superset" as superset
component "AdapterInterface" as adapterInterface
}

package "NewTec Python Tools" as pyTools {
component "pyJiraCli" as pyJira
component "pyPolarionCli" as pyPolarion
component "pySupersetCli" as pySuperset
}

package "Python" as python {
component "Argparse" as argparse
}

package "Project-specific" as user {
component "Adapter" as adapter
}

main *--> argparse
main *--> jira
main *--> polarion
main *--> superset
main *--> adapterInterface

jira ..> pyJira : <<call via CLI>>
polarion ..> pyPolarion : <<call via CLI>>
superset ..> pySuperset : <<call via CLI>>

adapterInterface <|.. adapter : <<realize>>

@enduml
6 changes: 3 additions & 3 deletions doc/uml/deployment.puml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ node "Continuous Integration Server"<<virtual-machine>> {
}
}

jiraRestApi )-- pyJiraCli: <<uses>>
polarionSoapApi )-- pyPolarionCli: <<uses>>
jiraRestApi )-- pyJiraCli
polarionSoapApi )-- pyPolarionCli

supersetRestApi )-- pySupersetCli: <<writes>>
supersetRestApi )-- pySupersetCli

note top of superset
Report frontend for project metrics.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pyMetricCli"
version = "1.0.1"
version = "1.0.2"
description = "pyMetricCli is a collection of scripts and API implementations for generating and playing with metrics."
readme = "README.md"
requires-python = ">=3.9"
Expand Down

0 comments on commit 3ebc777

Please sign in to comment.