Versioning
Versioning assistance utilities.
- exception pypreset.versioning.VersioningError[source]
Bases:
ExceptionError raised for versioning failures.
- exception pypreset.versioning.CommandFailure[source]
Bases:
VersioningErrorError raised when a command fails.
- class pypreset.versioning.CommandRunner[source]
Bases:
ProtocolProtocol for running shell commands.
- run(args, *, check=True)[source]
Run a command and return the completed process.
- Parameters:
- Return type:
- __init__(*args, **kwargs)
- class pypreset.versioning.SubprocessRunner[source]
Bases:
objectSubprocess-backed command runner.
- Parameters:
cwd (
Path)
- pypreset.versioning.sync_server_file(server_file, version)[source]
Update all
"version": "..."values in a JSON server file.Reads the file as text and performs a regex replacement so the rest of the file (formatting, comments, trailing newline) is preserved exactly.
Returns the number of replacements made.
- class pypreset.versioning.VersioningAssistant[source]
Bases:
objectImplements versioning workflows inspired by the project’s Justfile.
- Parameters: