Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Add tests for the new KML validator #71

Description

@GretaCB

@who8mycakes Awesome job with debugging here, and a successful #FridayDeploy :) Here are some of my thoughts going forward.

Tests

Now that we have a new kml validation script, we'll need tests for the new script.
At bare minimum, some the tests I'm seeing needed would recreate the following error cases:

  • x layers found. Maximum of y layers allowed.
  • No duplicate layers allowed.
  • A success case
  • An invalid/corrupt file that fails gdal.open()

Remove redundant code

Also, looks like some of the same logic is within two other places:

We should remove the excess layer-validation logic to avoid future confusion about where exactly this takes place in tileset-unpacker. Let's be kind to our future selves :)

Optimize use of dependencies

Also, curious if gdal is needed in order to find layer count. Is it possible to use mapnik-omnivore since it's already a dependency? This would help avoid adding a pretty substantial dependency (gdal). Not sure if this was part of your convo with @mapsam last week.

cc @mapbox/unpacker

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions