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

Fixing field constraints #83

Merged
merged 7 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 24 additions & 22 deletions bgc_data/bgc_chemistry.dataresource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,87 +13,89 @@ schema:
- name: TRIP_CODE
title: "Identifier for trip"
type: string
required: true
constraints:
required: true
- name: SAMPLEDEPTH_M
title: "Depth (m) that sample was obtained"
type: number
required: true
constraints:
required: true
- name: SAMPLEDATELOCAL
title: "Date & time of sample in local time (formatted string)"
type: datetime
# format string *must* be specified using standard Python/C strptime specification
# https://docs.python.org/2/library/datetime.html#strftime-strptime-behavior
format: "%Y-%m-%d %H:%M:%S"
required: true
constraints:
required: true
- name: SALINITY_PSU
title: "Salinity PSU value"
type: number
required: false
- name: SALINITY_FLAG
title: "FLAG value"
type: integer
required: true
constraints:
required: true
- name: SILICATE_UMOLL
title: "Silicate umoll"
type: number
required: false
- name: SILICATE_FLAG
title: "FLAG value"
type: integer
required: true
constraints:
required: true
- name: NITRATE_UMOLL
type: number
required: false
- name: NITRATE_FLAG
title: "FLAG value"
type: integer
required: true
constraints:
required: true
- name: PHOSPHATE_UMOLL
type: number
required: false
- name: PHOSPHATE_FLAG
title: "FLAG value"
type: integer
required: true
constraints:
required: true
- name: AMMONIUM_UMOLL
type: number
required: false
- name: AMMONIUM_FLAG
title: "FLAG value"
type: integer
required: true
constraints:
required: true
- name: NITRITE_UMOLL
type: number
required: false
- name: NITRITE_FLAG
title: "FLAG value"
type: integer
required: true
constraints:
required: true
- name: DIC_UMOLKG
type: number
required: false
- name: CARBON_FLAG
title: "FLAG value"
type: integer
required: true
constraints:
required: true
- name: TALKALINITY_UMOLKG
type: number
required: false
- name: ALKALINITY_FLAG
title: "FLAG value"
type: integer
required: true
constraints:
required: true
- name: OXYGEN_UMOLL
type: number
required: false
- name: OXYGEN_FLAG
title: "FLAG value"
type: integer
required: true
constraints:
required: true
- name: MICROBIOMESAMPLE_ID
title: "Microbiomesample_id"
type: string
required: false
primaryKey:
- TRIP_CODE
- SAMPLEDEPTH_M
Expand Down
19 changes: 10 additions & 9 deletions bgc_data/bgc_lfish_countraw.dataresource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,31 @@ schema:
- name: I_SAMPLE_ID
title: "Sample identifier"
type: integer
required: true
unique: false
constraints:
required: true
- name: TRIP_CODE
title: "Identifier for trip"
type: string
required: true
unique: false
constraints:
required: true
- name: SCIENTIFICNAME
title: "Scientific name of taxa"
type: string
required: true
unique: false
constraints:
required: true
- name: SPCODE
title: "Species code for taxa"
type: integer
required: true
constraints:
required: true
- name: TAXON_COUNT
title: "Number of individuals"
type: integer
required: true
constraints:
required: true
- name: COMMENTS
title: "Optional comments"
type: string
required: false
primaryKey:
- I_SAMPLE_ID
- SCIENTIFICNAME
Expand Down
43 changes: 23 additions & 20 deletions bgc_data/bgc_lfish_samples.dataresource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,89 +13,92 @@ schema:
- name: I_SAMPLE_ID
title: "Sample identifier"
type: integer
required: true
unique: true
constraints:
required: true
unique: true
- name: PROJECTNAME
title: "Source project name"
type: string
required: true
constraints:
required: true
- name: TRIP_CODE
title: "Identifier for trip"
type: string
required: true
constraints:
required: true
- name: SAMPLEDATELOCAL
title: "Date & time of sample in local time (formatted string)"
type: datetime
# format string *must* be specified using standard Python/C strptime specification
# https://docs.python.org/2/library/datetime.html#strftime-strptime-behavior
format: "%Y-%m-%d %H:%M:%S"
required: true
constraints:
required: true
- name: SAMPLEDATEUTC
title: "Date & time of sample in local time (formatted string)"
type: datetime
# format string *must* be specified using standard Python/C strptime specification
# https://docs.python.org/2/library/datetime.html#strftime-strptime-behavior
format: "%Y-%m-%d %H:%M:%S"
required: false
- name: LATITUDE
title: "Latitude of station in decimal degrees North"
type: number
minimum: -90
maximum: 90
required: true
constraints:
required: true
- name: LONGITUDE
title: "Longitude of station in decimal degrees East"
type: number
minimum: -180
maximum: 180
required: true
constraints:
required: true
- name: STATIONNAME
title: "Station name"
type: string
required: false
- name: SAMPVOL_M3
title: "Volume of sample analysed (cubic metres)"
type: number
required: true
constraints:
required: true
- name: VESSEL
title: "Name of sampling vessel"
type: string
required: true
constraints:
required: true
- name: TOWTYPE
title: "Type of tow (e.g. 'Surface', 'Oblong')"
type: string
required: true
constraints:
required: true
- name: GEARDEPTH_M
title: "Depth of gear (metres) - may be a depth range"
type: string
required: false
- name: GEARMESH_UM
title: "Gear mesh descriptor"
type: string
required: true
constraints:
required: true
- name: DEPTH_M
type: number
required: false
- name: TEMPERATURE_C
title: "Temperature (deg C)"
type: number
required: false
- name: SALINITY_PSU
title: "Salinity"
type: number
required: false
- name: COMMENTS
title: "Comments (optional)"
type: string
required: false
- name: QC_FLAG
title: "Quality control flag value"
type: integer
required: true
constraints:
required: true
- name: FLAG_COMMENT
title: "Optional comments on QC_FLAG"
type: string
required: false
primaryKey: I_SAMPLE_ID
licenses:
- name: CC-BY-4.0
Expand Down
9 changes: 4 additions & 5 deletions bgc_data/bgc_phyto_changelog.dataresource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,23 @@ schema:
- name: TAXON_NAME
title: "Taxonomic name that the species is currently identified as (post startdate)"
type: string
required: true
constraints:
required: true
- name: STARTDATE
title: "Date from which the taxon_name was first consistently used (formatted string: YYYY-MM-DD)"
type: date
format: "%Y-%m-%d"
required: true
constraints:
required: true
- name: PARENT_NAME
title: "Taxon name which the species was known by before the start date"
type: string
required: false
- name: TRAINING
title: "Training from which the taxon_name was first consistently used"
type: string
required: false
- name: COMMENTS
title: "Comments"
type: string
required: false
primaryKey:
- TAXON_NAME
licenses:
Expand Down
26 changes: 14 additions & 12 deletions bgc_data/bgc_phyto_raw.dataresource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,51 +13,53 @@ schema:
- name: TRIP_CODE
title: "Unique identifier for sample"
type: string
required: true
constraints:
required: true
- name: TAXON_NAME
title: "Scientific name of taxa"
type: string
required: true
constraints:
required: true
- name: TAXON_GROUP
title: "Functional group assigned to taxa"
type: string
required: true
constraints:
required: true
- name: GENUS
title: "Genus name of taxa"
type: string
required: false
- name: SPECIES
title: "Species name of taxa"
type: string
required: false
- name: SPCODE
title: "Species code for taxa AphiaID Worms"
type: integer
required: false
- name: CELL_L
title: "Abundance of the taxa in cells per litre of water"
type: number
required: true
constraints:
required: true
- name: BIOVOLUME_UM3L
title: "Biovolume of the taxa in um3 per litre of water"
type: number
required: false
- name: CELL_COUNT
title: "Number of the taxa counted in sample"
type: number
required: true
constraints:
required: true
- name: SAMPVOL_L
title: "Volume of sample analysed"
type: number
required: true
constraints:
required: true
- name: METHODS
title: Method code
type: string
required: false
- name: COMMENTS
title: "Comments"
type: string
required: true
constraints:
required: true
primaryKey:
- TRIP_CODE
- TAXON_NAME
Expand Down
Loading
Loading