Skip to content

Commit

Permalink
Merge branch 'main' into quality-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
WillGibson committed Feb 28, 2024
2 parents 958e006 + acf81ac commit 5aaa9ce
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 24.2.0
hooks:
- id: black
name: Format code
Expand Down
4 changes: 1 addition & 3 deletions dbt_copilot_helper/commands/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,7 @@ def migrate_secrets(project_profile, env, svc, overwrite, dry_run):
text = (
"Created"
if not param_exists
else "Overwritten"
if overwrite
else "NOT overwritten"
else "Overwritten" if overwrite else "NOT overwritten"
)
click.echo(f"{text} {ssm_path}")
else:
Expand Down
14 changes: 8 additions & 6 deletions dbt_copilot_helper/commands/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@ def deployment():
addons_templates_table.add_row(
[
template_file.relative_to("."),
maybe
if latest_compatible_symbol is maybe
else versioning.string_version(generated_with_version),
(
maybe
if latest_compatible_symbol is maybe
else versioning.string_version(generated_with_version)
),
local_compatible_symbol,
latest_compatible_symbol,
]
Expand All @@ -142,9 +144,9 @@ def tool_versions():

copilot_version, copilot_released_version = versioning.get_copilot_versions()
if copilot_version is None:
recommendations[
"install-copilot"
] = "Install AWS Copilot https://aws.github.io/copilot-cli/"
recommendations["install-copilot"] = (
"Install AWS Copilot https://aws.github.io/copilot-cli/"
)

aws_version, aws_released_version = versioning.get_aws_versions()
if aws_version is None:
Expand Down
3 changes: 2 additions & 1 deletion dbt_copilot_helper/commands/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,8 @@ def _get_subdomains_from_env_manifests(environment, manifests):
if not len(aliases):
click.echo(
click.style(
f"No http.alias present for {environment} environment in {manifest}, skipping...", fg="cyan"
f"No http.alias present for {environment} environment in {manifest}, skipping...",
fg="cyan",
),
)
else:
Expand Down
8 changes: 4 additions & 4 deletions dbt_copilot_helper/utils/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ def validate_addons(addons: dict):
continue
schema = SCHEMA_MAP.get(addon_type, None)
if not schema:
errors[
addon_name
] = f"Unsupported addon type '{addon_type}' in addon '{addon_name}'"
errors[addon_name] = (
f"Unsupported addon type '{addon_type}' in addon '{addon_name}'"
)
continue
schema.validate(addon)
except SchemaError as ex:
Expand Down Expand Up @@ -145,7 +145,7 @@ def is_between(value):

ENV_NAME = Regex(
r"^[a-zA-Z][a-zA-Z0-9]*$",
error="Environment name {} is invalid: names must only contain alphanumeric characters."
error="Environment name {} is invalid: names must only contain alphanumeric characters.",
# For values the "error" parameter works and outputs the custom text. For keys the custom text doesn't get reported in the exception for some reason.
)

Expand Down
6 changes: 3 additions & 3 deletions migration-tools/build-copilot-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ def space_to_copilot_app(app_name, ns_conf):
psvc["secrets_from"] = svc["name"]
psvc["name"] += "-" + process["type"]
psvc["type"] = "backend"
psvc[
"notes"
] = f"service created based on Procfile entry for {svc['name']} and will require access to the same backing services"
psvc["notes"] = (
f"service created based on Procfile entry for {svc['name']} and will require access to the same backing services"
)

if "overlapping_secrets" in psvc:
del psvc["overlapping_secrets"]
Expand Down
1 change: 0 additions & 1 deletion tests/copilot_helper/test_command_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# from tests.copilot_helper.conftest import mock_application



results = {
"results": [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/copilot_helper/test_copilot_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ def test_sub_commands(self):
"cdn",
"environment",
"pipeline",
"application"
"application",
]

0 comments on commit 5aaa9ce

Please sign in to comment.