-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reimplement recipe subcommand #72
Merged
Merged
Conversation
This file contains 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
sgreenbury
commented
Aug 27, 2024
sgreenbury
commented
Aug 27, 2024
sgreenbury
commented
Aug 27, 2024
sgreenbury
commented
Aug 27, 2024
sgreenbury
commented
Aug 27, 2024
sgreenbury
commented
Aug 27, 2024
sgreenbury
commented
Aug 27, 2024
Revised `impl From<SearchParams> for Option<Expr>` to combine fields such that IDs are considered distinctly with OR alongside other fields.
sgreenbury
commented
Aug 30, 2024
sgreenbury
commented
Aug 30, 2024
Comment on lines
+275
to
+285
/// Aside from `metric_id`, each of the fields are combined with an AND operation, so searching for | ||
/// both text and a year range will only return metrics that satisfy both parameters. | ||
/// | ||
/// However, if a parameter has multiple values (e.g. multiple text strings), these are combined | ||
/// with an OR operation. So searching for multiple text strings will return metrics that satisfy | ||
/// any of the text strings. | ||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
/// | ||
/// `metric_id` is considered distinctly since the list of values uniquely identifies a set of | ||
/// metrics. This list of metrics is combined with the final combined expression of the other fields | ||
/// with an OR operation. This enables a search or recipe to contain a combination of specific | ||
/// `metric_id`s and other fields. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the search to be either metric_id
OR (<other fields>
combined with AND) to enable recipes to be a combination of metric IDs and other specifications. We should explore during user testing if this is an intuitive and useful modification or not.
Remove obsolete `MetricRequestResult` type and method on `DataRequestSpec` for generating a `MetricRequestResult`
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.
Closes #67.
Reimplementation of recipe subcommand with the following approach:
DataRequestSpec
to enable use of previous recipes.MetricId
orMetricText
combinable in search with logicalOR
.TryFrom<DataRequestSpec> for SearchParams
to enable search/download with same APIfn write_output
to reduce repetitionBBox
to search params (also towards Additional search functionality #66)Enable recipe command to use the either(this is an enhancement, so will open in a new issue)DataRequestSpec
orSearchParams