pontos.version.project package¶
- class pontos.version.project.Project(versioning_scheme)¶
A project for handling versioning
Example
from pontos.version.scheme import PEP440VersioningScheme from pontos.version.project import Project project = Project(PEP440VersioningScheme)
Creates a new project instance
- Parameters:
versioning_scheme (VersioningScheme | Type[VersioningScheme]) – Scheme for version handling
- Raises:
ProjectError – If no fitting VersionCommand could be found
- update_version(new_version, *, force=False)¶
Update the current version of this project
- Parameters:
- Returns:
The version update including the changed files
- Return type:
- get_current_version()¶
Get the current version of the project
- Returns:
The current version
- Return type:
- verify_version(version)¶
Verify the current version of this project
- Parameters:
version (Literal['current'] | ~pontos.version._version.Version) – Version to check against the current applied version of this project. If version is “current” the command should verify if all version information is consistent, for example if the version information in several files is the same.