Code Scholar
This is a package and command-line utility to check code quality and compliance with best practices.
Installation
Clone or download the source code:
git clone https://github.com/SS-NES/codescholar.gitGo to the root directory:
cd codescholar/Compile and install using pip:
pip install .
CLI Usage
Usage: codescholar [OPTIONS] PATH
Scans 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
Analyse the code in the current working directory and display the report in the terminal:
codescholar .
Analyse the code repository of Code Scholar and display the report in the terminal:
codescholar https://github.com/SS-NES/codescholar
Analyse the code repository of Code Scholar and save the report as report.docx:
codescholar https://github.com/SS-NES/codescholar --format docx --output report.docx
Package Usage
Analyse the code in the current working directory and display the report in the terminal:
import codescholar
# Generate analysis report
report = codescholar.analyse('.')
# Get report output as Markdown
out = report.output(format=codescholar.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 codescholar 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| codescholar-0.2.0.tar.gz | 191.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codescholar-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 402.1 kB
Release files / codescholar-0.2.0.tar.gz
| Download URL | codescholar-0.2.0.tar.gz |
|---|---|
| Size | 191.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d385358c547295e5c74a8d56c523ea845d01aeb8b85e23975b1a783d4e9626b8
|
|
BLAKE2b-256 checksum How to use checksums |
9921d17a067282b9752e98247d9b53d273b3e2aa1ff4e17c5a1cd60b14d681a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|
Release files / codescholar-0.2.0-py3-none-any.whl
| Download URL | codescholar-0.2.0-py3-none-any.whl |
|---|---|
| Size | 210.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3e3aceefe4b08cdf3dd2206e36e205dad51f27ba10ffeb051e27d6deafaa04f
|
|
BLAKE2b-256 checksum How to use checksums |
b8be19edc7dae53dc8ef259e5b76f2678770b5230ab24d3f0e564fd864f3d6e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|
Security for codescholar 0.2.0
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.