Skip to content

Commit

Permalink
SPC-133 Famplan and Demproj schemas (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathansberry committed Sep 19, 2023
1 parent b0b41c6 commit 977fb54
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 0 deletions.
69 changes: 69 additions & 0 deletions ckanext/spectrum/schemas/demproj.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
scheming_version: 2
dataset_type: demproj
name: Demproj Projection
about: A customized dataset schema for Demproj Projections.
about_url: http://github.com/ckan/ckanext-scheming


dataset_fields:

- field_name: title
label: Projection Title
preset: title
form_placeholder: eg. A descriptive filename
validators: not_empty unicode_safe

- field_name: name
label: URL
validators: auto_generate_name_from_title unicode_safe name_validator package_name_validator
preset: dataset_slug
form_placeholder: eg. my-dataset

- field_name: first_year
label: First Year
validators: ignore_missing int_validator
form_placeholder: eg. 2012

- field_name: final_year
label: Final Year
validators: ignore_missing int_validator
form_placeholder: eg. 2022

- field_name: tag_string
label: Tags
preset: tag_string_autocomplete
form_placeholder: eg. economy, mental health, government

- field_name: country_name
label: Country Name
form_placeholder: Benin

- field_name: country_iso3_alpha
label: Country ISO3 Alpha Code
form_placeholder: BEN

- field_name: country_iso3_num
label: Country ISO3 Numeric Code
form_placeholder: 204

- field_name: notes
label: Notes
form_snippet: markdown.html
form_placeholder: eg. Some useful notes about the data

- field_name: owner_org
label: Organization
preset: dataset_organization

resource_fields:

- field_name: url
label: URL
preset: resource_url_upload

- field_name: name
label: Name (Module ID)

- field_name: format
label: Format
preset: resource_format_autocomplete
69 changes: 69 additions & 0 deletions ckanext/spectrum/schemas/famplan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
scheming_version: 2
dataset_type: famplan
name: Famplan Projection
about: A customized dataset schema for Famplan Projections.
about_url: http://github.com/ckan/ckanext-scheming


dataset_fields:

- field_name: title
label: Projection Title
preset: title
form_placeholder: eg. A descriptive filename
validators: not_empty unicode_safe

- field_name: name
label: URL
validators: auto_generate_name_from_title unicode_safe name_validator package_name_validator
preset: dataset_slug
form_placeholder: eg. my-dataset

- field_name: first_year
label: First Year
validators: ignore_missing int_validator
form_placeholder: eg. 2012

- field_name: final_year
label: Final Year
validators: ignore_missing int_validator
form_placeholder: eg. 2022

- field_name: tag_string
label: Tags
preset: tag_string_autocomplete
form_placeholder: eg. economy, mental health, government

- field_name: country_name
label: Country Name
form_placeholder: Benin

- field_name: country_iso3_alpha
label: Country ISO3 Alpha Code
form_placeholder: BEN

- field_name: country_iso3_num
label: Country ISO3 Numeric Code
form_placeholder: 204

- field_name: notes
label: Notes
form_snippet: markdown.html
form_placeholder: eg. Some useful notes about the data

- field_name: owner_org
label: Organization
preset: dataset_organization

resource_fields:

- field_name: url
label: URL
preset: resource_url_upload

- field_name: name
label: Name (Module ID)

- field_name: format
label: Format
preset: resource_format_autocomplete

0 comments on commit 977fb54

Please sign in to comment.