Skip to main content

Gitlab issue cross checker. Checks for gitlab tickets to appear in the source and vice versa.

Project description

Ticket Cross Checker

Take gitlab issues and find them in code and vice versa. Create a mapping table to see what's covered, missing or wrong.

An example are the Gitlab Pages for this project.

Usage

start the cross checker in your CI pipeline

pages:
  stage: test
  script:
    - pdm run discover ticket_cross_check spec
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_BRANCH == "main"

Add to existing gitlab pages

  • caches existing public directories and creates a sub-dir tcc
cache:
  paths:
    - public

discover_issues:
  image: python:latest
  stage: build
  script:
    - python -m pip install --upgrade pip
    - pip install ticket_cross_check
    - discover code doc spec test -o public/tcc
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_BRANCH == "main"

Avoid logging

  • we use loguru, you can disable loguru auto init by setting LOGURU_AUTOINIT to False in your environment

Development

Requirements

  • We use pdm for packaging (not pip, poetry or alinke)

  • pdm install shall be run before you do anything (esp. in PyCharm), after that you find a .venv in the project root

  • pdm add [-d] <package> to add more deps (fount in pyproject.toml)

How to install pdm

  • See pdm homepage
  • Usually you run curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 -

Run gitlab-runner locally for single target

  • download/install the gitlab-runner for your system
  • install docker
  • run gitlab-runner exec docker <target> target comes from .gitlab-ci.yml
  • done :)
  • btw caching only works with an S3 backend, see docs

Testing with pytest

Code style with flake8

Local installation and experiements

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

ticket-cross-check-0.9.0.tar.gz (16.1 kB view hashes)

Uploaded Source

Built Distribution

ticket_cross_check-0.9.0-py3-none-any.whl (20.2 kB view hashes)

Uploaded Python 3

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