diff --git a/.github/workflows/release-pontos.yml b/.github/workflows/release-pontos.yml deleted file mode 100644 index 561396165..000000000 --- a/.github/workflows/release-pontos.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Release Python package - -on: - pull_request: - types: [closed] - workflow_dispatch: - -jobs: - build-and-release: - name: Create a new release - uses: greenbone/workflows/.github/workflows/release-python.yml@main - secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..6b14adf0c --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/README.md b/README.md index 1d29610d0..52fec8f1f 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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() @@ -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). diff --git a/pyproject.toml b/pyproject.toml index c09c7bc90..157d623bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ exclude = ''' [tool.ruff] line-length = 80 -target-version = "py311" +target-version = "py39" [tool.ruff.lint] extend-select = ["I", "PLE", "PLW"]