Skip to content
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

Ideas: possibly improvements to the output of the metrics command #81

Open
6 of 7 tasks
andrewphilipsmith opened this issue Aug 12, 2024 · 1 comment · May be fixed by #85
Open
6 of 7 tasks

Ideas: possibly improvements to the output of the metrics command #81

andrewphilipsmith opened this issue Aug 12, 2024 · 1 comment · May be fixed by #85
Assignees

Comments

@andrewphilipsmith
Copy link
Contributor

andrewphilipsmith commented Aug 12, 2024

Draft:

  • --summary (just show the number of metrics that match the search criteria)
  • --exclude-description (the description field can be very verbose. The output would be more readable if it was excluded in some cases).
  • --unique-values / group-by. If I do a search that generates lots of results, I want to get back the list of unique titles / unique geometries etc (so that I know have to refine my search in future).
  • Add functionality to filter for "derived metrics"/"original census metrics only" (see Add basic population layer from popgetter a-b-street/15m#10 (comment))
  • Add ability to search by source_data_url
  • Add ability to search with regex (match_type: "exact", "regex" to include in CLI but also add "startswith", "contains" internal API)
  • Add ability to set case sensitivity for search
@andrewphilipsmith
Copy link
Contributor Author

Related to #80 and #64:

Regex switch

(--regex | --exact-match)
The search/filter arguments should either (a) all be interpreted as exact matches or (b) all be interpreted as regexs.

The relevant arguments are:

  -g, --geometry-level 
  -s, --source-data-release 
  -p, --publisher 
  -c, --country 
      --source-metric-id <SOURCE_METRIC_ID>
      --hxl 
      --name 
      --description

Notes

  • -t, --text Should always be interpreted as regex irrespective of the switch.
  • For all other fields, the default value should be --exact-match.
  • If a user requires a mixture of exact match and regexs, it is assumed that that user would be able to craft their regexs to give exact matches in the relevant fields:
popgetter metrics --geometry-level "^oa$" --description "something interesting"

Case insensitive

There should be a switch (--case-sensitive | --case-insensitive)

The default value should be --case-insensitive.

@sgreenbury sgreenbury self-assigned this Aug 30, 2024
This was referenced Sep 4, 2024
sgreenbury added a commit that referenced this issue Sep 6, 2024
Adds SearchConfig with `MatchType` (Exact, Regex, Contains, Startswith),
and `CaseSensitivity` (Insensitive or Sensitive), adds a test, and
incorporates into CLI with defaults for:
- `SearchText` when across all search contexts (regex)
- `MetricsId` (startswith, case insensitive)
@sgreenbury sgreenbury linked a pull request Sep 6, 2024 that will close this issue
3 tasks
sgreenbury added a commit that referenced this issue Sep 10, 2024
Adds SearchConfig with `MatchType` (Exact, Regex, Contains, Startswith),
and `CaseSensitivity` (Insensitive or Sensitive), adds a test, and
incorporates into CLI with defaults for:
- `SearchText` when across all search contexts (regex)
- `MetricsId` (startswith, case insensitive)
sgreenbury added a commit that referenced this issue Sep 10, 2024
Adds SearchConfig with `MatchType` (Exact, Regex, Contains, Startswith),
and `CaseSensitivity` (Insensitive or Sensitive), adds a test, and
incorporates into CLI with defaults for:
- `SearchText` when across all search contexts (regex)
- `MetricsId` (startswith, case insensitive)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress:
Development

Successfully merging a pull request may close this issue.

2 participants