Skip to main content

Verify version in pyproject.toml is not already used

Project description

pyproject-tag-check

I always forget to bump poetry version in pyproject.toml files. That's why I build this simple package. It is pre-commit hook which check that version in pyproject.toml is not used as a tag for given repo URL (must be public repository).

Usage:

Put it in .pre-commit.config.yaml repos and argument must be URL to public repo on GH (for example this repo itself https://github.com/rafsaf/pyproject-tag-check).

repos:
  - repo: https://github.com/rafsaf/pyproject-tag-check
    rev: "1.0.0"
    hooks:
      - id: pyproject-tag-check
        always_run: true
        args:
          - https://github.com/rafsaf/pyproject-tag-check

Use always_run: true if check should be performed always, otherwise it will run only when pyproject.toml is changed.

pyproject.toml usually looks like

[tool.poetry]
name = "some-name..."
version = "0.1.0"

If repository is public and tag 0.1.0 already exists like it does for https://github.com/rafsaf/pyproject-tag-check, the check will not pass.

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

pyproject_tag_check-1.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyproject_tag_check-1.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file pyproject_tag_check-1.1.0.tar.gz.

File metadata

  • Download URL: pyproject_tag_check-1.1.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pyproject_tag_check-1.1.0.tar.gz
Algorithm Hash digest
SHA256 67799c2b6c9795c54cdc8f804d97e95ed89c657d24bf9d5852bb187c5759cbdb
MD5 0979c6c30b9cba14a793a2acb4b4ca73
BLAKE2b-256 20e691513c06add720ec958eec2f7ffe3066b147d0d9acaffe03501de41173c9

See more details on using hashes here.

File details

Details for the file pyproject_tag_check-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyproject_tag_check-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31e73ef80ac050e5636ff5a6dd12605331cdf3d201dfb8d028b5aa2c1e8ee6ed
MD5 c7433096272d926b5b23b9519b244a7d
BLAKE2b-256 85c16ff89c680927ca6e55c4c13afea0b5f337d21084acd0ecd83653dde3155f

See more details on using hashes here.

Supported by

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