stac-utils / pystac

Python library for working with any SpatioTemporal Asset Catalog (STAC)
https://pystac.readthedocs.io
Other
352 stars 116 forks source link

Remove spaces from CBERS4 MUX 027 #140

Closed schwehr closed 4 years ago

schwehr commented 4 years ago

pystac/tests/data-files/catalogs/test-case-5/CBERS4/CBERS4MUX/CBERS4 MUX 027/ has spaces in the directory path. Unless the spaces are an explicit part of the tests, is it okay to remove them? I just got bit by these when using xargs

e.g. trying to get to this file with some tools requires extra care with two directory components containing spaces.

tests/data-files/catalogs/test-case-5/CBERS4/CBERS4MUX/CBERS4 MUX 027/CBERS4 MUX 027/069/CBERS_4_MUX_20190510_027_069_L2/CBERS_4_MUX_20190510_027_069_L2.json
lossyrob commented 4 years ago

@schwehr thanks for the issue! There shouldn't be anything that depends on the spaces, so this would be a fine change. I think changing the paths and any link HREFs in the STAC would do the trick; is this something you could submit a PR for?

schwehr commented 4 years ago

Great! I'll try to get a PR done in the next week.

schwehr commented 4 years ago

Working on it. I see this one failure before I change anything. Documenting so when it fails when I've got a PR, I don't stress over it.

git rev-parse HEAD
c87f073bacc82ae5dfb125f74cb29774678dad11

python -m unittest discover tests
.......................................................................F............................................
======================================================================
FAIL: test_full_copy_4 (test_catalog.FullCopyTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/google/home/schwehr/src/pystac-schwehr/tests/test_catalog.py", line 644, in test_full_copy_4
    self.assertTrue(os.path.exists(href))
AssertionError: False is not true