Skip to content

Releases: ZOO-Project/zoo-runner-common

zoo-runner-common-0.1.3

21 Jan 09:31

Choose a tag to compare

📦 zoo-runner-common v0.1.3

Maintenance release: Dynamic version management and ExecutionHandler initialization

This maintenance release improves package version management and enhances the ExecutionHandler base class with proper initialization support.


🔄 What's Changed

1. Dynamic Version Management

The package version is now dynamically retrieved from package metadata instead of being hardcoded:

Benefits:

  • Single source of truth for version (from pyproject.toml)
  • No manual version updates in __init__.py
  • Graceful fallback to "unknown" if metadata is unavailable

2. Enhanced ExecutionHandler Class

The abstract ExecutionHandler class now includes proper initialization logic:

New Features:

  • __init__(self, **kwargs) constructor with flexible kwargs support
  • Automatic attribute assignment for job_id, outputs, and results
  • New set_job_id(job_id) method for runtime job ID assignment

Impact:

  • Makes it easier to pass configuration to custom ExecutionHandler implementations
  • Provides standard attributes expected by runner implementations
  • Enables dynamic job ID assignment during execution

📦 Installation from PyPI

Install directly from PyPI:

pip install zoo-runner-common==0.1.3

Or update in your pyproject.toml:

[project]
dependencies = [
    "zoo-runner-common>=0.1.3",
]

🔄 Migration Guide

If you're upgrading from v0.1.2, no breaking changes are introduced. However:

If you implement custom ExecutionHandler subclasses:

You can now leverage the new __init__() method:

from zoo_runner_common.handlers import ExecutionHandler

class MyHandler(ExecutionHandler):
    def __init__(self, custom_param, **kwargs):
        super().__init__(**kwargs)
        self.custom_param = custom_param
    
    def pre_execution_hook(self):
        # Access self.job_id, self.outputs, self.results
        pass

🔗 Links


📝 Notes

This release focuses on developer experience improvements:

  • Better version management eliminates manual version synchronization
  • Enhanced ExecutionHandler provides a more robust base for custom implementations

Fully backward compatible with v0.1.2.

License: Apache-2.0

zoo-runner-common-0.1.2

19 Jan 10:58

Choose a tag to compare

📦 zoo-runner-common v0.1.2

Third release: Package structure refactoring and proper Python module organization

This maintenance release reorganizes the package structure to follow Python best practices with a proper package directory and improved module imports.

🔄 What's Changed

1. Package Structure Refactoring

  • Moved all modules into a proper zoo_runner_common/ package directory
  • Created __init__.py with explicit exports for better API clarity
  • Removed root-level __init__.py for cleaner structure

Module Organization:

zoo_runner_common/
├── __init__.py
├── base_runner.py
├── handlers.py
├── zoo_conf.py
└── zoostub.py

2. Updated Import Paths

  • All modules now use proper package imports: from zoo_runner_common import ...
  • Updated internal imports in base_runner.py to reference the new package structure
  • Documentation API references updated to reflect new module paths

3. Enhanced Package Configuration

  • Updated pyproject.toml with proper setuptools.packages. find configuration
  • Switched from py-modules to package-based discovery
  • Version bumped to 0.1.2

📦 Installation from PyPI

Install directly from PyPI:

pip install zoo-runner-common==0.1.2

Or update in your pyproject.toml:

[project]
dependencies = [
    "zoo-runner-common>=0.1.2",
]

🔄 Migration Guide

If you're upgrading from v0.1.1, update your imports:

Before (v0.1.0 / v0.1.1):

from base_runner import BaseRunner
from zoo_conf import ZooConf, ZooInputs, ZooOutputs

After (v0.1.2):

from zoo_runner_common import BaseRunner, ZooConf, ZooInputs, ZooOutputs
# or
from zoo_runner_common.base_runner import BaseRunner
from zoo_runner_common.zoo_conf import ZooConf, ZooInputs, ZooOutputs

🔗 Links

📝 Notes

This release improves package structure and follows Python packaging best practices. While it introduces import path changes, the core functionality remains identical to v0.1.1.

License: Apache-2.0

zoo-runner-common-0.1.1

18 Jan 18:08

Choose a tag to compare

📦 zoo-runner-common v0.1.1

Second release: PyPI metadata improvements and license update

This maintenance release enhances the package metadata for better PyPI visibility and updates the project license.

🔄 What's Changed

1. License Update

  • Switched from BSD-3-Clause to Apache-2.0 license
  • Ensures consistency across the ZOO-Project ecosystem

2. Enhanced PyPI Metadata

Added comprehensive package metadata for better discoverability on PyPI. org:

Keywords:

  • zoo-project, cwl, runner, workflow, ogc, api, processes

PyPI Classifiers:

  • Development Status: 4 - Beta
  • License: Apache Software License
  • Python Support: 3.10, 3.11, 3.12
  • Audience: Developers
  • Topic: Software Development / Libraries / Python Modules

Project URLs:

3. Additional Author

  • Added Gérald Fenoy as co-author

📦 Installation from PyPI

Once published, install directly from PyPI:

pip install zoo-runner-common

Or add to your pyproject.toml:

[project]
dependencies = [
    "zoo-runner-common>=0.1.1",
]

🔗 Links

📝 Notes

This release improves package discoverability on PyPI while maintaining full backward compatibility with v0.1.0.

License: Apache-2.0

zoo-runner-common-0.1.0

18 Jan 17:42

Choose a tag to compare

📦 Summary of Changes

This first release transforms zoo-runner-common into a Python package with major architectural improvements and comprehensive documentation.

🏗️ Major Architectural Improvements

1. Enhanced BaseRunner (base_runner.py)

The BaseRunner has been significantly extended with 8+ new shared methods:

  • get_workflow_id() - Retrieve workflow identifier
  • get_workflow_inputs(mandatory=False) - Get input parameters
  • get_max_cores() and get_max_ram() - CWL resource evaluation
  • get_volume_size(unit='Gi') - Calculate storage space
  • assert_parameters() - Input validation
  • get_processing_parameters() - Retrieve execution parameters
  • get_namespace_name() - Generate unique namespace names
  • finalize() - Finalization logic with hooks

Impact: ~437 lines of duplicated code eliminated across the 3 runners!

2. New Module: ExecutionHandler (handlers.py)

Introduction of an abstract class to standardize execution hooks:

  • pre_execution_hook() and post_execution_hook()
  • get_secrets(), get_pod_env_vars(), get_pod_node_selector()
  • handle_outputs(), get_additional_parameters()

3. ZooConf Improvements (zoo_conf.py)

  • Enhanced support for complex types (arrays, OGC bbox)
  • NULL value handling
  • Support for multiple file formats
  • CWL v1.2 parsing with automatic conversion
  • Better resource evaluation with scatter operation support

4. Extended ZooStub (zoostub.py)

  • Added all ZOO status codes (ACCEPTED, STARTED, PAUSED, DEPLOYED, etc.)
  • Structured logging with loguru (trace, debug, info, success, warning, error, critical)

📚 Comprehensive Documentation

MkDocs Structure

docs/
├── index.md
├── getting-started/
│   ├── installation.md
│   └── quickstart. md
├── user-guide/
│   ├── base-runner.md
│   ├── zoo-conf.md
│   └── zoo-stub.md
├── api/
│   ├── base-runner.md
│   └── zoo-conf.md
├── development/
│   ├── contributing.md
│   └── implementing-runners.md
└── about/
    └── changelog.md
  • 280+ lines in base-runner.md (API Reference)
  • 351+ lines in base-runner.md (User Guide)
  • 476+ lines in implementing-runners.md (complete tutorial)
  • Complete, functional code examples throughout

🔧 DevOps Infrastructure

1. GitHub Actions for Documentation (.github/workflows/docs.yml)

  • Automatic build with MkDocs Material
  • Deployment to GitHub Pages
  • Triggers on push and PR

2. PyPI Publishing Pipeline (.github/workflows/publish-pypi.yml)

  • Automatic publication on release
  • Trusted Publishing support (no token needed)
  • Automatic version bumping
  • Manual trigger via workflow_dispatch

3. Project Configuration

  • Complete .gitignore (Python, venv, dist, IDEs, MkDocs site)
  • ruff.toml for linting (pycodestyle, pyflakes, isort, pyupgrade)
  • mkdocs.yml with Material theme and extensions

📝 Enhanced Documentation

Improved README.md

  • Badges and statistics (~437 duplicate lines eliminated)
  • Installation examples
  • Usage guide
  • Clear architecture overview
  • Table of runners using the package

pyproject.toml

  • Added loguru>=0.7.0 dependency
  • Complete metadata

🎯 Benefits of This Release

  1. Reduced Duplication: ~437 lines of code eliminated
  2. Single Source of Truth: One place for common logic
  3. Easier Maintenance: Fix once, benefit everywhere
  4. Consistent Behavior: Same logic across all runners
  5. Documentation: Complete guide for developers
  6. Automated CI/CD: Automated publishing and documentation

🚀 Production Ready

This first release establishes zoo-runner-common as a Python package with:

  • Exhaustive documentation
  • Configured testing and linting
  • Automated publishing pipeline
  • Extensible and clear architecture

💡 Suggested Release Notes

For the release announcement, I recommend highlighting:

  1. Code Deduplication: Elimination of ~437 duplicate lines across runner implementations
  2. Complete Documentation: Documentation site with guides, API reference, and tutorials
  3. Enhanced BaseRunner: 8+ new shared methods providing a complete framework
  4. CI/CD Infrastructure: Automated documentation deployment and PyPI publishing
  5. Developer Experience: Clear contributing guide and complete implementation tutorial

Key Message: zoo-runner-common v1.0.0 provides a robust, well-documented foundation for building CWL runners in the ZOO-Project ecosystem, significantly reducing code duplication and improving maintainability.