Skip to content

fix(ENG-2912): CLI typos and doc changes #154

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ The CLI currently supports the following commands (and sub-commands):
- `vagrant`: Push (upload) a new Vagrant package upstream.
- `quarantine`|`block`: Manage quarantined packages in a repository.
- `add`: Add a package to quarantine.
- `remove`|`rm`|`restore`: Add a package to quarantine.
- `quota`: Quota limits and history for a organisation.
- `limits`: Display the Quota (bandwidth & storage usage/limits) for a specific organisation.
- `history`: Display the Quota History (upload, download, and storage usage/limits) for a specific organisation.
- `remove`|`rm`|`restore`: Remove a package from quarantine.
- `quota`: Quota limits and history for a organization.
- `limits`: Display the Quota (bandwidth & storage usage/limits) for a specific organization.
- `history`: Display the Quota History (upload, download, and storage usage/limits) for a specific organization.
- `repositories`|`repos`: Manage repositories.
- `create`|`new`: Create a new repository in a namespace.
- `get`|`list`|`ls`: List repositories for a user, in a namespace or get details for a specific repository.
- `update`: Update a repository in a namespace.
- `delete`|`rm`: Delete a repository from a namespace.
- `resync`: Resynchronise a package in a repository.
- `status`: Get the synchronisation status for a package.
- `resync`: Resynchronize a package in a repository.
- `status`: Get the synchronization status for a package.
- `tags`: Manage the tags for a package in a repository.
- `add`: Add tags to a package in a repository.
- `clear`: Clear all existing (non-immutable) tags from a package in a repository.
Expand Down
2 changes: 1 addition & 1 deletion cloudsmith_cli/cli/commands/policy/license.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def ls(ctx, opts, owner, page, page_size):
List license policies.

This requires appropriate permissions for the owner (a member of the
organisation and a valid API key).
organization and a valid API key).

- OWNER: Specify the OWNER namespace (i.e. org)

Expand Down
2 changes: 1 addition & 1 deletion cloudsmith_cli/cli/commands/policy/vulnerability.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def ls(ctx, opts, owner, page, page_size):
List vulnerability policies.

This requires appropriate permissions for the owner (a member of the
organisation and a valid API key).
organization and a valid API key).

- OWNER: Specify the OWNER namespace (i.e. org)

Expand Down
10 changes: 5 additions & 5 deletions cloudsmith_cli/cli/commands/push.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def create_package(ctx, opts, owner, repo, package_type, skip_errors, **kwargs):
def wait_for_package_sync(
ctx, opts, owner, repo, slug, wait_interval, skip_errors, attempts=3
):
"""Wait for a package to synchronise (or fail)."""
"""Wait for a package to synchronize (or fail)."""
# pylint: disable=too-many-locals
attempts -= 1
click.echo()
Expand All @@ -209,7 +209,7 @@ def display_status(current):
)

start = datetime.now()
context_msg = "Failed to synchronise file!"
context_msg = "Failed to synchronize file!"
with handle_api_exceptions(
ctx, opts=opts, context_msg=context_msg, reraise_on_error=skip_errors
):
Expand Down Expand Up @@ -255,14 +255,14 @@ def display_status(current):

if ok:
click.secho(
"Package synchronised successfully in %(seconds)s second(s)!"
"Package synchronized successfully in %(seconds)s second(s)!"
% {"seconds": click.style(str(seconds), bold=True)},
fg="green",
)
return

click.secho(
"Package failed to synchronise in %(seconds)s during stage: %(stage)s"
"Package failed to synchronize in %(seconds)s during stage: %(stage)s"
% {
"seconds": click.style(str(seconds), bold=True),
"stage": click.style(stage_str or "Unknown", fg="yellow"),
Expand Down Expand Up @@ -431,7 +431,7 @@ def upload_files_and_create_package(
if no_wait_for_sync:
return

# 5. (optionally) Wait for the package to synchronise
# 5. (optionally) Wait for the package to synchronize
wait_for_package_sync(
ctx=ctx,
opts=opts,
Expand Down
2 changes: 1 addition & 1 deletion cloudsmith_cli/cli/commands/quota/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@click.pass_context
def quota(ctx, opts): # pylink: disable=unused-argument
"""
Display Quota limits and history for an organisation.
Display Quota limits and history for an organization.

See the help for subcommands for more information on each.
"""
2 changes: 1 addition & 1 deletion cloudsmith_cli/cli/commands/quota/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def usage(ctx, opts, owner, oss):
Retrieve Quota history for namespace.

This requires appropriate permissions for the owner (a member of the
organisation and a valid API key).
organization and a valid API key).

- OWNER: Specify the OWNER namespace (i.e. org)

Expand Down
2 changes: 1 addition & 1 deletion cloudsmith_cli/cli/commands/quota/quota.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def usage(ctx, opts, owner, oss):
Retrieve Quota limits.

This requires appropriate permissions for the owner (a member of the
organisation and a valid API key).
organization and a valid API key).

- OWNER: Specify the OWNER namespace (i.e. org)

Expand Down
2 changes: 1 addition & 1 deletion cloudsmith_cli/cli/commands/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@click.pass_context
def status(ctx, opts, owner_repo_package):
"""
Get the synchronisation status for a package.
Get the synchronization status for a package.

- OWNER/REPO/PACKAGE: Specify the OWNER namespace (i.e. user or org), the
REPO name where the package is stored, and the PACKAGE name (slug) of the
Expand Down
8 changes: 4 additions & 4 deletions cloudsmith_cli/cli/commands/upstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def func(ctx, opts, owner_repo, page, page_size):
func.__doc__ = f"""
List {upstream_fmt} upstreams for a repository.

This requires appropriate permissions for the owner (a member of the organisation, repository privileges and a valid API key).
This requires appropriate permissions for the owner (a member of the organization, repository privileges and a valid API key).

- OWNER/REPO: Specify the OWNER namespace (organization) and REPO (repository) to target a specific Cloudsmith repository.

Expand Down Expand Up @@ -254,7 +254,7 @@ def func(ctx, opts, owner_repo, upstream_config_file):
func.__doc__ = f"""
Create a {upstream_fmt} upstream for a repository.

This requires appropriate permissions for the owner (a member of the organisation, repository privileges and a valid API key).
This requires appropriate permissions for the owner (a member of the organization, repository privileges and a valid API key).

- OWNER/REPO: Specify the OWNER namespace (organization) and REPO (repository) to target a specific Cloudsmith repository.

Expand Down Expand Up @@ -333,7 +333,7 @@ def func(ctx, opts, owner_repo_slug_perm, upstream_config_file):
func.__doc__ = f"""
Update a {upstream_fmt} upstream for a repository.

This requires appropriate permissions for the owner (a member of the organisation, repository privileges and a valid API key).
This requires appropriate permissions for the owner (a member of the organization, repository privileges and a valid API key).

- OWNER/REPO/SLUG_PERM: Specify the OWNER namespace (organization), REPO (repository) and SLUG_PERM (upstream) to target a specific upstream belonging to a repo.

Expand Down Expand Up @@ -418,7 +418,7 @@ def func(ctx, opts, owner_repo_slug_perm, yes):
func.__doc__ = f"""
Delete a {upstream_fmt} upstream for a repository.

This requires appropriate permissions for the owner (a member of the organisation, repository privileges and a valid API key).
This requires appropriate permissions for the owner (a member of the organization, repository privileges and a valid API key).

- OWNER/REPO/SLUG_PERM: Specify the OWNER namespace (organization), REPO (repository) and SLUG_PERM (upstream) to target a specific upstream belonging to a repo.

Expand Down
6 changes: 3 additions & 3 deletions cloudsmith_cli/cli/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def common_package_action_options(f):
"--no-wait-for-sync",
default=False,
is_flag=True,
help="Don't wait for package synchronisation to complete before exiting.",
help="Don't wait for package synchronization to complete before exiting.",
)
@click.option(
"-I",
Expand All @@ -50,9 +50,9 @@ def common_package_action_options(f):
"--sync-attempts",
default=3,
type=int,
help="Number of times to attempt package synchronisation. If the "
help="Number of times to attempt package synchronization. If the "
"package fails the first time, the client will attempt to "
"automatically resynchronise it.",
"automatically resynchronize it.",
)
@click.pass_context
@functools.wraps(f)
Expand Down
4 changes: 2 additions & 2 deletions cloudsmith_cli/cli/tests/commands/test_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ def parse_table(output):
return dict(zip(column_headers, row_values))


def assert_output_is_equal_to_repo_config(output, organisation, repo_config_file_path):
def assert_output_is_equal_to_repo_config(output, organization, repo_config_file_path):
output_table = parse_table(output)
repo_config = json.loads(repo_config_file_path.read_text())
assert output_table["Name"] == repo_config["name"]
assert output_table["Type"] == repo_config["repository_type_str"]
assert (
output_table["Owner / Repository (Identifier)"]
== organisation + "/" + repo_config["slug"]
== organization + "/" + repo_config["slug"]
)


Expand Down