Skip to main content

fair-software.nl recommendations

Badges

1. Code repository

GitHub Badge

2. License

License Badge

3. Community Registry

PyPI Badge

4. Enable Citation

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.

pip install code-auditor

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

pip install code-auditor==0.2.0

To upgrade to the latest version:

pip install --upgrade code-auditor

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

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

CLI Usage

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 analysis 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:

codeauditor .

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

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

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

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:

import codeauditor

# Generate analysis report
report = codeauditor.analyse('.')

# 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).

Metadata

Release files for code-auditor 0.2.1

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

Source distribution (sdist)

Source distribution for code-auditor 0.2.1
File Size Uploaded Provenance
code_auditor-0.2.1.tar.gz 93.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for code-auditor 0.2.1
File Interpreter ABI Platform
code_auditor-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 203.1 kB

Release files / code_auditor-0.2.1.tar.gz

Download URL code_auditor-0.2.1.tar.gz
Size 93.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3e3cf19d5c22b69c69c57e956dc2eb91c73002214b958cc86dbc41ab263b1d8f
BLAKE2b-256 checksum
How to use checksums
a88cbafed56deb65d984047e9a5560551fdb331f0852209b2433b225763d6050
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Release files / code_auditor-0.2.1-py3-none-any.whl

Download URL code_auditor-0.2.1-py3-none-any.whl
Size 109.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c02ae418c8bfc5f533881b570f9e344be15caf40f25ac7ccd4a45d39b545655
BLAKE2b-256 checksum
How to use checksums
122fec4d4b7e2bdb3c2d05d9237ddbddbb168c9f9de64bbac7cc6a28a98d0469
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Security for code-auditor 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

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