From a39eb374d5d9132c0da327b7c9ba06365c64e533 Mon Sep 17 00:00:00 2001 From: Marijn Dessens Date: Mon, 10 Feb 2025 14:39:54 +0100 Subject: [PATCH] Remove / change incorrect references --- report-generator/README.md | 10 ++++---- report-generator/docs/installation.md | 37 +++++++++++++++++++++------ report-generator/setup.cfg | 2 +- 3 files changed, 35 insertions(+), 14 deletions(-) diff --git a/report-generator/README.md b/report-generator/README.md index 0b02977..f10fbcb 100644 --- a/report-generator/README.md +++ b/report-generator/README.md @@ -4,10 +4,10 @@ The SIG report generator is a tool/framework designed to generate any kind of report. The repo only contains one (default) template, but it should be capable of producing others in the future, of different export types. Additionally, at some point it could be integrated into Sigrid, so that end-users can download a report/export at the click of a button. -![Sample: Management summary](./docs/img/sample-mgmt-summary.png){width=300px} -![Sample: Architecture](./docs/img/sample-architecture.png){width=300px} -![Sample: Test code ratio](./docs/img/sample-test-code.png){width=300px} -![Sample: Word](./docs/img/sample-word.png){width=300px} +Sample: Management summary +Sample: Architecture +Sample: Test code ratio +Sample: Word ## Status @@ -30,7 +30,7 @@ Before using the system, you need to generate a Sigrid token. Tokens are unique ### Run the tool -1. If you want to use a pre-defined built-in report, e.g. `itdd-light`. Use: `report-generator -l "itdd-light" -c -s -t ` +1. For the default report, use: `report-generator -c -s -t ` 2. If you want to provide your own custom report `.pptx` or `.docx` file. Use: `report-generator -p -c -s -t ` 3. For help or an overview of all options use `report-generator --help` diff --git a/report-generator/docs/installation.md b/report-generator/docs/installation.md index 37d32bb..370a545 100644 --- a/report-generator/docs/installation.md +++ b/report-generator/docs/installation.md @@ -2,19 +2,40 @@ ## Prerequisites -- Have Python 3.9 or later available and set up so that you can install and use Python packages. This should be preinstalled on SIG Macbooks. +- Have Python 3.9 or later available and set up so that you can install and use Python packages. ## Install (for end-users) -1. Install the tool itself: `pip3 install -e "git+ssh://git@code.sig.eu/sig/delivery/report-generator.git#egg=report-generator"`. This should complete succesfully. - - If this fails with the error "ssh: Could not resolve hostname code.sig.eu", make sure you are connected to SIG internal network (VPN) and can log in to https://code.sig.eu in your browser. - - If this fails and somewhere in the output it says "Permission denied (public key)", you need to add your public key to code.sig.eu settings for authentication: - - Copy the full contents from the file `~/.ssh/id_rsa.pub` (It should look something like `id-rsa AAAAsdabfkjadsbfsjdaBSFJK... jan@janlaptop`) - - in https://code.sig.eu, make sure you are logged in. Click your user icon (top left), go to preferences go to SSH Keys, then Add new key and paste the contents from `id_rsa.pub` in the big box. Leave other settings alone (or delete the expiry date if you don't want to redo this in a year from now) and save by pressing "Add key". +1. Clone this repository and `cd` into it. +1. Install the tool itself: `pip3 install -e ./report-generator"`. This should complete succesfully. - If this fails with an error message that says something like "error: can't create or remove files in install directory", try adding `--user` to the above command. - If this fails with an error message saying something like "error: externally-managed-environment", try installing in a `venv` (Virtual environment). If you don't know how that works, ask for help. -2. If this is your first time installing python packages/commands: Open up the file called `.zshrc` in your Home directory. If this file does not exist, create it. The file may be hidden in finder. In your terminal you can type: `open ~/.zshrc`. At the bottom, add this on a new line: - `export PATH=${HOME}/Library/Python/3.9/bin:${PATH}` and save your changes. +2. If this is your first time installing Python packages/commands, you may need to add the Python bin directory to your `PATH` environment variable. Here are the steps to do this: + + 1. **Determine the Python bin directory**: + - The Python bin directory is typically located in the `bin` subdirectory of your Python installation. + + 2. **Modify your shell configuration file**: + - Open your shell configuration file in a text editor. This file is usually named `.bashrc`, `.zshrc`, `.profile`, or `.bash_profile`. + - Add the following line to the file, replacing `/path/to/python/bin` with the actual path to your Python bin directory: + + ```sh + export PATH="/path/to/python/bin:$PATH" + ``` + + 3. **Apply the changes**: + - Save the file and close the text editor. + - Apply the changes by running the following command in your terminal (for Unix-like systems): + + ```sh + source ~/.bashrc # or source ~/.zshrc, or source ~/.profile, depending on the file you edited + ``` + + - For Windows, you can add the Python bin directory to the `Path` environment variable through the System Properties > Environment Variables interface. + + By following these steps, you ensure that the Python bin directory is included in your `PATH`, allowing you to run Python and its associated tools from any directory. + +Alternatively, you can use the docker image: `softwareimprovementgroup/sigrid-integrations` ## Developer instructions diff --git a/report-generator/setup.cfg b/report-generator/setup.cfg index eff1dc8..f203296 100644 --- a/report-generator/setup.cfg +++ b/report-generator/setup.cfg @@ -6,7 +6,7 @@ author_email = jan.laan@softwareimprovementgroup.com description = Generate Sigrid reports long_description_content_type = text/markdown long_description = file: README.md -url = https://code.sig.eu/sig/delivery/report-generator +url = https://github.com/Software-Improvement-Group/sigrid-integrations/tree/main/report-generator license_files = LICENSE classifiers = Programming Language :: Python :: 3