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

TDS5 NCSS fixes #168

Merged
merged 4 commits into from
Nov 3, 2017
Merged

TDS5 NCSS fixes #168

merged 4 commits into from
Nov 3, 2017

Conversation

dopplershift
Copy link
Member

This fixes some errors and a bunch of warnings in parsing the dataset.xml on a TDS 5.0 grib collection.

The inclusion of the NCML namespace was breaking the parsing because
ElementTree hands us tag names with the namespace included. Fix by
stripping out the namespace, which seems to be the most common solution.
Also take the opportunity to move handler lookup to _Types so that we
don't make an external reference to _Types.__dict__ (Ew.)
@dopplershift dopplershift added this to the 0.6.1 milestone Nov 3, 2017
Copy link
Contributor

@jrleeman jrleeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All test failures coming from the minor change of the warning. ['a'] is now being represented as [\'a\']

except ValueError:
log.warning('Cannot convert %s to int. Keeping type as str.', val)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't do .format?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, logging is old-style only.

@dopplershift
Copy link
Member Author

Not exactly...I replaced ['a'] in the output message with "a". The former was confusing as I was trying to figure out what was going on, so I switched to something that seemed clearer.

It wasn't accomplishing anything (other than serving for `from siphon
import *`). More importantly, it was actually incorrect by mentioning
`upperair`.
Copy link
Collaborator

@lesserwhirls lesserwhirls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Copy link
Contributor

@jrleeman jrleeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM saves the day!

@dopplershift
Copy link
Member Author

Looks like the AppVeyor failure was transient. 🎉

@dopplershift dopplershift merged commit 03d1047 into Unidata:master Nov 3, 2017
@dopplershift dopplershift deleted the tds5-fixes branch November 3, 2017 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants