Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for g84 and python #531

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = (
"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
2 changes: 1 addition & 1 deletion src/actinia_core/models/process_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class InputParameter(IOParameterBase):
" raster map layers have a specific name scheme, that "
"is independent from the provided map name in the "
"process description. The name scheme is always: "
"<p>\<landsat scene id\>_\<atcor\>.\<band\></p>"
r"<p>\<landsat scene id\>_\<atcor\>.\<band\></p>"
"For example, if the scene <p>LT52170762005240COA00</p> "
"was requested, the resulting name for the DOS1 "
"atmospheric corrected band 1 would be: "
Expand Down
16 changes: 10 additions & 6 deletions src/actinia_core/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
__maintainer__ = "mundialis"

from flask import make_response, jsonify, request
from importlib import metadata
import os
import re
import importlib
import subprocess
import sys
from actinia_api import URL_PREFIX
Expand Down Expand Up @@ -71,16 +71,20 @@ def init_versions():
).stdout
log.debug("Detecting GRASS GIS version")
for i in g_version.decode("utf-8").strip("\n").split("\n"):
G_VERSION[i.split("=")[0]] = i.split("=")[1]
try:
G_VERSION[i.split("=")[0]] = i.split("=")[1]
except IndexError:
pass

log.debug("Detecting Plugin versions")
for i in global_config.PLUGINS:
module = importlib.import_module(i)
PLUGIN_VERSIONS[i] = module.__version__
try:
PLUGIN_VERSIONS[i] = metadata.version(i)
except metadata.PackageNotFoundError:
PLUGIN_VERSIONS[i] = metadata.version(f"{i}.wsgi")

log.debug("Detecting API versions")
module = importlib.import_module("actinia_api")
API_VERSION = module.__version__
API_VERSION = metadata.version("actinia_api")

PYTHON_VERSION = sys.version.replace("\n", "- ")

Expand Down