openeo-python-client icon indicating copy to clipboard operation
openeo-python-client copied to clipboard

Job manager: Move jobdatabase classes out of __init__

Open VictorVerhaert opened this issue 11 months ago • 1 comments

the init file currently contains a lot of logic making it hard for new users to figure out how it works.

One way of cleaning this file is moving job database logic to a separate file `job_database.py' (and including the stac api one)

In order to prevent existing links from breaking we can import the databases and add them to the all variable as described here: https://docs.astral.sh/ruff/rules/unused-import/ (I realize we don't use ruff as a linting tool but still believe we should add it to all)

VictorVerhaert avatar Feb 26 '25 11:02 VictorVerhaert

fully agree to move all implementation out of job_management/__init__.py into submodules

However, there are a couple of ongoing job manager PRs, so we have to be careful when to start and merge the move to avoid branch conflicts

soxofaan avatar Feb 26 '25 12:02 soxofaan

one issue I forsee is a potential circular import;

FullDataFrameJobDatabase depends on the multibackend job manager's _normalize_df

HansVRP avatar Oct 02 '25 13:10 HansVRP

yes there is a circular dependency there at the moment. But I think it can be broken by moving _COLUMN_REQUIREMENTS and _normalize_df out of MultiBackendJobManager. Neither of these are directly used by MultiBackendJobManager anyway (except if you look closer for hidden coupling).

soxofaan avatar Oct 02 '25 17:10 soxofaan

just merged #815 so I think this one can be closed 👍

soxofaan avatar Nov 05 '25 19:11 soxofaan