Skip to content

feat!: Add phase filter argument#5

Merged
robin-cls merged 6 commits into
mainfrom
predicates
May 6, 2026
Merged

feat!: Add phase filter argument#5
robin-cls merged 6 commits into
mainfrom
predicates

Conversation

@robin-cls
Copy link
Copy Markdown
Collaborator

@robin-cls robin-cls commented May 6, 2026

This PR brings the phase filter argument.

The main motivation is to prepare the HalfOrbitMixin implementation, which will be called to get the half orbit ranges of each mission phase. It will be much simpler to allow a phase arguments that will be used to filter the files to parse.

The introduction of this new arguments needed a refactoring. IPredicate, which was a builder, has been renamed as a IFilterBuilder, that can either build complex predicates working on files' record (SWOT geometries, the current implemented feature), or convert an exisiting filter to a filter known by the layouts (SWOT phase, the new feature). We could have build Predicates only, but these are only used on the files' records, meaning we will scan too many folders. On the contrary, 'simple' filters are applied on both folders and files' records, which will speed up the listing.

Another piece of refactoring has been done over the Filter Builders by replacing the 'input' parameter name - used to build the filter - by a complete FileNameField. This modification was necessary to build a complete docstring and signature for the new field. Until now, the only case we had was the bbox argument, which was filled by the Reader parameters. This is not the case anymore with the phase argument, so we need more information. It is also more convenient to retrieve the necessary information from a FileNameField instead of retrieving from the docstring.

Breaking changes include:

  • Renaming and refactoring of the IPredicate interface (IFilterBuilder, init modified, call removed and replaced by build_filter and build_predicate)

@robin-cls robin-cls merged commit fe3e6ad into main May 6, 2026
7 checks passed
@robin-cls robin-cls deleted the predicates branch May 6, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant