SETI / rms-pdsfile

pdsfile Python module
Apache License 2.0
0 stars 0 forks source link

The return value of "from_path" doesn't match the comments in the function #5

Closed rfrenchseti closed 2 months ago

rfrenchseti commented 11 months ago

From rms-webtools created by juzen2003: SETI/rms-webtools#24

rfrenchseti commented 11 months ago

Is this still a problem? All the tests are passing.

rfrenchseti commented 6 months ago

Currently the comment says:

          diagrams/checksums/whatever -> checksums-diagrams/whatever
          checksums/archives/whatever -> checksums-archives-volumes/whatever
          COISS_2001.targz -> archives-volumes/COISS_2xxx/COISS_2001.tar.gz
          COISS_2001_previews.targz ->
                    archives-previews/COISS_2xxx/COISS_2001_previews.tar.gz
          COISS_0xxx/v1 -> COISS_0xxx_v1

but running the code gives:

>>> p=pdsfile.Pds3File.from_path('COISS_2001.targz')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/seti/opus/rms-pdsfile/pdsfile/pdsfile.py", line 4218, in from_path
    this = this.child(part, fix_case=True, must_exist=must_exist,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/seti/opus/rms-pdsfile/pdsfile/pdsfile.py", line 3515, in child
    raise ValueError('Illegal bundle set directory "%s": %s' %
ValueError: Illegal bundle set directory "COISS_2001.targz": volumes