The msgram CLI is a command-line interface to use MeasureSoftGram software
Project description
2026-1 MeasureSoftGram-CLI
Command line project to MeasureSoftGram
Badges
What is the MeasureSoftGram-CLI?
The CLI is a command-line interface to the software.
How to use CLI
How to run the project
Use Python 3.9 or higher. The CI currently uses Python 3.10.
First, clone the repository and enter the project folder:
git clone <repository-url>
cd <repository-folder>
It is recommended to create and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
Then install the project dependencies:
pip install -r requirements.txt
The requirements.txt file already installs the local application in editable mode through -e .. After that, the msgram command is available in the terminal.
To show all MeasureSoftGram commands, use:
msgram -h
If you do not want to use the installed msgram command, run the Python entry point directly:
python3 main.py -h
If a module is not found, check if the virtual environment is activated and run pip install -r requirements.txt again.
Basic usage
Create the default configuration file:
msgram init
This creates the .msgram/msgram.json file in the current directory.
List the configuration:
msgram list
Extract metrics from SonarQube/SonarCloud JSON files:
msgram extract -sp analytics-raw-data -ep .msgram
The -sp argument is the path to the directory with the JSON files. The -ep argument is the path where the extracted .metrics files will be saved.
Calculate the model values from extracted metrics:
msgram calculate -ep .msgram -cp .msgram -o csv
The -ep argument is the path to the extracted metrics. The -cp argument is the path to the folder with msgram.json. The -o argument defines the output format.
To see the options of a specific command, use:
msgram <command> -h
Common errors
If the project does not run, check these points first:
python --version
which python
which msgram
If the error is ModuleNotFoundError: No module named 'dotenv', the dependencies were probably not installed in the current environment. Activate the virtual environment and install the requirements again:
source .venv/bin/activate
pip install -r requirements.txt
If the msgram command is not found, check if the virtual environment is activated. You can also run the project using the Python entry point:
python3 main.py -h
If you use msgram init -cp <path>, make sure the parent directory already exists. The simplest option is to run msgram init inside the project folder.
How to run tests
Install the dependencies:
pip install -r requirements.txt
We are using tox for the tests, so it is good to install tox:
pip install tox
Then you can run the tests using:
tox
If you want to specify a test file, use pytest:
pip install pytest pytest-cov pytest-mock
pytest tests/unit/test_calculate.py
License
AGPL-3.0 License
Documentation
The documentation of this project can be accessed at this website: Documentation.
Contribute
Do you want to contribute with our project? Access our contribution guide where we explain how you do it.
Another informations
Our services are available on Docker Hub:
Wiki
For more informations, you can see our wiki:
Demais repositórios do produto
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file msgram-3.3.1rc2.tar.gz.
File metadata
- Download URL: msgram-3.3.1rc2.tar.gz
- Upload date:
- Size: 76.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0bdedf0dbaed59feb41ec7f28c1eeb2b941015c2d9b9452f7908fdeebaaffb4
|
|
| MD5 |
87bfb0cca0fdf0ff08bb496b6a650394
|
|
| BLAKE2b-256 |
fac48be9b9eb7329e80e9b579ecd0c5b7a887309324f46e1767dbbfb1501f3b8
|
Provenance
The following attestation bundles were made for msgram-3.3.1rc2.tar.gz:
Publisher:
python-publish.yml on fga-eps-mds/2026.1-MeasureSoftGram-CLI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
msgram-3.3.1rc2.tar.gz -
Subject digest:
a0bdedf0dbaed59feb41ec7f28c1eeb2b941015c2d9b9452f7908fdeebaaffb4 - Sigstore transparency entry: 2132823998
- Sigstore integration time:
-
Permalink:
fga-eps-mds/2026.1-MeasureSoftGram-CLI@fc1677291dfeeafef1ca200b9c99644961b3db5e -
Branch / Tag:
refs/tags/v3.3.1rc2 - Owner: https://github.com/fga-eps-mds
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@fc1677291dfeeafef1ca200b9c99644961b3db5e -
Trigger Event:
push
-
Statement type:
File details
Details for the file msgram-3.3.1rc2-py3-none-any.whl.
File metadata
- Download URL: msgram-3.3.1rc2-py3-none-any.whl
- Upload date:
- Size: 79.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eda269d6755a6c63219a43b8a1c07220d17a3de6fe564c65a8531ccf107451c6
|
|
| MD5 |
12aaa3718633688800fc16a964e70b38
|
|
| BLAKE2b-256 |
1fe443f03b2575244ce50a581ec4bc13ae0ca998ba896414a231dcce4d5cc337
|
Provenance
The following attestation bundles were made for msgram-3.3.1rc2-py3-none-any.whl:
Publisher:
python-publish.yml on fga-eps-mds/2026.1-MeasureSoftGram-CLI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
msgram-3.3.1rc2-py3-none-any.whl -
Subject digest:
eda269d6755a6c63219a43b8a1c07220d17a3de6fe564c65a8531ccf107451c6 - Sigstore transparency entry: 2132824064
- Sigstore integration time:
-
Permalink:
fga-eps-mds/2026.1-MeasureSoftGram-CLI@fc1677291dfeeafef1ca200b9c99644961b3db5e -
Branch / Tag:
refs/tags/v3.3.1rc2 - Owner: https://github.com/fga-eps-mds
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@fc1677291dfeeafef1ca200b9c99644961b3db5e -
Trigger Event:
push
-
Statement type: