diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 10507dd3f..a6089ac06 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -17,7 +17,7 @@ jobs: with: fetch-depth: 0 - name: Lint Code Base - uses: super-linter/super-linter/slim@v6.2.0 + uses: super-linter/super-linter@v4 env: VALIDATE_ALL_CODEBASE: false VALIDATE_PYTHON_BLACK: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f7668d868..0f091995c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,8 +18,6 @@ repos: [ --rcfile, .github/linters/.python-lint, - --ignore-paths, - tests/, ] - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.5.3 diff --git a/sup3r/pipeline/forward_pass_cli.py b/sup3r/pipeline/forward_pass_cli.py index 436447c45..eaf380dd1 100644 --- a/sup3r/pipeline/forward_pass_cli.py +++ b/sup3r/pipeline/forward_pass_cli.py @@ -46,11 +46,7 @@ def main(ctx, verbose): ) @click.pass_context def from_config(ctx, config_file, verbose=False, pipeline_step=None): - """Run sup3r forward pass from a config file. - - TODO: Can we figure out how to remove the first ForwardPassStrategy - initialization here, so that its only initialized once for each node? - """ + """Run sup3r forward pass from a config file.""" config = BaseCLI.from_config_preflight( ModuleName.FORWARD_PASS, ctx, config_file, verbose diff --git a/sup3r/qa/qa.py b/sup3r/qa/qa.py index f766a1c8e..d8a86e35c 100644 --- a/sup3r/qa/qa.py +++ b/sup3r/qa/qa.py @@ -367,7 +367,7 @@ def get_node_cmd(cls, config): log_arg_str += f', log_file="{log_file}"' cmd = ( - f"python -c '{import_str};\n" + f"python -c '{import_str};\n" 't0 = time.time();\n' f'logger = init_logger({log_arg_str});\n' f'qa = {qa_init_str};\n' diff --git a/tests/data_handlers/test_dh_nc_cc.py b/tests/data_handlers/test_dh_nc_cc.py index ce41aa441..b49db9d89 100644 --- a/tests/data_handlers/test_dh_nc_cc.py +++ b/tests/data_handlers/test_dh_nc_cc.py @@ -33,8 +33,8 @@ def test_get_just_coords_nc(): assert np.array_equal( handler.lat_lon[-1, 0, :], ( - handler.extracter[Dimension.LATITUDE].min(), - handler.extracter[Dimension.LONGITUDE].min(), + handler.extracter.data[Dimension.LATITUDE].min(), + handler.extracter.data[Dimension.LONGITUDE].min(), ), ) assert not handler.data_vars diff --git a/tests/extracters/test_extracter_caching.py b/tests/extracters/test_extracter_caching.py index 4e1ee53a8..f8bfe1eee 100644 --- a/tests/extracters/test_extracter_caching.py +++ b/tests/extracters/test_extracter_caching.py @@ -61,11 +61,13 @@ def test_data_caching(input_files, ext, shape, target, features): assert extracter.data.dtype == np.dtype(np.float32) loader = Loader(cacher.out_files) assert np.array_equal( - loader[features, ...].compute(), extracter[features, ...].compute() + loader.data[features, ...].compute(), + extracter.data[features, ...].compute(), ) # make sure full domain can be loaded with extracters extracter = Extracter(cacher.out_files) assert np.array_equal( - loader[features, ...].compute(), extracter[features, ...].compute() + loader.data[features, ...].compute(), + extracter.data[features, ...].compute(), )