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

Paths are not normalized #204

Open
gadomski opened this issue Mar 15, 2022 · 0 comments
Open

Paths are not normalized #204

gadomski opened this issue Mar 15, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@gadomski
Copy link
Member

The output paths can contain unnecessary . characters if the STAC object link hrefs use them. E.g.:

$ stac-validator --recursive --lint ../stactools/tests/data-files/catalogs/test-case-1/catalog.json | jq '.[].path'
"../stactools/tests/data-files/catalogs/test-case-1/catalog.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-1/catalog.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-1/./area-1-1/collection.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-1/./area-1-1/./area-1-1-imagery/area-1-1-imagery.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-1/./area-1-1/./area-1-1-labels/area-1-1-labels.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-1/./area-1-2/collection.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-1/./area-1-2/./area-1-2-imagery/area-1-2-imagery.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-1/./area-1-2/./area-1-2-labels/area-1-2-labels.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-2/catalog.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-2/./area-2-1/collection.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-2/./area-2-1/./area-2-1-imagery/area-2-1-imagery.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-2/./area-2-1/./area-2-1-labels/area-2-1-labels.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-2/./area-2-2/collection.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-2/./area-2-2/./area-2-2-imagery/area-2-2-imagery.json"
"../stactools/tests/data-files/catalogs/test-case-1/./country-2/./area-2-2/./area-2-2-labels/area-2-2-labels.json"

While not technically incorrect, it may be nicer to normalize the paths before returning.

@gadomski gadomski added the bug Something isn't working label Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant