Skip to main content

PyPI Downloads Made with love in Japan Python

RedCoffee

RedCoffee is a command-line tool designed to manage SonarQube reports easily. It allows you to generate PDF reports from SonarQube analysis data. The project mainly targets SonarQube Community Edition since it lacks the default capability to export PDF reports.

Installation

To install RedCoffee, you can use pip. First, ensure you have Python and pip installed on your system. Then, you can install RedCoffee directly from PyPI using the following command:

pip install redcoffee

Pre Requisites

The SonarQube analysis for the project should already have been completed.

Project Structure

Directory Usage
.github/workflows Github Action Files.
i) trigger-test.yaml - To Trigger Unit Tests on every commit.
ii) deploy-mkdocs.yaml - To trigger deployment of mkdocs when something is merged to main / master branch.
integrations Contains 3rd Party Integrations
i) IPInfo - To get the user's GeoLocation Details
ii) Sentry - For error analysis and logs
core The brain of the repository. The control will ultimately land up here.
i) utils - Core Utils. Utilities essential for the core functionality to be up and running.
ii) analyser.py - Most of the SonarQube API Calls being made in this file.
reports Controls the stuff related to look and feel of the generated reports.
i)templating.py - Code containing the structure of the report.
ii) utils - Code / Utility functions essential for the report templating to be up and running.
utils General Utility Functions.
tests Contains the Unit Tests.
Files Usage
redcoffee.py The entrypoint of the project
requirements.txt Includes all necessary libraries required to keep this project up and running
docker-compse.yml Brining up the docker containers if someones wants to test out things locally
wiremock-using-docker.sh Required for Trigger the unit test cases

Local Setup

Please note that the project has not been dockerised yet. Hence, it does not contain a DockerFile. However, please ensure that you have Docker installed on your system as we will require the same to have few containers up and running.

To setup RedCoffee locally on your machine, please follow the below steps

  • In your terminal, please run the following command : pip install -r requirements.txt. This will ensure all the libraries are installed in your system which is essential for the project to be up and running.

  • Next, please proceed to run the following docker command : docker compose -f docker-compose.yml up. This will ensure you have the required Infra up and running for the project to work successfully. Required Infra over here means SonarQube Community Edition and the Postgres DB.

  • The configured username and password for the database can be found out in the docker compose file.

  • Please procced to navigate to localhost:9000 as this is the address where your SonarQube instance is up and running ( unless you have changed the ports ) . It will ask you for the login. Please enter the username as admin and password as admin. It will prompt you to re-enter a new password. Please set up a password of your choice.

  • Please click on your profile icon ( right most corner ) and click on the Account Section. Navigate to the Security section. Please procced to generate a SonarQube User Token. Please remember to save this token somewhere as you won't be able to see it later.

Please note that due to the unavailability of IPInfo Access Key and Sentry DSN URL on your local system, the calls for these APIs will fail. However, this does not block the execution.

Usage

Please run the following command to generate the PDF Report

redcoffee generatepdf --host=${YOUR_SONARQUBE_HOST_NAME} --project=${SONARQUBE_PROJECT_KEY} --path=${PATH WHERE PDF FILE IS TO BE STORED} --token=${SONARQUBE_USER_TOKEN}

Documentation ( made available via Github Pages )

Please visit the Github Page for this project to stay updated with the latest changes - Github Page Documentation for RedCoffee

Metadata

Release files for redcoffee 2.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for redcoffee 2.16
File Size Uploaded Provenance Actions
redcoffee-2.16.tar.gz 19.6 kB Without provenance Details for redcoffee-2.16.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for redcoffee 2.16
File Interpreter ABI Platform Actions
redcoffee-2.16-py3-none-any.whl Python 3 none any Details for redcoffee-2.16-py3-none-any.whl

Total release size: 41.1 kB

Release files / redcoffee-2.16.tar.gz

Download URL redcoffee-2.16.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f5150c7ae825b98007864020627ccb8bba43cc18bf7977427d2277124a9e529e
BLAKE2b-256 checksum
How to use checksums
f1a26b1dbe1ef93cd682bbd8b5e76da67cd8dbce4109596db300bf9b48e1b0f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release files / redcoffee-2.16-py3-none-any.whl

Download URL redcoffee-2.16-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
726a3a73680c608b0f328c1cf9196e702e3ecbf3811eaec18c6a5f761b4612e7
BLAKE2b-256 checksum
How to use checksums
d5dc8303720e36a23acdaf00c385f528917cdf297121d1e94ff0785c1f630beb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Security for redcoffee 2.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page