diff --git a/src/vxingest/grib2_to_cb/grib_builder_parent.py b/src/vxingest/grib2_to_cb/grib_builder_parent.py index 43cb083..d84103e 100644 --- a/src/vxingest/grib2_to_cb/grib_builder_parent.py +++ b/src/vxingest/grib2_to_cb/grib_builder_parent.py @@ -802,13 +802,15 @@ def build_document(self, queue_element): if self.do_profiling: with cProfile.Profile() as _pr: self.handle_document() - with Path(self.profile_output_path / "profiling_stats.txt").open( + with Path(self.profile_output_path / "profiling_stats.txt").open( "w", encoding="utf-8" ) as stream: stats = Stats(_pr, stream=stream) stats.strip_dirs() stats.sort_stats("time") - stats.dump_stats(self.profile_output_path / "profiling_stats.prof") + stats.dump_stats( + self.profile_output_path / "profiling_stats.prof" + ) stats.print_stats() else: self.handle_document() diff --git a/src/vxingest/main.py b/src/vxingest/main.py index 9bde8e3..6af8038 100644 --- a/src/vxingest/main.py +++ b/src/vxingest/main.py @@ -508,8 +508,7 @@ def run_ingest() -> None: args.log_dir / f"all_logs-{runtime.strftime('%Y-%m-%dT%H:%M:%S%z')}.log", ) # set profiling output - os.environ['PROFILE_OUTPUT_DIR'] = args.log_dir - + os.environ["PROFILE_OUTPUT_DIR"] = args.log_dir logger.info("Getting credentials") creds = get_credentials(args.credentials_file) diff --git a/tests/vxingest/builder_common/test_unit_queries.py b/tests/vxingest/builder_common/test_unit_queries.py index 3e2391b..3c953eb 100644 --- a/tests/vxingest/builder_common/test_unit_queries.py +++ b/tests/vxingest/builder_common/test_unit_queries.py @@ -44,15 +44,14 @@ def connect_cb(): ) return cb_connection -@ pytest.mark.integration + +@pytest.mark.integration def test_get_file_list(request): vx_ingest = VXIngest() vx_ingest.credentials_file = os.environ["CREDENTIALS"] vx_ingest.cb_credentials = vx_ingest.get_credentials(vx_ingest.load_spec) vx_ingest.connect_cb() - testdata = Path( - "tests/vxingest/builder_common/testdata/get_file_list_grib2.n1ql" - ) + testdata = Path("tests/vxingest/builder_common/testdata/get_file_list_grib2.n1ql") with testdata.open(mode="r", encoding="utf-8") as file: _statement = file.read() temp_dir_path = "/tmp/vx_ingest" @@ -72,7 +71,10 @@ def test_get_file_list(request): ) assert file_list is not None, f"{request.node.name}: file_list is None" assert len(file_list) > 0, f"{request.node.name}: file_list is empty" - assert file_list[3] > file_list[2], f"{request.node.name}: file_list is not reverse sorted" + assert ( + file_list[3] > file_list[2] + ), f"{request.node.name}: file_list is not reverse sorted" + @pytest.mark.integration def test_stations_fcst_valid_epoch(request):