A Python library for calculating SCOM cohesion value for a microservice
Project description
Cohesion Calculator
This project contains the definitions of the cohesion_calculator library which calculates Sensitive Class Cohesion Metric (SCOM) based on provided JSON input. The folder cohesion\cohesion_calculator provides the full implementation code for this. You can adjust and expand this implementation for your needs.
Currently it can only be used locally, so whether you made adjustments or not, you have to build and install the library.
Setup
Install dependencies
-
Create a text file named requirements.txt with following content:
build setuptools wheel twine pytest pytest-runner -
Install all neccessary requirements using
pip install -r requirements.txt
Build library
Following command builds the library according to the definition provided in setup.py: python -m build --wheel
(Optional) Run tests
pytest tests.py
Install library
In the dist folder, a new whl-file should have been generated. Adjust the name accordingly.
pip install "dist\cohesion_measuring-0.1-py3-none-any.whl"
Use library
The library can be imported like import cohesion_calculator
NOT DONE YET - Publish to PyPI
The library has not yet been published.
twine upload dist/\*
pip install cohesion_measuring
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 cohesion_measuring-0.1.tar.gz.
File metadata
- Download URL: cohesion_measuring-0.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
770b8bc7b2ca3928e45c5f7ba0ffb359ae2f0f6154dbc78f90f436a09419c55d
|
|
| MD5 |
9f9cd56bb3b96e4bb2dc86fcd1633272
|
|
| BLAKE2b-256 |
eb22780807cfe00968dc284aad6db6d5082dfccf7772584de12b171088261b29
|
File details
Details for the file cohesion_measuring-0.1-py3-none-any.whl.
File metadata
- Download URL: cohesion_measuring-0.1-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40a853348a432aa3860f74fc87d9854ca52e5bff604fbb18d3ed7f4ada88d57b
|
|
| MD5 |
9bea5044a598122135c44a0ec7e147c0
|
|
| BLAKE2b-256 |
e762a9e9212bd56608e4cdaed432f4139f7bdd2ae03d2d1dcaff41626d0e910b
|