mlpylint


Namemlpylint JSON
Version 0.0.3 PyPI version JSON
download
home_page
SummaryMLpylint, a static analysis tool for identifying ML-specific code smells
upload_time2023-07-27 12:27:35
maintainer
docs_urlNone
authorPeter Hamfelt
requires_python
license
keywords linting static-analysis python-linting python-static-analysis machine-learning machine-learning-engineering ml-model-quality artificial-intelligence python software-quality technical-debt software-engineering maintainability code-smell
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mlpylint

A static code analyzer tool for identifying ml-specific code smells.

## Description

MLpylint is a static code analyzer designed specifically for Python applications. Drawing from extensive research in the
field of ML-specific code smells, MLpylint focuses on identifying ML-specific issues in your code. This assists in
enhancing the readability, maintainability, and efficiency of your ML codebase, ensuring it adheres to best practices in
the field of artificial intelligence and machine learning software development.

## Getting started

The project structure is organized into three main components:

1. Code Smell Checkers: These are the core of our tool, designed to identify specific code smells in your Python scripts.

2. Test Scripts: Each code smell checker comes with an associated test script. These are used to validate the functionality of each checker, ensuring it correctly identifies its corresponding code smell.

3. Code Smell Test Files: These are Python scripts that contain examples of code smells. They serve as practical test cases for the code smell checkers, helping to ensure that the checkers are accurately identifying the intended code smells.

This organization allows for easy identification of different aspects of the tool, facilitating testing, extension, and maintenance.


## Installation

```
cd mlpylint
py -m venv venv
source venv/Scripts/activate
pip install -e .[dev]
```

## Update PyPI Package

```
=== Token required from PyPI ===
Create .pypirc file in C:\Users\<user_name> with pypi token parameters

=== In project root dir ===
py -m pip install --upgrade pip
py -m pip install --upgrade build
py -m build
py -m pip install --upgrade twine
py -m twine upload dist/*

```

## Usage

```
$ mlpylint --help                          # View tool options
$ mlpylint <path>                          # Check for code smells (CS)
$ mlpylint -a,  --advice <path>            # Check for code smells (CS) and include advisory results (CSA)
$ mlpylint -ls, --list-smells              # List all available code smells
$ mlpylint -ds, --describe-smell <id>      # Get code smell description by id
$ mlpylint -c,  --color <path>             # Enable colorized analysis output
```

## Analysis assumptions:

- Imports and ImportFrom are done at the top of the .py file. It is considered a best practice to put all import
  statements at the top of a Python file. This makes it easier to read and understand the dependencies of the file, and
  can help prevent issues with circular imports.


## Author

Peter Hamfelt - [peter.hamfelt@gmail.com, pehd16@student.bth.se]

## Acknowledgements
This work is inspired by and built upon the research conducted by the following individuals:

* Haiyin Zhang from AI for Fintech Research, ING, Amsterdam, Netherlands.
* Luís Cruz from Delft University of Technology, Delft, Netherlands.
* Arie van Deursen from Delft University of Technology, Delft, Netherlands.

Their contribution towards identifying and categorizing "Code Smells for Machine Learning Applications" has played a
crucial role in the development of this tool. I would like to express my deepest gratitude for their pioneering work
in this field.

Research link: https://arxiv.org/abs/2203.13746

## License

MIT License

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "mlpylint",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "linting,static-analysis,python-linting,python-static-analysis,machine-learning,machine-learning-engineering,ML-model-quality,artificial-intelligence,python,software-quality,technical-debt,software-engineering,maintainability,code-smell",
    "author": "Peter Hamfelt",
    "author_email": "peter.hamfelt@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ef/ae/2b8d647ac0c6bfad18f8cbc3ea420bd6cf62682d72a29c69b827a8cb0814/mlpylint-0.0.3.tar.gz",
    "platform": null,
    "description": "# mlpylint\r\n\r\nA static code analyzer tool for identifying ml-specific code smells.\r\n\r\n## Description\r\n\r\nMLpylint is a static code analyzer designed specifically for Python applications. Drawing from extensive research in the\r\nfield of ML-specific code smells, MLpylint focuses on identifying ML-specific issues in your code. This assists in\r\nenhancing the readability, maintainability, and efficiency of your ML codebase, ensuring it adheres to best practices in\r\nthe field of artificial intelligence and machine learning software development.\r\n\r\n## Getting started\r\n\r\nThe project structure is organized into three main components:\r\n\r\n1. Code Smell Checkers: These are the core of our tool, designed to identify specific code smells in your Python scripts.\r\n\r\n2. Test Scripts: Each code smell checker comes with an associated test script. These are used to validate the functionality of each checker, ensuring it correctly identifies its corresponding code smell.\r\n\r\n3. Code Smell Test Files: These are Python scripts that contain examples of code smells. They serve as practical test cases for the code smell checkers, helping to ensure that the checkers are accurately identifying the intended code smells.\r\n\r\nThis organization allows for easy identification of different aspects of the tool, facilitating testing, extension, and maintenance.\r\n\r\n\r\n## Installation\r\n\r\n```\r\ncd mlpylint\r\npy -m venv venv\r\nsource venv/Scripts/activate\r\npip install -e .[dev]\r\n```\r\n\r\n## Update PyPI Package\r\n\r\n```\r\n=== Token required from PyPI ===\r\nCreate .pypirc file in C:\\Users\\<user_name> with pypi token parameters\r\n\r\n=== In project root dir ===\r\npy -m pip install --upgrade pip\r\npy -m pip install --upgrade build\r\npy -m build\r\npy -m pip install --upgrade twine\r\npy -m twine upload dist/*\r\n\r\n```\r\n\r\n## Usage\r\n\r\n```\r\n$ mlpylint --help                          # View tool options\r\n$ mlpylint <path>                          # Check for code smells (CS)\r\n$ mlpylint -a,  --advice <path>            # Check for code smells (CS) and include advisory results (CSA)\r\n$ mlpylint -ls, --list-smells              # List all available code smells\r\n$ mlpylint -ds, --describe-smell <id>      # Get code smell description by id\r\n$ mlpylint -c,  --color <path>             # Enable colorized analysis output\r\n```\r\n\r\n## Analysis assumptions:\r\n\r\n- Imports and ImportFrom are done at the top of the .py file. It is considered a best practice to put all import\r\n  statements at the top of a Python file. This makes it easier to read and understand the dependencies of the file, and\r\n  can help prevent issues with circular imports.\r\n\r\n\r\n## Author\r\n\r\nPeter Hamfelt - [peter.hamfelt@gmail.com, pehd16@student.bth.se]\r\n\r\n## Acknowledgements\r\nThis work is inspired by and built upon the research conducted by the following individuals:\r\n\r\n* Haiyin Zhang from AI for Fintech Research, ING, Amsterdam, Netherlands.\r\n* Lu\u00eds Cruz from Delft University of Technology, Delft, Netherlands.\r\n* Arie van Deursen from Delft University of Technology, Delft, Netherlands.\r\n\r\nTheir contribution towards identifying and categorizing \"Code Smells for Machine Learning Applications\" has played a\r\ncrucial role in the development of this tool. I would like to express my deepest gratitude for their pioneering work\r\nin this field.\r\n\r\nResearch link: https://arxiv.org/abs/2203.13746\r\n\r\n## License\r\n\r\nMIT License\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "MLpylint, a static analysis tool for identifying ML-specific code smells",
    "version": "0.0.3",
    "project_urls": null,
    "split_keywords": [
        "linting",
        "static-analysis",
        "python-linting",
        "python-static-analysis",
        "machine-learning",
        "machine-learning-engineering",
        "ml-model-quality",
        "artificial-intelligence",
        "python",
        "software-quality",
        "technical-debt",
        "software-engineering",
        "maintainability",
        "code-smell"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "41d3b026eeb037eb2f5c497c5f0a7ea754a500fbfc18217a76a7021e34d8af5b",
                "md5": "5de456ce6a6149f1134766e1a42450c2",
                "sha256": "a65b3ca35bf0c7afda5f94f569d93292bc14b2628fde848ccdadf52192d9115e"
            },
            "downloads": -1,
            "filename": "mlpylint-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5de456ce6a6149f1134766e1a42450c2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 71279,
            "upload_time": "2023-07-27T12:27:33",
            "upload_time_iso_8601": "2023-07-27T12:27:33.492183Z",
            "url": "https://files.pythonhosted.org/packages/41/d3/b026eeb037eb2f5c497c5f0a7ea754a500fbfc18217a76a7021e34d8af5b/mlpylint-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "efae2b8d647ac0c6bfad18f8cbc3ea420bd6cf62682d72a29c69b827a8cb0814",
                "md5": "a8d796437506a4f526730ba039de8b0e",
                "sha256": "5422be5f3c31c0444458dbb2f9acfc184ab644beafdfbf149dbcc563d99db770"
            },
            "downloads": -1,
            "filename": "mlpylint-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "a8d796437506a4f526730ba039de8b0e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 37733,
            "upload_time": "2023-07-27T12:27:35",
            "upload_time_iso_8601": "2023-07-27T12:27:35.369978Z",
            "url": "https://files.pythonhosted.org/packages/ef/ae/2b8d647ac0c6bfad18f8cbc3ea420bd6cf62682d72a29c69b827a8cb0814/mlpylint-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-27 12:27:35",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mlpylint"
}
        
Elapsed time: 0.09474s