Skip to content

Commit

Permalink
Lint (#535)
Browse files Browse the repository at this point in the history
* lint

* update lint workflow

* update to new black version

* mdformat
  • Loading branch information
mmacata authored Jun 21, 2024
1 parent d356d94 commit 0b4c064
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Python Flake8, black and pylint code quality check

on: [push]
on: [push, pull_request]

jobs:
lint:
Expand Down
32 changes: 18 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/actinia_core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#######

import importlib.metadata

try:
# Change here if project is renamed and does not equal the package name
dist_name = __name__
Expand Down
6 changes: 3 additions & 3 deletions src/actinia_core/core/common/aws_sentinel_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
42 changes: 21 additions & 21 deletions src/actinia_core/core/common/process_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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 ,
Expand Down
2 changes: 1 addition & 1 deletion src/actinia_core/core/interim_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
6 changes: 3 additions & 3 deletions src/actinia_core/core/storage_interface_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0b4c064

Please sign in to comment.