feat!: Add phase filter argument#5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR brings the
phasefilter 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
phasearguments 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 thebboxargument, which was filled by the Reader parameters. This is not the case anymore with thephaseargument, so we need more information. It is also more convenient to retrieve the necessary information from aFileNameFieldinstead of retrieving from the docstring.Breaking changes include: