/semantic-version-check

Check if a 'version' is a valid Semantic Version.

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

SEMANTIC-VERSION-CHECKER

Check if a 'version' is a valid Semantic Version.

GitHub Workflow Status (branch) Read the Docs (version) Codecov Code Climate Maintainability Better Code Hub Technical Debt
Production Version PyPI - Wheel Supported Python versions GitHub GitHub commits since tagged version (branch) GitHub commits since latest release (by SemVer)

Code: https://github.com/boromir674/semantic-version-check
Docs: https://semantic-version-check.readthedocs.io/en/master/
PyPI: https://pypi.org/project/semantic-version-check/
CI: https://github.com/boromir674/semantic-version-check/actions/

Features

  1. semantic_version_check python package
    1. CLI that can be usefull for quick checks, a script or in a CI pipeline
    2. Semantic Version format check, using Regular Expressions
  2. Tested against multiple platforms and python versions

Development

Here are some useful notes related to doing development on this project.

  1. Test Suite, using pytest, located in tests dir
  2. Parallel Execution of Unit Tests, on multiple cpu's
  3. Documentation Pages, hosted on readthedocs server, located in docs dir
  4. Automation, using tox, driven by single tox.ini file
    1. Code Coverage measuring
    2. Build Command, using the build python package
    3. Pypi Deploy Command, supporting upload to both pypi.org and test.pypi.org servers
    4. Type Check Command, using mypy
    5. Lint Check and Apply commands, using isort and black
  5. CI Pipeline, running on Github Actions, defined in .github/
    1. Job Matrix, spanning different platform's and python version's
      1. Platforms: ubuntu-latest, macos-latest
      2. Python Interpreters: 3.6, 3.7, 3.8, 3.9, 3.10
    2. Parallel Job execution, generated from the matrix, that runs the Test Suite

Prerequisites

You need to have Python installed.

Quickstart

Using pip is the approved way for installing semantic_version_check.

python3 -m pip install semantic_version_check
One Use Case for the semantic_version_check is to invoke its cli, through a console
and do SemVer check on a single input string.

Open a console and run:

check-semantic-version 1.0.0
echo $?
echo "Exit code is 0 meaning operation succeeded"

check-semantic-version 1.3
echo $?
echo "Exit code is 1, meaning operation failed"

License

GitHub

License

  • Free software: GNU Affero General Public License v3.0