IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#392 closed defect (fixed)

psMetadataParseConfig doesn't like tabs

Reported by: Paul Price Owned by: Eric.VanAlst@…
Priority: highest Milestone:
Component: astro Version: 0.5.0
Severity: major Keywords:
Cc:

Description

psMetadataParseConfig won't parse a config file if it is tab-delimited (instead
of space-delimited). That is, tabs are not treated as whitespace.

The TYPE and METADATA types are not yet implemented (METADATA is relatively new,
but TYPE is not). These types allow the construction of layered metadata, so
their absence prevents the construction of complicated systems.

Attachments (1)

psMetadataParseConfigBug.tar.gz (1.0 KB ) - added by Paul Price 21 years ago.
Tarball to demonstrate tab bug (psMetadataParseConfigBug.tar.gz)

Download all attachments as: .zip

Change History (13)

by Paul Price, 21 years ago

Tarball to demonstrate tab bug (psMetadataParseConfigBug.tar.gz)

comment:1 by Paul Price, 21 years ago

Additional (small) bug --- the error has a double negative:
"Metadata type 'comment', found on line 5 of withTabs.config, is not invalid."

comment:2 by jhoblitt, 21 years ago

I can provide a parser capable of validating the config file format if you would
find it helpful.

comment:3 by robert.desonia@…, 21 years ago

Owner: changed from robert.desonia@… to Eric.VanAlst@…

comment:4 by Eric.VanAlst@…, 21 years ago

Resolution: fixed
Status: newclosed

The problem with tab characters has been fixed. Implemented the TYPE and
METADATA key words along with the MULTI specifier. I did not rename function as
specified in SDR-14 since this would affect other files which are currently
being worked on. The function psMetadataParseConfig should met all other
requirements specified in SDR-14 including nesting. I tested with all examples
in SDR-14 Appendix A. Updates were checked in on the main branch.

comment:5 by jhoblitt, 21 years ago

Resolution: fixed
Status: closedreopened

All of the tests under test/collections pass however; only a small subsection of
SDRS-14 appendix has been implimented. I would very much like to see tests for
all of appendix A as we may be making changes to the 'config' language format in
the future and I don't want any regressions sneaking in.

comment:6 by jhoblitt, 21 years ago

Would it make things easier for you if I provided the text of appendix A in ASCII?

comment:7 by Eric.VanAlst@…, 21 years ago

Resolution: fixed
Status: reopenedclosed

Add two additional test cases. One parses a file test4.config which has the
pass examples from appendix A and writes to STDOUT. The other file test5.config
contains the failed lines and the test verifies the number of lines failed.
Files check in on main branch.

comment:8 by Paul Price, 21 years ago

The "not invalid" error message is still present.

comment:9 by jhoblitt, 21 years ago

Resolution: fixed
Status: closedreopened
  • There is no support for the time types specified in SDRS-14 under section

5.1.4.2.1, "Scalar & Vector".

  • The tests from appendix A.1 are missing.
  • The tests from appendix A.4 are missing.

comment:10 by Eric.VanAlst@…, 21 years ago

Cc: eugene@… added
Resolution: fixed
Status: reopenedclosed

See bug #393. The types for time were not present in SDR-14(frozen for cycle 6).
If this is something that needs to be in cycle 6, it needs to be identified now.

Tests for appendix A.1 are covered under the first test case. It may not be the
exact file but if you compare the contents there are no missing test conditions
for key name, type, value, comment quads.

Reran original test file from tarball and did not experience the "is not valid".

comment:11 by Paul Price, 21 years ago

The problem is in astronomy/psAstronomyErrors.dat:

psMetadataIO_FILE_TYPE_INVALID Metadata type '%s', found on line %u of
%s, is not invalid.

"not invalid" is a double negative, and is not what is meant.

comment:12 by Paul Price, 21 years ago

Fixed.

Note: See TracTickets for help on using tickets.