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

Append a version and associated changes description to the changelog.

patch_bump

Bump the patch of the current version with associated changes description.

minor_bump

Bump the minor of the current version with associated changes description.

major_bump

Bump the major of the current version with associated changes description.

expect_version

Check the current latest version of the changelog.

changes_for_version

Return changes description for a specific version in the changelog.

last_version

Highest version in the changelog.

versions

List of all versions for which the changelog stores descriptions.

gdc

__getitem__

Return item at the given index or changes description for the given version.

__len__

Return the number of items in the changelog.

__contains__

Check if version is in the changelog.

__str__

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.