Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
A plugin for hatch to support semantic versioning. Hatch-semver relies on python-semver for all the versioning logic.
Introduce hatch-semver as a build-dependency to your project (in your pyproject.toml
):
[build-system]
requires = [
"hatchling",
"hatch-semver",
]
build-backend = "hatchling.build"
Further down in pyproject.toml
,
where you set up the hatch version command,
set version scheme to semver
:
[tool.hatch.version]
path = "src/<your_project>/__about__.py"
validate-bump = true
scheme = "semver"
Hatch-semver plugin will only work with project versions which can be readily parsed by python-semver. Therefore, if you are introducing hatch-semver into an existing project, you must make sure that the project's current version is a valid semantic version. You can test that here.
Many of hatch's standard versioning commands also work for hatch-semver to bump your project's version in a semver-compliant way.
Such command is written as a single string of comma-separated bump instructions as a positional argument of the hatch version
subcommand, i.e hatch version <COMMAND>
.
Starting with 0.1.0
as the original version, here is a series of example commands which illustrate some common ways how to bump the version:
Old Version | Command | New Version |
---|---|---|
0.1.0 | patch | 0.1.1 |
0.1.1 | minor,patch,patch | 0.2.2 |
0.2.2 | minor | 0.3.0 |
0.3.0 | rc | 0.3.1-rc.1 |
0.3.1-rc.1 | rc | 0.3.1-rc.2 |
0.3.1-rc.2 | release | 0.3.1 |
0.3.1 | 0.9.5 | 0.9.5 |
0.9.5 | major,rc | 1.0.0-rc.1 |
1.0.0-rc.1 | release | 1.0.0 |
See the command reference for all the commands in full detail. If you are familiar with hatch's standard versioning scheme, perhaps a comparison of the standard scheme and hatch-semver will be of interest.
FAQs
Hatch plugin for semver versioning scheme
We found that hatch-semver demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.