visualize
Visualize the bumpversion process.
Classes¶
Border
dataclass
¶
Border(corner_bottom_right: str, corner_top_right: str, corner_top_left: str, corner_bottom_left: str, divider_left: str, divider_up: str, divider_down: str, divider_right: str, line: str, pipe: str, cross: str)
A border definition.
Functions:¶
connection_str
¶
connection_str(border: Border, has_next: bool = False, has_previous: bool = False) -> str
Return the correct connection string based on the next and previous.
| PARAMETER | DESCRIPTION |
|---|---|
border
|
The border definition to draw the lines
TYPE:
|
has_next
|
If
TYPE:
|
has_previous
|
If
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
A string that connects left-to-right and top-to-bottom based on the next and previous |
filter_version_parts
¶
filter_version_parts(config: Config) -> List[str]
labeled_line
¶
labeled_line(label: str, border: Border, fit_length: Optional[int] = None) -> str
lead_string
¶
lead_string(version_str: str, border: Border, blank: bool = False) -> str
Return the first part of a string with the bump character or spaces of the correct amount.
Examples:
>>> lead_string("1.0.0", Border(*BOX_CHARS["light"]))
'1.0.0 ── bump ─'
>>> lead_string("1.0.0", Border(*BOX_CHARS["light"]), blank=True)
' '
| PARAMETER | DESCRIPTION |
|---|---|
version_str
|
The string to render as the starting point
TYPE:
|
border
|
The border definition to draw the lines
TYPE:
|
blank
|
If
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
The version bump string or a blank string |
visualize
¶
visualize(config: Config, version_str: str, box_style: str = 'light') -> None
Output a visualization of the bump-my-version bump process.