#392 closed defect (fixed)
psMetadataParseConfig doesn't like tabs
| Reported by: | Paul Price | Owned by: | |
|---|---|---|---|
| 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)
Change History (13)
by , 21 years ago
| Attachment: | psMetadataParseConfigBug.tar.gz added |
|---|
comment:1 by , 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 , 21 years ago
I can provide a parser capable of validating the config file format if you would
find it helpful.
comment:3 by , 21 years ago
| Owner: | changed from to |
|---|
comment:4 by , 21 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
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 , 21 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
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 , 21 years ago
Would it make things easier for you if I provided the text of appendix A in ASCII?
comment:7 by , 21 years ago
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
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:9 by , 21 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
- 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 , 21 years ago
| Cc: | added |
|---|---|
| Resolution: | → fixed |
| Status: | reopened → closed |
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 , 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.

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