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

GTC-2888: Allow specifying tippecanoe feature filters #556

Merged
merged 15 commits into from
Jul 25, 2024

Conversation

dmannarino
Copy link
Member

@dmannarino dmannarino commented Jul 7, 2024

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • Make sure you are making a pull request against the develop branch (left side). Also you should start your branch off our develop.
  • Check the commit's or even all commits' message styles matches our requested structure.
  • Check your code additions will fail neither code linting checks nor unit test.

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this introduce a breaking change?

  • Yes
  • No

Other information

Proposed request body:
{ "asset_type": "Static vector tile cache", "creation_options": { "min_zoom": 0, "max_zoom": 9, "implementation": "attempt9", "tile_strategy": "discontinuous", "layer_style": [ { "id": "gadm_administrative_boundaries", "type": "fill", "source": "gadm_administrative_boundaries", "source-layer": "gadm_administrative_boundaries" } ], "feature_filter": { "*": [ "any", ["all", [">=", "$zoom", 0], ["==", "adm_level", "0"] ], ["all", [">=", "$zoom", 3], ["==", "adm_level", "1"] ], ["all", [">=", "$zoom", 7], ["==", "adm_level", "2"] ] ] } } }

@dmannarino dmannarino changed the title GTC-2888: Per zoom where filters GTC-2888: Per-zoom-range where filters Jul 7, 2024
@dmannarino dmannarino changed the title GTC-2888: Per-zoom-range where filters WIP: GTC-2888: Per-zoom-range where filters Jul 7, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jul 7, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.92%. Comparing base (75673ac) to head (829eeca).

Files Patch % Lines
app/tasks/static_vector_tile_cache_assets.py 75.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #556      +/-   ##
===========================================
- Coverage    81.92%   81.92%   -0.01%     
===========================================
  Files          126      126              
  Lines         5688     5692       +4     
===========================================
+ Hits          4660     4663       +3     
- Misses        1028     1029       +1     
Flag Coverage Δ
unittests 81.92% <80.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dmannarino dmannarino changed the title WIP: GTC-2888: Per-zoom-range where filters WIP: GTC-2888: Expose specifying tippecanoe feature filters Jul 22, 2024
@dmannarino dmannarino changed the title WIP: GTC-2888: Expose specifying tippecanoe feature filters WIP: GTC-2888: Allow specifying tippecanoe feature filters Jul 24, 2024
@dmannarino dmannarino marked this pull request as ready for review July 24, 2024 16:06
@dmannarino dmannarino changed the title WIP: GTC-2888: Allow specifying tippecanoe feature filters GTC-2888: Allow specifying tippecanoe feature filters Jul 24, 2024
Copy link
Collaborator

@danscales danscales left a comment

Choose a reason for hiding this comment

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

Looks good!

NDJSON_FILE="data.json"

echo "Fetching NDJSON data from the Data Lake: ${SRC} -> ${NDJSON_FILE}..."
aws s3 cp "${SRC}" "${NDJSON_FILE}" --no-progress
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor nit: is there a reason you moved the copy here earlier in the script. If not, I would move it back to where it was, since you don't want to do the copy if we fail in the case statement below with a bad tile cache option. (I know that is not likely to happen, because other code is generating this command.)

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good point, the reason for the move is lost to the sands of git. I will move it back, thanks!

Copy link
Contributor

@gtempus gtempus left a comment

Choose a reason for hiding this comment

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

@dmannarino and I walked through this together during a pairing session.

@dmannarino dmannarino merged commit 870d3bc into develop Jul 25, 2024
2 checks passed
@dmannarino dmannarino deleted the gtc-2888_per_zoom_where_filters branch July 25, 2024 13:57
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.

4 participants