Skip to main content

Matheel: A CLI and Python package for source-code similarity detection.

Project description

Matheel

Tests PyPI Python versions Docs Latest release License

Matheel is a Python package and CLI for source-code similarity. It combines semantic embeddings, lexical similarity, chunking, preprocessing, and code evaluation metrics in one workflow.

Installation

Matheel supports Python 3.10 to 3.13.

Recommended install:

pip install "matheel[all]"

For a lightweight install without optional semantic, chunking, metrics, and Gradio dependencies:

pip install matheel

Installation options are covered in the usage guide.

Quick Start

python examples/sample_data.py --output sample_pairs.zip --overwrite
matheel compare sample_pairs.zip \
  --feature-weight levenshtein=1.0 \
  --num 10
from matheel.similarity import calculate_similarity

score = calculate_similarity(
    "def add(a, b):\n    return a + b\n",
    "def add(x, y):\n    return x + y\n",
    feature_weights={"levenshtein": 1.0},
)
print(round(score, 4))

See the usage guide for semantic models, archives, comparison suites, custom algorithms, chunking, preprocessing, visualization, leaderboards, and code metrics.

Links

Development

Contributor setup, tests, linting, package checks, and release preparation are documented in the development docs.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matheel-0.5.4.tar.gz (174.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matheel-0.5.4-py3-none-any.whl (131.9 kB view details)

Uploaded Python 3

File details

Details for the file matheel-0.5.4.tar.gz.

File metadata

  • Download URL: matheel-0.5.4.tar.gz
  • Upload date:
  • Size: 174.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for matheel-0.5.4.tar.gz
Algorithm Hash digest
SHA256 35e93db866236b69fe47fa6eb9c9e2df8cf9fc72d59da21c6956e42b0d7a463a
MD5 c15885155d11303317ac0e5b37a6b87b
BLAKE2b-256 5f846b660554889dc265b2e33a153dfe1dd60d9ba399b6fbfd66845095278065

See more details on using hashes here.

Provenance

The following attestation bundles were made for matheel-0.5.4.tar.gz:

Publisher: publish.yml on FahadEbrahim/matheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file matheel-0.5.4-py3-none-any.whl.

File metadata

  • Download URL: matheel-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 131.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for matheel-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9c450d53f4a44b2d2f9e2f5e2538a784b66c65311a69300a4060ed192ef382c6
MD5 fcdcd676a5a4862d5d618ddcdf9c5703
BLAKE2b-256 8409e09e8cbafb86c61c0d0ce644b455ced5d921ec7c3fb71ef39b52abb6dd31

See more details on using hashes here.

Provenance

The following attestation bundles were made for matheel-0.5.4-py3-none-any.whl:

Publisher: publish.yml on FahadEbrahim/matheel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page