Skip to main content

Simple script to generate gitlab code quality report from output of pydocstyle.

Project description

GitLab CI PyPI - Python Version PyPI - License PyPI PyPI - Downloads

pydocstyle-gitlab-code-quality

Generate GitLab Code Quality report from an output of pydocstyle.

Usage

$ pydocstyle <file_path> | pydocstyle-gitlab-code-quality

The output of this command is printed to stdout in JSON format, which can be used as Code Quality report.

Example .gitlab-ci.yml file

image: python:alpine
variables:
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

cache:
  paths:
    - .cache/pip/
    - venv/

before_script:
  - python --version  # For debugging
  - python -m venv venv
  - . venv/bin/activate

codequality:
  script:
    - pip install pydocstyle pydocstyle-gitlab-code-quality
    - pydocstyle program.py > pydocstyle-out.txt
    - pydocstyle-gitlab-code-quality < pydocstyle-out.txt > codequality.json
  artifacts:
    when: always
    reports:
      codequality: codequality.json
  allow_failure: true

Credits

This script was inspired by mypy-gitlab-code-quality. Thanks!

License

The project is licensed under MIT - a free and open-source license. For more information, please see the license file.

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

pydocstyle-gitlab-code-quality-0.0.3.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file pydocstyle-gitlab-code-quality-0.0.3.tar.gz.

File metadata

File hashes

Hashes for pydocstyle-gitlab-code-quality-0.0.3.tar.gz
Algorithm Hash digest
SHA256 b74fb00353c3eb8c2b1348b68e7ec6d1216c48d0ded5427687b29529f973a32b
MD5 4f1ba9d51bbde672d4362d274d6dae0e
BLAKE2b-256 76f80fcaedb3c50a2bc38af6c03e2ca25a3d5381c202ab37a112465eba0dc06e

See more details on using hashes here.

File details

Details for the file pydocstyle_gitlab_code_quality-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pydocstyle_gitlab_code_quality-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 83be065b4a75701a7bea72360af9cf291741882cc1864cee3728bf74828dfee3
MD5 b8d7c3590b343d13900a1e6a0ef6a709
BLAKE2b-256 13510f3eb4706c365ee8be53462af539f5b9a8668636ad48edee99ce51fed3e3

See more details on using hashes here.

Supported by

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