|
class DataPackage(SerializableModel): |
|
"""Data Package is a simple specification for data access and delivery. |
|
|
|
Arguments: |
|
name: See [Data Package specification](https://specs.frictionlessdata.io/data-package/#name). |
|
id: See [Data Package specification](https://specs.frictionlessdata.io/data-package/#id). |
|
created: See [Data Package specification](https://specs.frictionlessdata.io/data-package/#created). Camtrap |
|
DP makes this a required property. |
|
title: See [Data Package specification](https://specs.frictionlessdata.io/data-package/#title). Not to be |
|
confused with the title of the project that originated the package |
|
(`package.project.title`). |
|
contributors: See [Data Package specification](https://specs.frictionlessdata.io/data-package/#contributors). |
|
Camtrap DP makes this a required property and restricts `role` values. Can include |
|
people and organizations. |
|
description: See [Data Package specification](https://specs.frictionlessdata.io/data-package/#description). Not |
|
to be confused with the description of the project that originated the package |
|
(`package.project.description`). |
|
version: See [Data Package specification](https://specs.frictionlessdata.io/data-package/#version). |
|
keywords: See [Data Package specification](https://specs.frictionlessdata.io/data-package/#keywords). |
|
image: See [Data Package specification](https://specs.frictionlessdata.io/data-package/#image). |
|
homepage: See [Data Package specification](https://specs.frictionlessdata.io/data-package/#homepage). |
|
sources: See [Data Package specification](https://specs.frictionlessdata.io/data-package/#sources). Can |
|
include the data management platform from which the package was derived (e.g. Agouti, |
|
Trapper, Wildlife Insights). |
|
licenses: See [Data Package specification](https://specs.frictionlessdata.io/data-package/#licenses). If |
|
provided, Camtrap DP further requires at least a license for the content of the package |
|
and one for the media files. |
|
bibliographicCitation: Bibliographic/recommended citation for the package. |
|
project: Camera trap project or study that originated the package. |
|
coordinatePrecision: Least precise coordinate precision of the `deployments.latitude` and `deployments.longitude` (e.g. |
|
`0.01` for coordinates with a precision of 0.01 and 0.001 degree). Especially relevant |
|
when coordinates have been rounded to protect sensitive species. |
|
spatial: GeoJSON |
|
temporal: Temporal coverage of the package. |
|
taxonomic: Taxonomic coverage of the package, based on the unique `observations.scientificName`. |
|
relatedIdentifiers: Identifiers of resources related to the package (e.g. papers, project pages, derived datasets, APIs, |
|
etc.). |
|
references: List of references related to the package (e.g. references cited in `package.project.description`). |
|
References preferably include a DOI. |
|
|
|
""" |
|
resources : list[Resource]=Field(default_factory=standard_resources, init=False) |
|
"""See [Data Package specification](https://specs.frictionlessdata.io/data-package/#resource-information). |
|
Camtrap DP further requires each object to be a [Tabular Data Resource](https://specs.frictionlessdata.io/tabular-data-resource/) |
|
with a specific `name` and `schema`. See [Data](https://camtrap-dp.tdwg.org/data) for the requirements for those resources.""" |
|
profile : str=Field(default="https://raw.githubusercontent.com/tdwg/camtrap-dp/1.0.2/camtrap-dp-profile.json", init=False) |
|
"""See [Data Package specification](https://specs.frictionlessdata.io/data-package/#profile). Camtrap |
|
DP further requires this to be the URL of the used Camtrap DP Profile version (e.g. |
|
`https://raw.githubusercontent.com/tdwg/camtrap-dp/1.0/camtrap-dp-profile.json`).""" |
Only the mandatory resources are currently supported (and hardcoded) for
trap_schema.datapackage.DataPackage.Resourceclass strictly only supports the three standard resources:trap-schema/src/trap_schema/datapackage.py
Lines 15 to 40 in e2f227f
standard_resources/get_resourcefunctions only support the standard resources:trap-schema/src/trap_schema/datapackage.py
Lines 42 to 58 in e2f227f
resourcesfield ofDataPackageis cannot be changed/is not exposed:trap-schema/src/trap_schema/datapackage.py
Lines 236 to 284 in e2f227f
But Camtrap DP should support additional optional resources; see https://camtrap-dp.tdwg.org/metadata/#resources
The reasoning behind it being fixed like this for the moment is to reduce friction for users and to minimize the chance of "cheating" the standard validation.