From 1962bb546142e515327c5dcb9d371ee4637af358 Mon Sep 17 00:00:00 2001 From: Jacob Date: Tue, 30 Jul 2024 19:09:17 -0600 Subject: [PATCH 1/2] change quality checks to run on PRs along with pushes --- .github/workflows/quality-checks.yml | 4 +++- src/grasshopper/lib/configuration/gh_configuration.py | 1 - src/grasshopper/lib/grasshopper.py | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/quality-checks.yml b/.github/workflows/quality-checks.yml index c0a43a6..1fd0f2c 100644 --- a/.github/workflows/quality-checks.yml +++ b/.github/workflows/quality-checks.yml @@ -1,6 +1,8 @@ name: quality checks -on: push +on: + push: + pull_request: jobs: ruff-lint: diff --git a/src/grasshopper/lib/configuration/gh_configuration.py b/src/grasshopper/lib/configuration/gh_configuration.py index e04153d..19f083d 100644 --- a/src/grasshopper/lib/configuration/gh_configuration.py +++ b/src/grasshopper/lib/configuration/gh_configuration.py @@ -104,7 +104,6 @@ class ConfigurationConstants: "typecast": typecast_bool, "default": False, }, - "influx_verify_ssl": { "opts": ["--influx_verify_ssl"], "attrs": { diff --git a/src/grasshopper/lib/grasshopper.py b/src/grasshopper/lib/grasshopper.py index a03c7b3..71a81a5 100644 --- a/src/grasshopper/lib/grasshopper.py +++ b/src/grasshopper/lib/grasshopper.py @@ -41,7 +41,6 @@ def log(self) -> None: @property def influx_configuration(self) -> dict[str, Optional[Union[bool, str]]]: - """Extract the influx related configuration items. The InfluxDbSettings object should only get keys if there is a @@ -70,7 +69,9 @@ def influx_configuration(self) -> dict[str, Optional[Union[bool, str]]]: configuration["ssl"] = self.global_configuration.get("influx_ssl", False) - configuration["verify_ssl"] = self.global_configuration.get("influx_verify_ssl", False) + configuration["verify_ssl"] = self.global_configuration.get( + "influx_verify_ssl", False + ) return configuration From 187cf8c535def8e37fa35dc5c2cf7766b4994cd6 Mon Sep 17 00:00:00 2001 From: Jacob Date: Tue, 30 Jul 2024 19:17:06 -0600 Subject: [PATCH 2/2] fix a few tests --- tests/unit/conftest.py | 2 ++ tests/unit/test_grasshopper_configuration_fixtures.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 415db4d..5c888a7 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -51,6 +51,8 @@ def current_global_defaults(): "cleanup_s3": True, "slack": False, "influx": False, + "influx_ssl": False, + "influx_verify_ssl": False, "report_portal": False, "rp_launch_name": "Grasshopper Performance Test Run | Launch name unknown", "rp_launch": "Grasshopper Performance Test Run | Launch name unknown", diff --git a/tests/unit/test_grasshopper_configuration_fixtures.py b/tests/unit/test_grasshopper_configuration_fixtures.py index dc19d99..9350e10 100644 --- a/tests/unit/test_grasshopper_configuration_fixtures.py +++ b/tests/unit/test_grasshopper_configuration_fixtures.py @@ -25,6 +25,8 @@ def expected_global_defaults(): "cleanup_s3": True, "slack": False, "influx": False, + "influx_ssl": False, + "influx_verify_ssl": False, "report_portal": False, "rp_launch_name": "Grasshopper Performance Test Run | Launch name unknown", "rp_launch": "Grasshopper Performance Test Run | Launch name unknown",