Changelog
#
- class ansys.dpf.core.changelog.Changelog(gdc: ansys.dpf.core.GenericDataContainer = None, server: ansys.dpf.core.server_types.AnyServerType = None)#
Changelog of an operator.
Requires DPF 11.0 (2026 R1) or above.
- Parameters:
gdc – An optional GenericDataContainer to initialize the changelog with.
server – The server to create the changelog on. Defaults to the current global server.
Overview#
Append a version and associated changes description to the changelog. |
|
Bump the patch of the current version with associated changes description. |
|
Bump the minor of the current version with associated changes description. |
|
Bump the major of the current version with associated changes description. |
|
Check the current latest version of the changelog. |
|
Return changes description for a specific version in the changelog. |
Highest version in the changelog. |
|
List of all versions for which the changelog stores descriptions. |
Return item at the given index or changes description for the given version. |
|
Return the number of items in the changelog. |
|
Check if version is in the changelog. |
|
Create string representation of the changelog. |
Import detail#
from ansys.dpf.core.changelog import Changelog
Property detail#
- property Changelog.last_version: packaging.version.Version#
Highest version in the changelog.
- Returns:
Highest version in the changelog.
- Return type:
version
- property Changelog.versions: [packaging.version.Version]#
List of all versions for which the changelog stores descriptions.
Attribute detail#
- Changelog.gdc = None#
Method detail#
- Changelog.append(version: packaging.version.Version, changes: str)#
Append a version and associated changes description to the changelog.
- Changelog.patch_bump(changes: str) Changelog #
Bump the patch of the current version with associated changes description.
- Parameters:
changes – Description of the changes associated to the patch bump.
- Returns:
Returns the current changelog to allow for chaining calls to bumps.
- Return type:
changelog
- Changelog.minor_bump(changes: str) Changelog #
Bump the minor of the current version with associated changes description.
- Parameters:
changes – Description of the changes associated to the minor bump.
- Returns:
Returns the current changelog to allow for chaining calls to bumps.
- Return type:
changelog
- Changelog.major_bump(changes: str) Changelog #
Bump the major of the current version with associated changes description.
- Parameters:
changes – Description of the changes associated to the major bump.
- Returns:
Returns the current changelog to allow for chaining calls to bumps.
- Return type:
changelog
- Changelog.expect_version(version: packaging.version.Version | str) Changelog #
Check the current latest version of the changelog.
Useful when chaining version bumps to check the resulting version is as expected. Adds readability to the specification of the operator.
- Parameters:
version – Expected current latest version of the changelog.
- Returns:
Returns the current changelog to allow for chaining calls to bumps.
- Return type:
changelog
- Changelog.__getitem__(item: packaging.version.Version | int) str | [packaging.version.Version, str] #
Return item at the given index or changes description for the given version.
- Changelog.__len__()#
Return the number of items in the changelog.
- Changelog.__contains__(item: packaging.version.Version)#
Check if version is in the changelog.
- Changelog.changes_for_version(version: packaging.version.Version) str #
Return changes description for a specific version in the changelog.
- Changelog.__str__()#
Create string representation of the changelog.