Skip to main content

Quality Tool

Setup

Make sure you have Poetry >= 1.2.0 installed. You can then get started by running:

poetry install

Code duplication - cpd

As of this moment, we are using copy paste detector to find duplicate code. This requires you to download cpd and place the bin/ and lib/ folder (and their files) in a cpd subfolder in metrics (metrics/cpd/<cpd folders goes here>).

You can download cpd from the following link (check if there is a newer release): https://github.com/pmd/pmd/releases/tag/pmd_releases/6.54.0

Programming Language Detection - GitHub Linguist

To detect the programming languages of source code files we use GitHub linguist by running it in a docker container. Make sure you have Docker >= 23.0.4 installed. You will also need to pull the docker image for GitHub Linguist:

docker pull toffernator/linguist

Running, Testing, and Formatting

This is all done using poetry. To run:

poetry run core <path/to/source/code> <Quality_model>

e.g.

poetry run core . code_climate

To see supported languages please refer to: byoqm/source_coordinator/languages.py

Optional values can be gotten by running:

poetry run core --help

To test:

poetry run test

To format:

poetry run black .

Building Tree-Sitter Grammars

Make sure you have a build/ and grammars/ folders in the root of the project:

mkdir build grammars

Clone the python grammar into grammars/:

cd grammars && git clone --depth 1 https://github.com/tree-sitter/tree-sitter-python && git clone --depth 1 https://github.com/tree-sitter/tree-sitter-c-sharp && git clone --depth 1 https://github.com/tree-sitter/tree-sitter-java && cd -

Build the grammar file:

poetry run python core/build_treesitter.py

Release files for milkfrog 0.1.0

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

Source distribution (sdist)

Source distribution for milkfrog 0.1.0
File Size Uploaded
milkfrog-0.1.0.tar.gz 24.4 kB Details

Built distribution (wheel)

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

Total release size: 54.3 kB

Release files / milkfrog-0.1.0.tar.gz

Download URL milkfrog-0.1.0.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
54950e6e800928a5e8553da51f029f38aa4d2be6b685ee8a100427abe96eaf5e
BLAKE2b-256 checksum
How to use checksums
caa905066cb5e4bb90dbfd07cc17d3f80b498f8d0dc460967bb5c7f2a246f79e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.3 Linux/6.4.2-arch1-1

Release files / milkfrog-0.1.0-py3-none-any.whl

Download URL milkfrog-0.1.0-py3-none-any.whl
Size 29.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2766dfb12cd6016f99f52be67fd1b2b3b972711688bbc90b4de9e813ca08ba91
BLAKE2b-256 checksum
How to use checksums
e79261a749a2246a777a4d596008f2bac72b8a077110b30d11cda9359779500d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.3 Linux/6.4.2-arch1-1

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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