Skip to content

Commit

Permalink
Merge pull request #53 from hydroshare/52-fix-for-missing-aggr-metada…
Browse files Browse the repository at this point in the history
…ta-models-in-gh-pages

Fix for missing metadata models in github pages documentation
  • Loading branch information
pkdash authored Nov 18, 2024
2 parents 8df324f + 009e6a7 commit 885cbb8
Show file tree
Hide file tree
Showing 3 changed files with 173 additions and 2 deletions.
70 changes: 70 additions & 0 deletions docs/ModelInstanceMetadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Model Instance Aggregation Metadata

## Properties

- **`title`** *(string)*: A string containing a descriptive title for the aggregation. Default: `null`.
- **`subjects`** *(array)*: A list of keyword strings expressing the topic of the aggregation. Default: `[]`.
- **Items** *(string)*
- **`language`** *(string)*: The 3-character string for the language in which the metadata and content are expressed. Default: `"eng"`.
- **`additional_metadata`** *(array)*: A dictionary of additional metadata elements expressed as key-value pairs.
- **Items** *(object)*: A key-value pair. Default: `[]`.
- **`key`** *(string)*
- **`value`** *(string)*
- **`spatial_coverage`**: An object containing the geospatial coverage for the aggregation expressed as either a bounding box or point. Default: `null`.
- **Any of**
- : Refer to *[#/definitions/PointCoverage](#definitions/PointCoverage)*.
- : Refer to *[#/definitions/BoxCoverage](#definitions/BoxCoverage)*.
- *null*
- **`period_coverage`**: An object containing the temporal coverage for a aggregation expressed as a date range. Default: `null`.
- **Any of**
- : Refer to *[#/definitions/PeriodCoverage](#definitions/PeriodCoverage)*.
- *null*
- **`includes_model_output`** *(boolean)*: Indicates whether model output files are included in the aggregation.
- **`executed_by`**: A URL to the Model Program that can be used to execute this model instance. Default: `null`.
- **Any of**
- *string*
- *null*
- **`program_schema_json`**: A URL to the JSON metadata schema for the related model program. Default: `null`.
- **Any of**
- *string*
- *null*
- **`program_schema_json_values`**: A URL to a JSON file containing the metadata values conforming to the JSON metadata schema for the related model program. Default: `null`.
- **Any of**
- *string*
- *null*
- **`type`**: A string expressing the aggregation type from the list of HydroShare aggregation types. Default: `"ModelInstance"`.
- **All of**
- : Refer to *[#/definitions/AggregationType](#definitions/AggregationType)*.
- **`url`** *(string)*: An object containing the URL of the aggregation.
- **`rights`**: An object containing information about the rights held in and over the aggregation and the license under which a aggregation is shared. Default: `null`.
- **Any of**
- : Refer to *[#/definitions/Rights](#definitions/Rights)*.
- *null*
## Definitions

- <a id="definitions/AggregationType"></a>**`AggregationType`** *(string)*: Must be one of: `["Generic", "FileSet", "GeoRaster", "NetCDF", "GeoFeature", "RefTimeseries", "TimeSeries", "ModelProgram", "ModelInstance", "CSV"]`.
- <a id="definitions/BoxCoverage"></a>**`BoxCoverage`** *(object)*: A class used to represent geographic coverage metadata for a resource or aggregation expressed as a
latitude-longitude bounding box.
- **`type`** *(string)*: A string containing the type of geographic coverage. Must be one of: `["box"]`. Default: `"box"`.
- **`name`** *(string)*: A string containing a name for the place associated with the geographic coverage. Default: `null`.
- **`northlimit`** *(number, required)*: A floating point value containing the constant coordinate for the northernmost face or edge of the bounding box. Exclusive minimum: `-90.0`. Exclusive maximum: `90.0`.
- **`eastlimit`** *(number, required)*: A floating point value containing the constant coordinate for the easternmost face or edge of the bounding box. Exclusive minimum: `-180.0`. Exclusive maximum: `180.0`.
- **`southlimit`** *(number, required)*: A floating point value containing the constant coordinate for the southernmost face or edge of the bounding box. Exclusive minimum: `-90.0`. Exclusive maximum: `90.0`.
- **`westlimit`** *(number, required)*: A floating point value containing the constant coordinate for the westernmost face or edge of the bounding box. Exclusive minimum: `-180.0`. Exclusive maximum: `180.0`.
- **`units`** *(string, required)*: A string containing the units applying to the unlabelled numeric values of northlimit, eastlimit, southlimit, and westlimit.
- **`projection`** *(string)*: A string containing the name of the projection used with any parameters required, such as ellipsoid parameters, datum, standard parallels and meridians, zone, etc. Default: `null`.
- <a id="definitions/PeriodCoverage"></a>**`PeriodCoverage`** *(object)*: A class used to represent temporal coverage metadata for a resource or aggregation.
- **`name`** *(string)*: A string containing a name for the time interval. Default: `null`.
- **`start`** *(string, required)*: A datetime object containing the instant corresponding to the commencement of the time interval.
- **`end`** *(string, required)*: A datetime object containing the instant corresponding to the termination of the time interval.
- <a id="definitions/PointCoverage"></a>**`PointCoverage`** *(object)*: A class used to represent geographic coverage metadata for a resource or aggregation expressed as a
point location.
- **`type`** *(string)*: A string containing the type of geographic coverage. Must be one of: `["point"]`. Default: `"point"`.
- **`name`** *(string)*: A string containing a name for the place associated with the geographic coverage. Default: `null`.
- **`east`** *(number, required)*: The coordinate of the point location measured in the east direction. Exclusive minimum: `-180.0`. Exclusive maximum: `180.0`.
- **`north`** *(number, required)*: The coordinate of the point location measured in the north direction. Exclusive minimum: `-90.0`. Exclusive maximum: `90.0`.
- **`units`** *(string, required)*: The units applying to the unlabelled numeric values of north and east.
- **`projection`** *(string, required)*: The name of the projection used with any parameters required, such as ellipsoid parameters, datum, standard parallels and meridians, zone, etc.
- <a id="definitions/Rights"></a>**`Rights`** *(object)*: A class used to represent the rights statement metadata associated with a resource.
- **`statement`** *(string, required)*: A string containing the text of the license or rights statement.
- **`url`** *(string, required)*: An object containing the URL pointing to a description of the license or rights statement.
89 changes: 89 additions & 0 deletions docs/ModelProgramMetadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Model Program Aggregation Metadata

## Properties

- **`title`** *(string)*: A string containing a descriptive title for the aggregation. Default: `null`.
- **`subjects`** *(array)*: A list of keyword strings expressing the topic of the aggregation. Default: `[]`.
- **Items** *(string)*
- **`language`** *(string)*: The 3-character string for the language in which the metadata and content are expressed. Default: `"eng"`.
- **`additional_metadata`** *(array)*: A dictionary of additional metadata elements expressed as key-value pairs.
- **Items** *(object)*: A key-value pair. Default: `[]`.
- **`key`** *(string)*
- **`value`** *(string)*
- **`spatial_coverage`**: An object containing the geospatial coverage for the aggregation expressed as either a bounding box or point. Default: `null`.
- **Any of**
- : Refer to *[#/definitions/PointCoverage](#definitions/PointCoverage)*.
- : Refer to *[#/definitions/BoxCoverage](#definitions/BoxCoverage)*.
- *null*
- **`period_coverage`**: An object containing the temporal coverage for a aggregation expressed as a date range. Default: `null`.
- **Any of**
- : Refer to *[#/definitions/PeriodCoverage](#definitions/PeriodCoverage)*.
- *null*
- **`version`**: The software version or build number of the model. Default: `null`.
- **Any of**
- *string*
- *null*
- **`programming_languages`** *(array)*: The programming languages that the model is written in. Length must be at most 100. Default: `[]`.
- **Items** *(string)*
- **`operating_systems`** *(array)*: Compatible operating systems to setup and run the model. Length must be at most 100. Default: `[]`.
- **Items** *(string)*
- **`release_date`**: The date that this version of the model was released. Default: `null`.
- **Any of**
- *string*
- *null*
- **`website`**: A URL to a website describing the model that is maintained by the model developers. Default: `null`.
- **Any of**
- *string*
- *null*
- **`code_repository`**: A URL to the source code repository for the model code (e.g., git, mercurial, svn, etc.). Default: `null`.
- **Any of**
- *string*
- *null*
- **`file_types`** *(array)*: File types used by the model program. Default: `[]`.
- **Items**: Refer to *[#/definitions/ModelProgramFile](#definitions/ModelProgramFile)*.
- **`program_schema_json`**: A url to the JSON metadata schema for the model program. Default: `null`.
- **Any of**
- *string*
- *null*
- **`type`**: A string expressing the aggregation type from the list of HydroShare aggregation types. Default: `"ModelProgram"`.
- **All of**
- : Refer to *[#/definitions/AggregationType](#definitions/AggregationType)*.
- **`url`** *(string)*: An object containing the URL of the aggregation.
- **`rights`**: An object containing information about the rights held in and over the aggregation and the license under which a aggregation is shared. Default: `null`.
- **Any of**
- : Refer to *[#/definitions/Rights](#definitions/Rights)*.
- *null*
## Definitions

- <a id="definitions/AggregationType"></a>**`AggregationType`** *(string)*: Must be one of: `["Generic", "FileSet", "GeoRaster", "NetCDF", "GeoFeature", "RefTimeseries", "TimeSeries", "ModelProgram", "ModelInstance", "CSV"]`.
- <a id="definitions/BoxCoverage"></a>**`BoxCoverage`** *(object)*: A class used to represent geographic coverage metadata for a resource or aggregation expressed as a
latitude-longitude bounding box.
- **`type`** *(string)*: A string containing the type of geographic coverage. Must be one of: `["box"]`. Default: `"box"`.
- **`name`** *(string)*: A string containing a name for the place associated with the geographic coverage. Default: `null`.
- **`northlimit`** *(number, required)*: A floating point value containing the constant coordinate for the northernmost face or edge of the bounding box. Exclusive minimum: `-90.0`. Exclusive maximum: `90.0`.
- **`eastlimit`** *(number, required)*: A floating point value containing the constant coordinate for the easternmost face or edge of the bounding box. Exclusive minimum: `-180.0`. Exclusive maximum: `180.0`.
- **`southlimit`** *(number, required)*: A floating point value containing the constant coordinate for the southernmost face or edge of the bounding box. Exclusive minimum: `-90.0`. Exclusive maximum: `90.0`.
- **`westlimit`** *(number, required)*: A floating point value containing the constant coordinate for the westernmost face or edge of the bounding box. Exclusive minimum: `-180.0`. Exclusive maximum: `180.0`.
- **`units`** *(string, required)*: A string containing the units applying to the unlabelled numeric values of northlimit, eastlimit, southlimit, and westlimit.
- **`projection`** *(string)*: A string containing the name of the projection used with any parameters required, such as ellipsoid parameters, datum, standard parallels and meridians, zone, etc. Default: `null`.
- <a id="definitions/ModelProgramFile"></a>**`ModelProgramFile`** *(object)*: A class used to represent the metadata associated with a file used by a model program aggregation.
- **`type`**: The type of the file used by the model program.
- **All of**
- : Refer to *[#/definitions/ModelProgramFileType](#definitions/ModelProgramFileType)*.
- **`url`** *(string, required)*: The url of the file used by the model program.
- <a id="definitions/ModelProgramFileType"></a>**`ModelProgramFileType`** *(string)*: Must be one of: `["https://www.hydroshare.org/terms/modelReleaseNotes", "https://www.hydroshare.org/terms/modelDocumentation", "https://www.hydroshare.org/terms/modelSoftware", "https://www.hydroshare.org/terms/modelEngine"]`.
- <a id="definitions/PeriodCoverage"></a>**`PeriodCoverage`** *(object)*: A class used to represent temporal coverage metadata for a resource or aggregation.
- **`name`** *(string)*: A string containing a name for the time interval. Default: `null`.
- **`start`** *(string, required)*: A datetime object containing the instant corresponding to the commencement of the time interval.
- **`end`** *(string, required)*: A datetime object containing the instant corresponding to the termination of the time interval.
- <a id="definitions/PointCoverage"></a>**`PointCoverage`** *(object)*: A class used to represent geographic coverage metadata for a resource or aggregation expressed as a
point location.
- **`type`** *(string)*: A string containing the type of geographic coverage. Must be one of: `["point"]`. Default: `"point"`.
- **`name`** *(string)*: A string containing a name for the place associated with the geographic coverage. Default: `null`.
- **`east`** *(number, required)*: The coordinate of the point location measured in the east direction. Exclusive minimum: `-180.0`. Exclusive maximum: `180.0`.
- **`north`** *(number, required)*: The coordinate of the point location measured in the north direction. Exclusive minimum: `-90.0`. Exclusive maximum: `90.0`.
- **`units`** *(string, required)*: The units applying to the unlabelled numeric values of north and east.
- **`projection`** *(string, required)*: The name of the projection used with any parameters required, such as ellipsoid parameters, datum, standard parallels and meridians, zone, etc.
- <a id="definitions/Rights"></a>**`Rights`** *(object)*: A class used to represent the rights statement metadata associated with a resource.
- **`statement`** *(string, required)*: A string containing the text of the license or rights statement.
- **`url`** *(string, required)*: An object containing the URL pointing to a description of the license or rights statement.
16 changes: 14 additions & 2 deletions docs/generate_model_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@
import json

from hsmodels.schemas.resource import ResourceMetadata
from hsmodels.schemas.aggregations import FileSetMetadata, GeographicRasterMetadata, GeographicFeatureMetadata, \
MultidimensionalMetadata, ReferencedTimeSeriesMetadata, SingleFileMetadata, TimeSeriesMetadata, CSVFileMetadata
from hsmodels.schemas.aggregations import (
FileSetMetadata,
GeographicRasterMetadata,
GeographicFeatureMetadata,
MultidimensionalMetadata,
ReferencedTimeSeriesMetadata,
SingleFileMetadata,
TimeSeriesMetadata,
ModelProgramMetadata,
ModelInstanceMetadata,
CSVFileMetadata,
)

aggregation_models = [
ResourceMetadata,
Expand All @@ -15,6 +25,8 @@
ReferencedTimeSeriesMetadata,
SingleFileMetadata,
TimeSeriesMetadata,
ModelProgramMetadata,
ModelInstanceMetadata,
CSVFileMetadata
]

Expand Down

0 comments on commit 885cbb8

Please sign in to comment.