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

Point collection catalog yields warnings #28

Closed
dopplershift opened this issue Jun 21, 2015 · 7 comments
Closed

Point collection catalog yields warnings #28

dopplershift opened this issue Jun 21, 2015 · 7 comments
Assignees

Comments

@dopplershift
Copy link
Member

The following code:

from siphon.catalog import TDSCatalog
cat = TDSCatalog('http://thredds.ucar.edu/thredds/catalog/nws/metar/ncdecoded/catalog.xml?'
                 'dataset=nws/metar/ncdecoded/Metar_Station_Data_fc.cdmr')

yields:

WARNING:root:controlledVocabulary must have an attribute: vocabulary
WARNING:root:controlledVocabulary must have an attribute: vocabulary

I'm not sure if we're wrong or if thredds is wrong, but since we control it all, we really should make these warning go away somehow. (i.e. fix TDS or fix Siphon).

@dopplershift dopplershift added this to the v0.4.0 milestone Jun 21, 2015
@JohnLCaron
Copy link

where does this message come from? an XML validator i assume. where does it
get the catalog schema?

On Sun, Jun 21, 2015 at 9:49 AM, Ryan May [email protected] wrote:

The following code:

from siphon.catalog import TDSCatalog
cat = TDSCatalog('http://thredds.ucar.edu/thredds/catalog/nws/metar/ncdecoded/'
'catalog.xml?'
'dataset=nws/metar/ncdecoded/Metar_Station_Data_fc.cdmr')

yields:

WARNING:root:controlledVocabulary must have an attribute: vocabulary
WARNING:root:controlledVocabulary must have an attribute: vocabulary

I'm not sure if we're wrong or if thredds is wrong, but since we control
it all, we really should make these warning go away somehow. (i.e. fix TDS
or fix Siphon).


Reply to this email directly or view it on GitHub
#28.

@JohnLCaron
Copy link

<xsd:complexType name="controlledVocabulary">
xsd:simpleContent
<xsd:extension base="xsd:string">
<xsd:attribute name="vocabulary" type="xsd:string"/>
/xsd:extension
/xsd:simpleContent
/xsd:complexType

Optional and Required Attributes

Attributes are optional by default. To specify that the attribute is
required, use the "use" attribute:
<xs:attribute name="lang" type="xs:string" use="required"/>

On Sun, Jun 21, 2015 at 3:25 PM, John Caron [email protected] wrote:

where does this message come from? an XML validator i assume. where does
it get the catalog schema?

On Sun, Jun 21, 2015 at 9:49 AM, Ryan May [email protected]
wrote:

The following code:

from siphon.catalog import TDSCatalog
cat = TDSCatalog('http://thredds.ucar.edu/thredds/catalog/nws/metar/ncdecoded/'
'catalog.xml?'
'dataset=nws/metar/ncdecoded/Metar_Station_Data_fc.cdmr')

yields:

WARNING:root:controlledVocabulary must have an attribute: vocabulary
WARNING:root:controlledVocabulary must have an attribute: vocabulary

I'm not sure if we're wrong or if thredds is wrong, but since we control
it all, we really should make these warning go away somehow. (i.e. fix TDS
or fix Siphon).


Reply to this email directly or view it on GitHub
#28.

@lesserwhirls
Copy link
Collaborator

I got it wrong in siphon. I'll get it fixed.

On Sunday, June 21, 2015, John Caron [email protected] wrote:

<xsd:complexType name="controlledVocabulary">
xsd:simpleContent
<xsd:extension base="xsd:string">
<xsd:attribute name="vocabulary" type="xsd:string"/>
/xsd:extension
/xsd:simpleContent
/xsd:complexType

Optional and Required Attributes

Attributes are optional by default. To specify that the attribute is
required, use the "use" attribute:
<xs:attribute name="lang" type="xs:string" use="required"/>

On Sun, Jun 21, 2015 at 3:25 PM, John Caron <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:

where does this message come from? an XML validator i assume. where does
it get the catalog schema?

On Sun, Jun 21, 2015 at 9:49 AM, Ryan May <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');>
wrote:

The following code:

from siphon.catalog import TDSCatalog
cat = TDSCatalog('
http://thredds.ucar.edu/thredds/catalog/nws/metar/ncdecoded/'
'catalog.xml?'
'dataset=nws/metar/ncdecoded/Metar_Station_Data_fc.cdmr')

yields:

WARNING:root:controlledVocabulary must have an attribute: vocabulary
WARNING:root:controlledVocabulary must have an attribute: vocabulary

I'm not sure if we're wrong or if thredds is wrong, but since we control
it all, we really should make these warning go away somehow. (i.e. fix
TDS
or fix Siphon).


Reply to this email directly or view it on GitHub
#28.


Reply to this email directly or view it on GitHub
#28 (comment).

@lesserwhirls
Copy link
Collaborator

@JohnLCaron - If attributes are optional by default, what is the difference between the optional attributes that minOccurs=0 and some those that do not?

For example:

  <xsd:complexType name="spatialRange">
   <xsd:sequence>
     <xsd:element name="start" type="xsd:double"  />
     <xsd:element name="size" type="xsd:double" />
     <xsd:element name="resolution" type="xsd:double" minOccurs="0" />
     <xsd:element name="units" type="xsd:string" minOccurs="0" />
   </xsd:sequence>
  </xsd:complexType>

What is the difference between, say, start and stop, and resolution and units? Does that indicate that if there is a start and stop, there may be a resolution and units (but start and stop must exist)?

lesserwhirls added a commit to lesserwhirls/siphon that referenced this issue Jun 22, 2015
Fixes warning message reported in Unidata#28
More work to ensure attrs are actually required - see Unidata#30
@JohnLCaron
Copy link

attributes can only be required or not.

elements (as above) can have 0 to many, default i think is min=1, max=1

On Mon, Jun 22, 2015 at 10:06 AM, Sean Arms [email protected]
wrote:

@JohnLCaron https://github.com/JohnLCaron - If attributes are optional
by default, what is the difference between the optional attributes that
minOccurs=0 and some those that do not?

For example:

<xsd:complexType name="spatialRange">
xsd:sequence
<xsd:element name="start" type="xsd:double" />
<xsd:element name="size" type="xsd:double" />
<xsd:element name="resolution" type="xsd:double" minOccurs="0" />
<xsd:element name="units" type="xsd:string" minOccurs="0" />
/xsd:sequence
/xsd:complexType

What is the difference between, say, start and stop, and resolution and
units? Does that indicate that if there is a start and stop, there may be a
resolution and units (but start and stop must exist)?


Reply to this email directly or view it on GitHub
#28 (comment).

@lesserwhirls
Copy link
Collaborator

Ah, yes. My bad for mixing up attrs and elements.

Thanks!

On Mon, Jun 22, 2015 at 11:27 AM, John Caron [email protected]
wrote:

attributes can only be required or not.

elements (as above) can have 0 to many, default i think is min=1, max=1

On Mon, Jun 22, 2015 at 10:06 AM, Sean Arms [email protected]
wrote:

@JohnLCaron https://github.com/JohnLCaron - If attributes are optional
by default, what is the difference between the optional attributes that
minOccurs=0 and some those that do not?

For example:

<xsd:complexType name="spatialRange">
xsd:sequence
<xsd:element name="start" type="xsd:double" />
<xsd:element name="size" type="xsd:double" />
<xsd:element name="resolution" type="xsd:double" minOccurs="0" />
<xsd:element name="units" type="xsd:string" minOccurs="0" />
/xsd:sequence
/xsd:complexType

What is the difference between, say, start and stop, and resolution and
units? Does that indicate that if there is a start and stop, there may
be a
resolution and units (but start and stop must exist)?


Reply to this email directly or view it on GitHub
#28 (comment).


Reply to this email directly or view it on GitHub
#28 (comment).

dopplershift added a commit that referenced this issue Jun 22, 2015
Silence some warnings (Addresses #28)
@dopplershift
Copy link
Member Author

Fixed with 7f07012.

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

No branches or pull requests

3 participants