-
Notifications
You must be signed in to change notification settings - Fork 0
Final Report
- Project: Migrating and updating the existing CWL runners
- Organization: OSGeo (Open Source Geospatial Foundation), ZOO-Project
The project focuses on migrating and updating the existing CWL runners within the ZOO-Project to create a centralized, modular, and AI-ready framework. It will unify multiple runners (WES, Argo, Calrissian) under a single repository, reduce code duplication through reusable components, and introduce an abstract base class for consistency. The work also includes developing standardized service templates, automated CI/CD testing pipelines, and clear documentation, making it easier for developers to add new runners and ensuring reliable execution of geospatial and Earth Observation workflows.
Before your project, the ZOO-Project CWL runners faced several challenges: Scattered Repositories: Each runner (WES, Argo, Calrissian) had its own separate GitHub repository. No single entry point to access all runners in one place. Code Duplication: Each runner had its way of handling input validation, execution, and logging. Common functionalities were repeated across different runners, making maintenance harder. Difficult to Add New Runners: No clear documentation or template for creating a new runner. New developers had to analyze existing code instead of following a structured guide. No Centralized Testing: Each runner had separate testing setups, leading to inconsistent quality. No automated way to test all runners in one place.
-
Improved Code Quality
Unit tests serve as living documentation of expected behavior, ensuring each component functions correctly. This directly enhances the overall quality of the codebase. -
Enhanced Reliability
Unit tests act as a safety net, quickly detecting regressions after code changes and maintaining the stability and reliability of the software. -
Faster Development Cycles
Automated testing enables rapid iterations, allowing developers to confidently make changes without breaking existing functionalities, thereby accelerating the development process. -
Increased Maintainability
By validating code changes early, unit tests make it easier to refactor, optimize, and extend the software without introducing regressions, ultimately reducing long-term maintenance costs.
This section enumerates all concrete outcomes delivered in the project: code artifacts, structural refactors, packaging work, CI/CD, tests, documentation, and process improvements. It’s designed so a maintainer can quickly see what exists now, where to find it, and how it improves ZOO-Project sustainability.
-
Single Entry Point for All Runners
-
zoo-cwl-runners/main_runner.pyprovides a unified CLI and programmatic interface to invoke runners (ArgoWF, WES, Calrissian). -
Lazy import mechanism ensures
import main_runnerworks without runner deps installed (enables fast unit tests and decoupled packaging). - Supports CI/locally vendored dependencies via
deps/and optionalZOO_CWL_RUNNERS_DEPSenv var.
-
-
Separation of Concerns Across Repositories
- Runners remain in their own repos (no monorepo lock-in).
- Service templates remain in their own repos.
-
Common logic moved to two dedicated, installable packages:
-
zoo-runner-common(runners’ shared utilities) -
zoo-template-common(service templates’ shared utilities)
-
-
Repository Interconnection Strategy
- Central hub:
zoo-cwl-runners(entry point, CI). - Consumers: runners and templates.
- Providers:
zoo-runner-common,zoo-template-common.
- Central hub:
-
zoo-runner-common-
BaseRunner: abstract base defining runner lifecycle and expected API. -
ZooConf,ZooInputs,ZooOutputs: standardized configuration and I/O handling. -
ZooStub: centralized status/progress stub compatible with ZOO kernel expectations. - Outcome: removes duplicated base code across all runners; single source of truth for runner plumbing.
-
-
zoo-template-common-
ExecutionHandler: common hooks (pre_execution_hook,post_execution_hook,handle_outputs,get_secrets,get_additional_parameters,get_pod_env_vars,get_pod_node_selector); extensible via**kwargs. -
CustomStacIO: S3-aware STAC I/O (read/write), configurable endpoint/credentials; usable by any template. - Outcome: eliminates per-template copies of handler/STAC logic; enables consistent behavior and easier evolution.
-
-
Packaging
- Both commons include
pyproject.toml; installable viapip install -e .. - Proper package layout (
zoo_template_common/…,py-modulesforzoo-runner-common). -
Tags prepared for initial baseline (
v0.1.0).
- Both commons include
-
Code De-duplication
- Removed local duplicates of
ZooStub, base classes, and handler scaffolding. - Runners now import from
zoo-runner-common.
- Removed local duplicates of
-
Compatibility Maintained
- Public APIs preserved where practical.
- Runner-specific logic kept isolated; shared logic moved to commons.
-
Dry-Run Friendly
- Runners can be instantiated with a minimal CWL dict in CI for smoke tests (no cluster needed).
-
Limitations Acknowledged
-
Calrissian CI excluded due to
pycalrissiandistribution constraints; documented as known limitation without blocking other outcomes.
-
Calrissian CI excluded due to
-
Templates Updated to Use Commons
- Import
ExecutionHandler&CustomStacIOfromzoo-template-common. - Import
ZooStubfromzoo-runner-common. - Outcome: consistent template behavior, simplified customization path, and uniform code style.
- Import
-
Cookiecutter Layouts Preserved
- Templates remain separate (no central template repo), as requested.
- Function-specific overrides supported via
**kwargsin handlers.
-
Two-Job Pipeline in
zoo-cwl-runners-
Unit job (fast):
- Python 3.10 pinned (resolves upstream dependency conflicts).
- Sanity tests for repo integrity and
main_runnerimport (lazy imports).
-
Integration job (smoke-level):
- Checks out runner & common repos under
deps/. - Installs commons and runners via
pip install -e deps/.... - Runs smoke tests (ArgoWF, WES) with minimal CWL dicts.
- Skips Calrissian (
-k "not calrissian") due to upstream packaging constraints.
- Checks out runner & common repos under
-
Unit job (fast):
-
Deterministic & Documented
- Python pin (
3.10) recorded in workflow and docs. - Tests segregated with markers (
-m integration,tests/unit). - Optional env var (
ZOO_CWL_RUNNERS_DEPS) for path overrides.
- Python pin (
-
Outcome: Continuous verification of structure, imports, and basic instantiation; stable foundation for future full E2E tests.
-
Unit Tests
-
tests/unit/test_repo_sanity.py: validatesmain_runnerimportability, callable symbols, and repo structure. - Import fails are prevented by lazy imports; no runner install required.
-
-
Integration (Smoke) Tests
- Instantiate ArgoWF and WES runners with dummy CWL configs.
- Avoid calls that require real resource evaluation or external services.
- Outcome: quick, non-flaky checks that catch regressions in constructor paths and light plumbing.
-
Test Infra Hygiene
-
pytest.ini, markers, and selective-kusage formalized. - Suite is intentionally lightweight for CI; extensible later for E2E.
-
-
READMEs
-
zoo-runner-common/README.md: component inventory, import examples, quick start. -
zoo-template-common/README.md: handler & STAC I/O usage, override patterns. -
zoo-cwl-runnersREADME updates: CI overview, Python pin, badge (ready to add).
-
-
Developer Guide
-
“How to Implement a New CWL Runner for ZOO-Project”:
- Architecture overview, runner class skeleton, wiring into
main_runner. - Examples of smoke tests, packaging pointers, and documentation guidance.
- Architecture overview, runner class skeleton, wiring into
-
“How to Implement a New CWL Runner for ZOO-Project”:
-
Outcome: Faster onboarding for new contributors; shared vocabulary and expectations across repos.
-
Python Standardization
- Pin to Python 3.10 across CI to avoid incompatibilities (
cwl-utils,schema_salad,pycalrissian). - Clear documentation of the rationale and mitigation steps.
- Pin to Python 3.10 across CI to avoid incompatibilities (
-
Requirements Hygiene
- Consistent version pins where needed.
- Avoid top-level imports of heavy/optional deps (lazy imports pattern).
-
Outcome: Reproducible builds and green CI across all jobs.
-
Modular, Extensible APIs
-
ExecutionHandlerwith well-defined overridable methods and**kwargssafety. -
BaseRunneroffering a predictable lifecycle surface. - Shared config/IO helpers reduce boilerplate and cognitive load.
-
-
Local Dev Friendly
- Clear workspace strategy (
deps/in CI; sibling repos locally). -
pip install -eworkflows for commons/runners/templates.
- Clear workspace strategy (
-
Outcome: Lower barrier to entry for contributors; predictable patterns across repos.
-
Single Source of Truth
- Shared logic consolidated; updates now propagate via commons.
- Reduced risk of divergence/bit-rot between runners/templates.
-
CI as a Safety Net
- Even minimal tests now guard against regressions in core pathways.
- Clear path to intensify tests without redesigning CI.
-
Documented Limitations
- Transparent note on Calrissian/
pycalrissianand next steps; avoids hidden pitfalls.
- Transparent note on Calrissian/
-
Calrissian Integration in CI
- Blocked by upstream packaging; left documented & excluded from CI flow.
-
End-to-End Execution Tests
- Not in scope for this iteration; would require cluster/WES infra and/or mocks.
-
PyPI Publications
- Commons are package-ready; publish to PyPI/testPyPI as a follow-up (semantic versioning, release automation).
- Maintainability Up: Shared modules, fewer copies, single entry point, CI.
- Extensibility Up: Adding a new runner/template is clearer and lighter.
- Reliability Up: Automated checks catch breakages early; Python pin avoids churn.
- Community Onboarding Up: Guides and READMEs reduce ramp-up time.
- Standards Alignment: Cleaner path to OGC API–Processes compliance across backends.
In one line: The project transformed a fragmented, duplicated ecosystem into a modular, tested, and documented platform with a single entry point, shared libraries, and CI — setting up ZOO-Project for easier growth and community contributions.
While this project achieved its main objectives — consolidating runners, refactoring service templates, introducing commons, and integrating CI/CD — there remain several areas for future development to further strengthen the ZOO-Project ecosystem.
-
Current Issue: Integration tests for
zoo-calrissian-runnerwere excluded due topycalrissianpackaging problems on Python 3.10+. -
Future Work:
- Collaborate with upstream maintainers to fix
pycalrissianpackaging for stable Python releases. - Re-enable Calrissian smoke tests in CI.
- Add Kubernetes-based mock tests (using
kindor Minikube) to validate stage-in/stage-out logic.
- Collaborate with upstream maintainers to fix
- Current State: CI validates runner initialization only (smoke tests).
-
Future Work:
- Deploy lightweight infrastructure for Argo Workflows and WES mock servers during CI runs.
- Execute real CWL workflows (e.g., water-body detection, S2 composites).
- Validate STAC catalog outputs, logs, and metrics against golden files.
- Enable nightly builds for heavier integration scenarios.
-
Current State:
zoo-runner-commonandzoo-template-commonare installable viapip install -e, but not published. -
Future Work:
- Publish both packages to PyPI with semantic versioning.
- Automate releases via GitHub Actions (
publish.yml) triggered on tag. - Encourage runners and templates to depend on published commons, reducing reliance on relative imports or
deps/.
- Current State: README files and a developer guide exist, but spread across repos.
-
Future Work:
- Create a unified documentation site (MkDocs + Material or Sphinx).
- Include:
- Runner API references.
- Service template guides.
- Example deployments.
- Architecture diagrams.
- Host under
https://zoo-project.github.io.
- Current State: Basic unit and smoke tests integrated in GitHub Actions.
-
Future Work:
- Add coverage reporting (Codecov or Coveralls).
- Add type checking (
mypy) and linting (black,pylint) as CI jobs. - Enable matrix testing across Python versions (3.10–3.12).
- Explore containerized test runners (Docker) for consistent environments.
-
Future Opportunities:
- Implement additional runners for emerging execution backends (e.g., Nextflow, Snakemake).
- Provide new service templates for geospatial use cases (wildfire detection, crop monitoring).
- Extend
ExecutionHandlerwith support for advanced features:- GPU scheduling hints.
- Persistent volumes.
- Cloud-native storage tiers.
-
Future Work:
- Upstream contributions: merge final changes into official ZOO-Project GitHub organization.
- Present at OSGeo and OGC working groups to drive adoption.
- Encourage external EOEPCA projects to migrate to standardized runners/templates.
-
Future Work:
- Benchmark different runners (ArgoWF vs WES vs Calrissian) on real workloads.
- Profile and optimize resource evaluation (
eval_resource) logic. - Explore parallel execution strategies and caching layers.
-
Technical Skills
- Learned Python packaging (
pyproject.toml, setuptools, poetry, hatch) and dependency management. - Designed modular and reusable components using abstract classes (
BaseRunner,ExecutionHandler). - Built CI/CD pipelines with GitHub Actions, integrating both unit and integration tests.
- Developed lightweight unit and smoke tests for multi-repository ecosystems.
- Learned Python packaging (
-
Open Source Practices
- Managed code across distributed repositories with differing structures and branch strategies.
- Understood the value of documentation and developer guides for contributor onboarding.
- Reduced duplication by centralizing common logic into shared repositories.
-
Personal Growth
- Strengthened problem-solving skills when handling dependency conflicts and upstream package issues.
- Improved communication through weekly reports and mentor collaboration.
- Gained confidence contributing to large-scale open source projects aligned with OGC standards.
- Project Proposal: Google Docs Proposal
- Project Wiki: Project Wiki Home
- Final Report: View Final Report