Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use semver instead of calver for python-gvm releases #1197

Merged
merged 6 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/workflows/release-pontos.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release python-gvm

on:
pull_request:
types: [closed]
workflow_dispatch:
inputs:
release-type:
type: choice
description: "Release type. One of patch, minor or major"
options:
- patch
- minor
- major
release-version:
description: "Set an explicit version, that will overwrite release-type. Fails if version is not compliant."
type: string

jobs:
build-and-release:
name: Create a new release
uses: greenbone/workflows/.github/workflows/release-generic.yml@main
with:
versioning-scheme: semver
release-type: ${{ inputs.release-type }}
release-version: ${{ inputs.release-version }}
secrets: inherit
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ Please always take a look at the documentation for further details. This

### Version

Please consider to always use the **newest** version of `gvm-tools` and `python-gvm`.
We frequently update this projects to add features and keep them free from bugs.
This is why installing `python-gvm` using pip is recommended.
`python-gvm` uses [semantic versioning](https://semver.org/).

Versions prior to 26.0.0 used [calendar versioning](https://calver.org/).

Please consider to always use the **newest** releases of `gvm-tools` and `python-gvm`.
We frequently update these projects to add features and keep them free from bugs.

> [!IMPORTANT]
> To use `python-gvm` with GMP version of 7, 8 or 9 you must use a release version
Expand All @@ -60,20 +63,22 @@ Python 3.9 and later is supported.
You can install the latest stable release of python-gvm from the Python Package
Index using [pip](https://pip.pypa.io/):

python3 -m pip install --user python-gvm
```shell
python3 -m pip install --user python-gvm
```

## Example

```python3
from gvm.connections import UnixSocketConnection
from gvm.protocols.gmp import Gmp
from gvm.protocols.gmp import GMP
from gvm.transforms import EtreeTransform
from gvm.xml import pretty_print

connection = UnixSocketConnection()
transform = EtreeTransform()

with Gmp(connection, transform=transform) as gmp:
with GMP(connection, transform=transform) as gmp:
# Retrieve GMP version supported by the remote daemon
version = gmp.get_version()

Expand Down Expand Up @@ -132,11 +137,13 @@ The python-gvm repository uses [autohooks](https://github.com/greenbone/autohook
to apply linting and auto formatting via git hooks. Please ensure the git hooks
are active.

$ poetry install
$ poetry run autohooks activate --force
```shell
poetry install
poetry run autohooks activate --force
```

## License

Copyright (C) 2017-2024 [Greenbone AG](https://www.greenbone.net/)
Copyright (C) 2017-2025 [Greenbone AG](https://www.greenbone.net/)

Licensed under the [GNU General Public License v3.0 or later](LICENSE).
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ exclude = '''

[tool.ruff]
line-length = 80
target-version = "py311"
target-version = "py39"

[tool.ruff.lint]
extend-select = ["I", "PLE", "PLW"]
Expand Down