Skip to content

Commit 67e67aa

Browse files
committed
load_custom_processes: allow specifying path directly
useful for testing purposes related to Open-EO/openeo-python-driver#376
1 parent 720fafe commit 67e67aa

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ without compromising stable operations.
1414

1515
## In progress: 0.64.0
1616

17+
- `load_custom_processes`: allow specifying path directly
18+
1719
## 0.63.0
1820

1921
- Add `bbox` and `geometry` to exported STAC items pertaining to GeoTiff assets of a spatial data cube ([eu-cdse/openeo-cdse-infra#418](https://github.com/eu-cdse/openeo-cdse-infra/issues/418))

openeogeotrellis/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.64.0a1"
1+
__version__ = "0.64.1a1"

openeogeotrellis/deploy/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
_log = logging.getLogger(__name__)
1919

2020

21-
def load_custom_processes(logger=_log, _name="custom_processes"):
21+
def load_custom_processes(*, path: Optional[Path] = None, logger=_log, _name="custom_processes"):
2222
"""Try loading optional `custom_processes` module"""
23-
# TODO: use backend_config instead of env var
24-
if path := os.environ.get("OPENEO_CUSTOM_PROCESSES"):
23+
# TODO: use backend_config instead of env var?
24+
path = path or os.environ.get("OPENEO_CUSTOM_PROCESSES")
25+
if path:
2526
# Directly load custom processes from OPENEO_CUSTOM_PROCESSES
2627
logger.debug(f"load_custom_processes: trying exec loading {path!r}")
2728
try:

0 commit comments

Comments
 (0)