Skip to content

Simplify the pipeline procedure by passing everything through a single argument conversion_pipeline #298

Open

Description

@shollendEODC

Currently the GeoZarrWriter has several (partially mutually exclusive) arguments for selecting a processing pipeline. This requires several functions and checks to determine which pipeline is actually applicable and later used, which I think is more complicated than it needs to be.

My suggestion would be a single argument (eg. conversion_pipeline) and a single function which validates the input product matches the argument and selects the corresponding processing function. It would also simplify the cli.

Open for discussion tough..

Activity

  1. emmanuelmathot commented on Oct 1, 2026

    @emmanuelmathot
    Contributor

    If you mean we should remove the auto detection of the product type. Agreed!

  2. shollendEODC commented on Oct 2, 2026

    @shollendEODC
    CollaboratorAuthor

    i would go even further and remove the *_optimized parameters in eopf_geozarr/cpm/writer.py:

    from:

    def write(
            ...
            generic_rechunker: bool | None = None,
            s2_optimized: bool | None = None,
            s3_olci_optimized: bool | None = None,
            ...
        ) -> Any:    
        ...
        selected_pipeline = select_pipeline(
                dtree,
                force=self._resolve_forced_pipeline(
                    dtree,
                    generic_rechunker=generic_rechunker,
                    s2_optimized=s2_optimized,
                    s3_olci_optimized=s3_olci_optimized,
                ),
            )
        ...
    

    To:

    def write(
            ...
            processing_pipeline: str,
            ...
        ) -> Any:
        selected_pipeline = verify_pipeline(processing_pipeline)  # -> check and validate processing_pipeline matches the input dtree
    

    Something along the lines of this; it would also align with the S2Type simplified detection for data product, which could be extended to all other products.

  3. emmanuelmathot commented on Oct 2, 2026

    @emmanuelmathot
    Contributor

    I am generally in favor but a separate PR would allow us to check that further

  4. shollendEODC commented on Oct 2, 2026

    @shollendEODC
    CollaboratorAuthor

    Definitely, this will have to done in its own PR, as also the test routing and eodc/developmentseed's pipeline will have to be adapted. I don't assign this a high priority, getting the products out soon is more important, but I want to keep it in a backlog for optimizing and refactoring the code.

  5. self-assigned this
    on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions