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

[oshdb-filter] allow filtering by changeset id and (optionally) contributor id #380

Merged
merged 34 commits into from
Jun 12, 2021

Conversation

tyrasd
Copy link
Member

@tyrasd tyrasd commented May 14, 2021

Description

This enhances the oshdb-filter module to be able to filter by osm contributions or osm entity snapshots.

This can be used to implement further filters, like these two new ones:

  • changeset: <id> to filter contributions by changeset id
  • contributor: <id> to filter contributions by user id (disabled by default, can be activated by creating a filter parser with the respective optional boolean flag enabled)

Corresponding issue

Closes #358

todo

  • integrate into map reducer
  • update documentation/changelog/upgrading instructions.

Checklist

@tyrasd tyrasd added the enhancement New feature or request label May 14, 2021
@tyrasd tyrasd force-pushed the filter-contributions branch 6 times, most recently from fd3c79d to df7615e Compare May 18, 2021 16:21
@tyrasd tyrasd changed the title 🚧 [oshdb-filter] allow filtering by changeset id and (optionally) contributor id [oshdb-filter] allow filtering by changeset id and (optionally) contributor id May 19, 2021
@tyrasd tyrasd added the waiting for review This pull request needs a code review label May 19, 2021
@rtroilo rtroilo self-requested a review May 20, 2021 09:32
Copy link
Member

@rtroilo rtroilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A very nice PR. I think we should also include

  • ChangesetIdFilterEqualsAnyOf
  • ContributorUserIdFilterEqualsAnyOf

as well. They should be very quick to implemented as far as I see the code.
In my opinion it could be a quite common use-case that you got a list of changeset ids and/or contributor ids which you want to use in a filter as well.

@tyrasd tyrasd force-pushed the filter-contributions branch 2 times, most recently from e8da0c9 to 3fa0cc1 Compare May 20, 2021 14:46
Copy link
Member

@rtroilo rtroilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tyrasd and others added 5 commits May 27, 2021 15:43
Co-authored-by: Rafael Troilo <rafael.troilo@heigit.org>
Reason: They did not really fulfil a specific purpose because one can already "and" combine OSH+OSM filters by calling `.filter` twice, and the geometry callback filter basically just replicates the `.filter(Predicate)` anyway.
Also the given documentation and examples were not in line with the actual behaviour when one would have negated the filter, so it in the end just confusing to use.
@tyrasd tyrasd requested a review from rtroilo June 4, 2021 15:53
rtroilo
rtroilo previously approved these changes Jun 11, 2021
Copy link
Member

@rtroilo rtroilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for this pr!
I added a minor suggested change.

Co-authored-by: Rafael Troilo <rafael.troilo@heigit.org>
@tyrasd tyrasd merged commit 3e5119a into master Jun 12, 2021
@tyrasd tyrasd deleted the filter-contributions branch June 12, 2021 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[oshdb-filter] filter by changeset id or list of change set ids
2 participants