code-auditor

A package and command-line utility to audit code quality and compliance to the best practices.

https://github.com/ss-nes/code-auditor

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.6%) to scientific vocabulary

Keywords

code-quality conformity-assessment software-development
Last synced: 6 months ago · JSON representation ·

Repository

A package and command-line utility to audit code quality and compliance to the best practices.

Basic Info
  • Host: GitHub
  • Owner: SS-NES
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 378 KB
Statistics
  • Stars: 2
  • Watchers: 6
  • Forks: 0
  • Open Issues: 2
  • Releases: 2
Topics
code-quality conformity-assessment software-development
Created over 1 year ago · Last pushed 9 months ago
Metadata Files
Readme License Citation

README.rst

.. list-table::
   :widths: 25 25
   :header-rows: 1

   * - `fair-software.nl `_ recommendations
     - Badges
   * - \1. Code repository
     - |GitHub Badge|
   * - \2. License
     - |License Badge|
   * - \3. Community Registry
     - |PyPI Badge|
   * - \4. Enable Citation
     - |Zenodo Badge|

.. |GitHub Badge| image:: https://img.shields.io/github/v/release/SS-NES/code-auditor?color=blue
   :target: https://github.com/SS-NES/code-auditor
   :alt: GitHub Badge

.. |License Badge| image:: https://img.shields.io/badge/license-GPLv3-blue
   :target: https://opensource.org/license/gpl-3-0
   :alt: License Badge

.. |PyPI Badge| image:: https://img.shields.io/pypi/v/code-auditor?colorB=blue
   :target: https://pypi.org/project/code-auditor/
   :alt: PyPI Badge

.. |Zenodo Badge| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.14934232.svg
   :target: https://doi.org/10.5281/zenodo.14934232
   :alt: Zenodo Badge


code-auditor
============

This is a package and command-line utility to audit code quality and compliance
with best practices.


Installation
------------

The package and command-line utility can be installed easily from `PyPI`_ using
``pip``.

.. code:: shell

    pip install code-auditor


To install a specific version, e.g. v0.2.0, use:

.. code:: shell

    pip install code-auditor==0.2.0


To upgrade to the latest version:

.. code:: shell

    pip install --upgrade code-auditor


For the latest development version, you can install directly from the source:

.. code:: shell

    git clone https://github.com/SS-NES/code-auditor.git
    cd code-auditor/
    pip install .


.. _PyPI: https://pypi.org/project/code-auditor/


CLI Usage
---------

.. code:: console

   Usage: codeauditor [OPTIONS] PATH

     Audits the code base, where PATH is the path or URL address of the code base.

   Options:
     --skip-analyser [change_log|citation|code_markdown|code_python|conduct|contributing|dependency_python|documentation|git|jupyter_notebook|license|notice|packaging_python|testing_python]
                                     List of analysers to skip.
     --skip-aggregator [citation|code|community|documentation|license|packaging|repository|testing|version_control|metadata]
                                     List of aggregators to skip.
     --skip-type [citation|code|community|dependency|documentation|license|metadata|packaging|publishing|repository|testing|version_control]
                                     List of processor types to skip.
     -r, --reference FILENAME        Path of the reference metadata for
                                     comparison (e.g. SMP).
     -b, --branch TEXT               Branch or tag of the remote code repository.
     -t, --path-type [zip|tar|tgz|tar.gz|git]
                                     Type of the file located at the path.
     -m, --metadata FILENAME         Path to store the metadata extracted from
                                     the code base.
     -o, --output PATH               Path to store the output.
     -f, --format [plain|html|json|yaml|markdown|rst|rtf|docx]
                                     Output format.  [default: rst]
     -p, --plain                     Enable plain output.
     -l, --message-level INTEGER RANGE
                                     Message level.  [default: 1; 1<=x<=5]
     -d, --debug                     Enable debug mode.
     -v, --version                   Show the version and exit.
     -h, --help                      Show this message and exit.


Examples
~~~~~~~~

Audit the code in the current working directory and display the report in
the terminal:

.. code:: console

   codeauditor .


Audit the code repository of code-auditor and display the report in the
terminal:

.. code:: console

   codeauditor https://github.com/SS-NES/code-auditor


Audit the code repository of code-auditor and save the report as report.docx:

.. code:: console

   codeauditor https://github.com/SS-NES/code-auditor --format docx --output report.docx


Package Usage
-------------

Audit the code in the current working directory and display the report in
the terminal:

.. code:: python

   import codeauditor

   # Generate audit report
   report = codeauditor.audit('.')

   # Get report output as Markdown
   out = report.output(format=codeauditor.report.OutputType.MARKDOWN)

   # Display output
   print(out)


Acknowledgements
----------------

This software was developed as part of the TDCC-NES Bottleneck Project "`Best
Practices for Sustainable Software `_" funded by the Thematic Digital
Competence Centre (`TDCC`_) for the Natural & Engineering Sciences (`NES`_).

.. _TDCC: https://tdcc.nl/
.. _NES: https://tdcc.nl/about-tddc/nes/
.. _SS-NES: https://tdcc.nl/projects/project-initiatives-nes/tdcc-nes-bottleneck-projects/best-practices-for-sustainable-software/

Owner

  • Name: SS-NES
  • Login: SS-NES
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
title: code-auditor
message: >-
  A package and command-line utility to audit code quality
  and compliance with best practices.
type: software
authors:
  - given-names: Serkan
    family-names: Girgin
    email: girgink@gmail.com
    affiliation: University of Twente
    orcid: 'https://orcid.org/0000-0002-0156-185X'
doi: 'https://doi.org/10.5281/zenodo.14934232'
repository: 'https://doi.org/10.5281/zenodo.14934232'
repository-artifact: 'https://pypi.org/project/code-auditor/'
repository-code: 'https://github.com/SS-NES/code-auditor/'
abstract: >-
  A package and command-line utility to audit code quality
  and compliance with best practices.
keywords:
  - software development
  - code quality
  - conformity assessment
license: GPL-3.0
version: 0.2.1
date-released: '2025-02-27'

GitHub Events

Total
  • Create event: 1
  • Issues event: 1
  • Release event: 1
  • Issue comment event: 4
  • Push event: 6
Last Year
  • Create event: 1
  • Issues event: 1
  • Release event: 1
  • Issue comment event: 4
  • Push event: 6

Dependencies

pyproject.toml pypi
  • click >=7.0, <9
  • docstring_parser *
  • gitpython *
  • jinja2 *
  • pip-requirements-parser *
  • pymarkdownlnt *
  • pypandoc *
  • pyyaml *
requirements.txt pypi
  • click >=7.0,<9
  • docstring_parser *
  • gitpython *
  • jinja2 *
  • pip-requirements-parser *
  • pymarkdownlnt *
  • pypandoc *
  • pyyaml *