SwissTPH / openmalaria.tools

Tools for SwissTPH/openmalaria
Mozilla Public License 2.0
2 stars 3 forks source link

generateDoc.py: missing documentation for base type #1

Open dhardy opened 9 years ago

dhardy commented 9 years ago

The following element has a second attribute, value. Documentation is missing.

→ scenario → interventions → importedInfections → timed → rate

Schema (XSD)

dhardy commented 9 years ago

Another example: SurveyOptions's option element does not include name or value attributes.

Update from @tph-thuering: Corrected links to new wiki location.

tph-thuering commented 9 years ago

@dhardy

<SurveyOptions> has type om:MonitoringOptions, which is a complexType. MonitoringOptions contains a <sequence> of elements named <option> with type om:MonitoryingOption, which has only the following attributes defined in XSD: [outputNumber, byAge, byCohort, bySpecies, byGenotype, byDrugType] I don't see name or value defined for a subtype of <SurveyOptions>.

Or did you mean this option:

<xs:complexType name="Option">
  <xs:attribute name="name" type="xs:string" use="required">...</xs:attribute>
  <xs:attribute default="true" name="value" type="xs:boolean">...</xs:attribute>
</xs:complexType>

which should look like this ?

→ scenario → monitoring → continuous → option
dhardy commented 9 years ago

@tph-thuering yes, think you got it.

tph-thuering commented 9 years ago

@dhardy I am confused about what to do about this.

Do we need to change the XSD or should generateDoc.py resolve this dependency and create better documentation?

dhardy commented 9 years ago

I'm pretty sure the problem is in generateDoc.py (the schema validates XMLs properly, or at least has for a long time despite these features).

tph-thuering commented 9 years ago

TODO:

Check if any of those extension base types exist in Generated documentation: $ grep '<xs:extension base=".*">' scenario_33.xsd -o

om:AgeGroupValues
om:DecisionTree
om:DecisionTree
om:TriggeredDeployments
om:DoubleValue
om:OptionSet
om:Option
om:HealthSystem
om:NonVector
om:DoubleValue
om:DeploymentBase
om:DeploymentBase
om:IRSDeterrency
om:IRSDeterrency
om:ITNDeterrency
om:MosqStage

https://github.com/SwissTPH/openmalaria/blob/master/schema/scenario_33.xsd#L722 HealthSystem https://github.com/SwissTPH/openmalaria/blob/master/schema/scenario_33.xsd#L1228 DecisionTree https://github.com/SwissTPH/openmalaria/blob/master/schema/scenario_33.xsd#L1740 TriggeredDeployments https://github.com/SwissTPH/openmalaria/blob/master/schema/scenario_33.xsd#L1793 https://github.com/SwissTPH/openmalaria/blob/master/schema/scenario_33.xsd#L1798 https://github.com/SwissTPH/openmalaria/blob/master/schema/scenario_33.xsd#L2008 https://github.com/SwissTPH/openmalaria/blob/master/schema/scenario_33.xsd#L2024 https://github.com/SwissTPH/openmalaria/blob/master/schema/scenario_33.xsd#L3134 https://github.com/SwissTPH/openmalaria/blob/master/schema/scenario_33.xsd#L3826 https://github.com/SwissTPH/openmalaria/blob/master/schema/scenario_33.xsd#L3853 https://github.com/SwissTPH/openmalaria/blob/master/schema/scenario_33.xsd#L4064 https://github.com/SwissTPH/openmalaria/blob/master/schema/scenario_33.xsd#L4570