Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: remove spaces from progressive metrics #3335

Merged
merged 1 commit into from Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions snapcraft/cli/_channel_map.py
Expand Up @@ -144,11 +144,13 @@ def _get_channel_lines_for_channel( # noqa: C901
revision=progressive_revision,
channel_info=channel_info,
hint=current_tick,
progress_string=f"{current_percentage_fmt} {_HINTS.PROGRESSING_TO} {percentage:.0f}%",
progress_string=f"{current_percentage_fmt}{_HINTS.PROGRESSING_TO}{percentage:.0f}%",
)
# Setup progress for the actually released revision, this needs to be
# calculated. But only show it if the channel is open.
progress_string = f"{remaining_percentage_fmt} {_HINTS.PROGRESSING_TO} {100 - percentage:.0f}%"
progress_string = (
f"{remaining_percentage_fmt}{_HINTS.PROGRESSING_TO}{100 - percentage:.0f}%"
)
else:
progress_string = _HINTS.NO_PROGRESS

Expand Down
8 changes: 4 additions & 4 deletions specifications/progressive-releases.org
Expand Up @@ -43,8 +43,8 @@ $ snapcraft status candycane
Track Arch Channel Version Revision Progress
latest all stable - - -
candidate - - -
beta 0.6 8 2320%
10 13 7180%
beta 0.6 8 2320%
10 13 7180%
edge ↑ ↑ -
#+END_SRC

Expand All @@ -57,8 +57,8 @@ Track Arch Channel Version Revision Progress
latest all stable - - -
candidate - - -
beta 10 13 -
edge ↑ ↑ 5540%
11 15 4460%
edge ↑ ↑ 5540%
11 15 4460%
#+END_SRC

** Executing a Release
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/commands/test_release.py
Expand Up @@ -91,7 +91,7 @@ def test_progressive_release(self):
2.1 amd64 stable - - -
candidate - - -
beta - - -
10 19 510%
10 19 510%
edge ↑ ↑ -
The '2.1/beta' channel is now open.
"""
Expand Down Expand Up @@ -209,7 +209,7 @@ def test_progressive_release_with_branch(self):
*EXPERIMENTAL* progressive releases in use.
Track Arch Channel Version Revision Progress Expires at
2.1 amd64 stable - - -
stable/hotfix1 10hotfix 20 ?80% 2020-02-03T20:58:37Z
stable/hotfix1 10hotfix 20 ?80% 2020-02-03T20:58:37Z
candidate - - -
beta 10 19 -
edge ↑ ↑ -
Expand Down Expand Up @@ -251,7 +251,7 @@ def test_progressive_release_with_null_current_percentage(self):
2.1 amd64 stable - - -
candidate - - -
beta - - -
10 19 ?10%
10 19 ?10%
edge ↑ ↑ -
The '2.1/beta' channel is now open.
"""
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/commands/test_status.py
Expand Up @@ -141,8 +141,8 @@ def test_progressive_status(self):
Track Arch Channel Version Revision Progress
2.1 amd64 stable - - -
candidate - - -
beta 10 19 9390%
11 20 710%
beta 10 19 9390%
11 20 710%
edge ↑ ↑ -
"""
)
Expand Down Expand Up @@ -265,7 +265,7 @@ def test_progressive_status_including_branch(self):
*EXPERIMENTAL* progressive releases in use.
Track Arch Channel Version Revision Progress Expires at
2.1 amd64 stable - - -
stable/hotfix1 10hotfix 20 1220% 2020-02-03T20:58:37Z
stable/hotfix1 10hotfix 20 1220% 2020-02-03T20:58:37Z
candidate - - -
beta 10 19 -
edge ↑ ↑ -
Expand Down Expand Up @@ -293,7 +293,7 @@ def test_progressive_status_with_null_current_percentage(self):
2.1 amd64 stable - - -
candidate - - -
beta - - -
10 19 ?10%
10 19 ?10%
edge ↑ ↑ -
"""
)
Expand Down