From ea9882fb93daa8da9660f22ded7a669fa3c4416e Mon Sep 17 00:00:00 2001 From: Gabryel Reyes Date: Wed, 17 Jul 2024 10:38:27 +0200 Subject: [PATCH 1/3] Fixed UML stereotypes --- doc/uml/deployment.puml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/uml/deployment.puml b/doc/uml/deployment.puml index 30023f1..482b630 100644 --- a/doc/uml/deployment.puml +++ b/doc/uml/deployment.puml @@ -57,10 +57,12 @@ node "Continuous Integration Server"<> { } } -jiraRestApi )-- pyJiraCli: <> -polarionSoapApi )-- pyPolarionCli: <> +jiraRestApi )-- pyJiraCli +polarionSoapApi )-- pyPolarionCli -supersetRestApi )-- pySupersetCli: <> +supersetRestApi )-- pySupersetCli + +conaktivSoapApi )-- pyConaktivCli note top of superset Report frontend for project metrics. From 31f89e991214c75c351a718376cbe8d6bbf01985 Mon Sep 17 00:00:00 2001 From: Gabryel Reyes Date: Wed, 17 Jul 2024 11:40:15 +0200 Subject: [PATCH 2/3] Improved documentation. Added UML diagrams --- README.md | 48 +++++++++++++++++---------------------- doc/README.md | 10 +++++++- doc/uml/architecture.puml | 37 ++++++++++++++++++++++++++++++ doc/uml/deployment.puml | 2 -- 4 files changed, 67 insertions(+), 30 deletions(-) create mode 100644 doc/uml/architecture.puml diff --git a/README.md b/README.md index dda1f73..0fc6caa 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 [--version] [-v] +## Usage -Collection of scripts and API implementations for generating and playing with metrics. +```cmd +pyMetricCli [-h] -a [--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 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: @@ -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 ` 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. diff --git a/doc/README.md b/doc/README.md index 7d8b3af..b7bc646 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1 +1,9 @@ -# Documentation \ No newline at end of file +# 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) diff --git a/doc/uml/architecture.puml b/doc/uml/architecture.puml new file mode 100644 index 0000000..cd5e120 --- /dev/null +++ b/doc/uml/architecture.puml @@ -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 : <> +polarion ..> pyPolarion : <> +superset ..> pySuperset : <> + +adapterInterface <|.. adapter : <> + +@enduml \ No newline at end of file diff --git a/doc/uml/deployment.puml b/doc/uml/deployment.puml index 482b630..0149e25 100644 --- a/doc/uml/deployment.puml +++ b/doc/uml/deployment.puml @@ -62,8 +62,6 @@ polarionSoapApi )-- pyPolarionCli supersetRestApi )-- pySupersetCli -conaktivSoapApi )-- pyConaktivCli - note top of superset Report frontend for project metrics. end note From 909936a267134a2e4c32965d0b66771402a3921d Mon Sep 17 00:00:00 2001 From: Gabryel Reyes <66941456+gabryelreyes@users.noreply.github.com> Date: Thu, 18 Jul 2024 09:49:49 +0200 Subject: [PATCH 3/3] Bump version to v1.0.2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9339176..44d0596 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"