diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 8072cf9f9..5d64d7e97 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -1,6 +1,6 @@ name: Python Flake8, black and pylint code quality check -on: [push] +on: [push, pull_request] jobs: lint: diff --git a/CHANGELOG.md b/CHANGELOG.md index 637fbc76d..2f5135c35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,32 +23,36 @@ https://github.com/actinia-org/actinia-core/compare/4.3.1...main released from main ... -## [4.14.0] - 2024-05-24 +## \[4.14.0\] - 2024-05-24 + released from main ### Changed -* update different dependencies by @anikaweinmann in https://github.com/actinia-org/actinia-core/pull/514 -* chore(deps): update mundialis/actinia-core docker tag to v4.13.1 by @renovate in https://github.com/actinia-org/actinia-core/pull/503 -* chore(deps): update softprops/action-gh-release action to v2 by @renovate in https://github.com/actinia-org/actinia-core/pull/504 -* chore(deps): update actions/checkout digest to 1d96c77 by @renovate in https://github.com/actinia-org/actinia-core/pull/510 -* chore(deps): update dependency google-cloud-bigquery to v3 by @renovate in https://github.com/actinia-org/actinia-core/pull/435 -* chore(deps): update dependency pystac to v1 by @renovate in https://github.com/actinia-org/actinia-core/pull/436 -* chore(deps): update actions/checkout digest to a5ac7e5 by @renovate in https://github.com/actinia-org/actinia-core/pull/515 -* chore(deps): update anchore/sbom-action digest to 07e5b3a by @renovate in https://github.com/actinia-org/actinia-core/pull/516 + +- update different dependencies by @anikaweinmann in https://github.com/actinia-org/actinia-core/pull/514 +- chore(deps): update mundialis/actinia-core docker tag to v4.13.1 by @renovate in https://github.com/actinia-org/actinia-core/pull/503 +- chore(deps): update softprops/action-gh-release action to v2 by @renovate in https://github.com/actinia-org/actinia-core/pull/504 +- chore(deps): update actions/checkout digest to 1d96c77 by @renovate in https://github.com/actinia-org/actinia-core/pull/510 +- chore(deps): update dependency google-cloud-bigquery to v3 by @renovate in https://github.com/actinia-org/actinia-core/pull/435 +- chore(deps): update dependency pystac to v1 by @renovate in https://github.com/actinia-org/actinia-core/pull/436 +- chore(deps): update actions/checkout digest to a5ac7e5 by @renovate in https://github.com/actinia-org/actinia-core/pull/515 +- chore(deps): update anchore/sbom-action digest to 07e5b3a by @renovate in https://github.com/actinia-org/actinia-core/pull/516 ### Removed -* Remove python dependency by @mmacata in https://github.com/actinia-org/actinia-core/pull/506 + +- Remove python dependency by @mmacata in https://github.com/actinia-org/actinia-core/pull/506 ### Fixed -* README: fix minor grammar issues by @pesekon2 in https://github.com/actinia-org/actinia-core/pull/513 + +- README: fix minor grammar issues by @pesekon2 in https://github.com/actinia-org/actinia-core/pull/513 ### New Contributors -* @pesekon2 made their first contribution in https://github.com/actinia-org/actinia-core/pull/513 -**Full Changelog**: https://github.com/actinia-org/actinia-core/compare/4.13.1...4.14.0 +- @pesekon2 made their first contribution in https://github.com/actinia-org/actinia-core/pull/513 -"generated with `gh api repos/actinia-org/actinia-core/releases/generate-notes -f tag_name="4.14.0" -f target_commitish=main -q .body`" +**Full Changelog**: https://github.com/actinia-org/actinia-core/compare/4.13.1...4.14.0 +"generated with `gh api repos/actinia-org/actinia-core/releases/generate-notes -f tag_name="4.14.0" -f target_commitish=main -q .body`" ## [4.13.1](https://github.com/actinia-org/actinia-core/releases/tag/4.13.1) - 2024-02-23 diff --git a/src/actinia_core/__init__.py b/src/actinia_core/__init__.py index 9f98a7a6c..83ef8b425 100644 --- a/src/actinia_core/__init__.py +++ b/src/actinia_core/__init__.py @@ -22,6 +22,7 @@ ####### import importlib.metadata + try: # Change here if project is renamed and does not equal the package name dist_name = __name__ diff --git a/src/actinia_core/core/common/aws_sentinel_interface.py b/src/actinia_core/core/common/aws_sentinel_interface.py index 07925d61c..08344d694 100644 --- a/src/actinia_core/core/common/aws_sentinel_interface.py +++ b/src/actinia_core/core/common/aws_sentinel_interface.py @@ -305,9 +305,9 @@ def _parse_scene_info(self, bands, product_id, info): preview_url = ( f'{self.aws_sentinel_base_url}/{tile["path"]}/preview.jpg' ) - tile_info[ - "url" - ] = f'{self.aws_sentinel_base_eu_central_url}/#{tile["path"]}/' + tile_info["url"] = ( + f'{self.aws_sentinel_base_eu_central_url}/#{tile["path"]}/' + ) tile_info["metadata"] = metadata_url tile_info["info"] = info_url diff --git a/src/actinia_core/core/common/google_satellite_bigquery_interface.py b/src/actinia_core/core/common/google_satellite_bigquery_interface.py index ca4ec8818..4af81416c 100644 --- a/src/actinia_core/core/common/google_satellite_bigquery_interface.py +++ b/src/actinia_core/core/common/google_satellite_bigquery_interface.py @@ -211,9 +211,9 @@ def __init__(self, config): self.gcs_url = "https://storage.googleapis.com/" self.sentinel_xml_metadata_file = "MTD_MSIL1C.xml" self.config = config - os.environ[ - "GOOGLE_APPLICATION_CREDENTIALS" - ] = self.config.GOOGLE_APPLICATION_CREDENTIALS + os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = ( + self.config.GOOGLE_APPLICATION_CREDENTIALS + ) os.environ["GOOGLE_CLOUD_PROJECT"] = self.config.GOOGLE_CLOUD_PROJECT self.sentinel_bands = [ diff --git a/src/actinia_core/core/common/process_chain.py b/src/actinia_core/core/common/process_chain.py index 3f8edf49e..1b5f6393a 100644 --- a/src/actinia_core/core/common/process_chain.py +++ b/src/actinia_core/core/common/process_chain.py @@ -378,9 +378,9 @@ def _get_sentinel_import_commands(self, entries): for scene in scenes_bands: scene_id = scene["scene_id"] download_cache = f"download_cache_{scene_id}" - self.temporary_pc_files[ - download_cache - ] = self.generate_temp_file_path() + self.temporary_pc_files[download_cache] = ( + self.generate_temp_file_path() + ) sp = Sentinel2Processing( bands=scene["bands"], download_cache=self.temporary_pc_files[download_cache], @@ -835,9 +835,9 @@ def _create_exec_process(self, module_descr): file_id = search_string.split("::")[1] # Generate the temporary file path and store it in the dict if file_id not in self.temporary_pc_files: - self.temporary_pc_files[ - file_id - ] = self.generate_temp_file_path() + self.temporary_pc_files[file_id] = ( + self.generate_temp_file_path() + ) param = "%s" % self.temporary_pc_files[file_id] else: @@ -997,9 +997,9 @@ def _create_module_process_legacy(self, id, module_descr): file_id = search_string.split("::")[1] # Generate the temporary file path and store it in the dict if file_id not in self.temporary_pc_files: - self.temporary_pc_files[ - file_id - ] = self.generate_temp_file_path() + self.temporary_pc_files[file_id] = ( + self.generate_temp_file_path() + ) param = "%s=%s" % (key, self.temporary_pc_files[file_id]) else: @@ -1063,9 +1063,9 @@ def _create_module_process_legacy(self, id, module_descr): # Generate the temporary file path and store it in the # dict if file_id not in self.temporary_pc_files: - self.temporary_pc_files[ - file_id - ] = self.generate_temp_file_path() + self.temporary_pc_files[file_id] = ( + self.generate_temp_file_path() + ) param = "%s=%s" % ( key, @@ -1191,9 +1191,9 @@ def _create_exec_process_legacy(self, id, module_descr): file_id = search_string.split("::")[1] # Generate the temporary file path and store it in the dict if file_id not in self.temporary_pc_files: - self.temporary_pc_files[ - file_id - ] = self.generate_temp_file_path() + self.temporary_pc_files[file_id] = ( + self.generate_temp_file_path() + ) param = "%s" % self.temporary_pc_files[file_id] else: @@ -1264,9 +1264,9 @@ def _add_grass_module_input_parameter_to_list( file_id = value.split("::")[1] # Generate the temporary file path and store it in the dict if file_id not in self.temporary_pc_files: - self.temporary_pc_files[ - file_id - ] = self.generate_temp_file_path() + self.temporary_pc_files[file_id] = ( + self.generate_temp_file_path() + ) param = "%s=%s" % (param, self.temporary_pc_files[file_id]) elif "::" in value and value.split("::")[1] in [ "stdout", @@ -1396,9 +1396,9 @@ def _add_grass_module_output_parameter_to_list( file_id = value.split("::")[1] # Generate the temporary file path and store it in the dict if file_id not in self.temporary_pc_files: - self.temporary_pc_files[ - file_id - ] = self.generate_temp_file_path() + self.temporary_pc_files[file_id] = ( + self.generate_temp_file_path() + ) # Store the file path in the output description for export param = "%s=%s" % (param, self.temporary_pc_files[file_id]) # Add the temp file path and the new file name with suffix to , diff --git a/src/actinia_core/core/interim_results.py b/src/actinia_core/core/interim_results.py index 6332ef7fd..54a657333 100644 --- a/src/actinia_core/core/interim_results.py +++ b/src/actinia_core/core/interim_results.py @@ -186,7 +186,7 @@ def _compare_sha512sums_of_folders(self, folder1, folder2): # get sha512sum of the folder cur_working_dir = os.getcwd() sha512sum_cmd = ( - r"find . -type f -exec sha512sum {} \; | " + "sort -k 2 | sha512sum" + r"find . -type f -exec sha512sum {} \; |" + "sort -k 2 | sha512sum" ) sha512sums = list() for folder in [folder1, folder2]: diff --git a/src/actinia_core/core/storage_interface_gcs.py b/src/actinia_core/core/storage_interface_gcs.py index c7e4901c5..801d73997 100644 --- a/src/actinia_core/core/storage_interface_gcs.py +++ b/src/actinia_core/core/storage_interface_gcs.py @@ -63,9 +63,9 @@ def setup(self): """ Setup the Google Cloud Storage (GCS) client and the GCS credentials """ - os.environ[ - "GOOGLE_APPLICATION_CREDENTIALS" - ] = self.config.GOOGLE_APPLICATION_CREDENTIALS + os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = ( + self.config.GOOGLE_APPLICATION_CREDENTIALS + ) self.storage_client = storage.Client() def get_resource_urls(self): diff --git a/src/actinia_core/processing/actinia_processing/ephemeral_processing.py b/src/actinia_core/processing/actinia_processing/ephemeral_processing.py index 27462cdd5..3a7f9878c 100644 --- a/src/actinia_core/processing/actinia_processing/ephemeral_processing.py +++ b/src/actinia_core/processing/actinia_processing/ephemeral_processing.py @@ -1718,10 +1718,10 @@ def _run_executable(self, process, poll_time=0.005): for x in par_val.split() }[filter] filtered_func_name += f"::{filter}" - process.executable_params[ - i - ] = process.executable_params[i].replace( - filtered_func_name, filtered_par_value + process.executable_params[i] = ( + process.executable_params[i].replace( + filtered_func_name, filtered_par_value + ) ) if process.stdin_source is not None: