opencdms / surface

GNU General Public License v3.0
6 stars 4 forks source link

Metadata Menu #11

Open scottylad501 opened 3 years ago

scottylad501 commented 3 years ago
  1. Finalize Metadata layout and features - Final version should have the following 7 tabs that will be linked to the WIGOS Metadata Standard in the future. Please have all tabs available for view.
  1. Implement the WIGOS metadata categories that are mandatory for WMO OSCAR - The categories are found on page 4 of the link document - https://www.dropbox.com/s/li8e0vu4lep41y0/us_metadata_opencdms.docx?dl=0

  2. Make sure that SURFACE metadata export format matches XML format needed for OSCAR(for the mandatory fields outlined above)

  3. Test SURFACE export and show that it works in OSCAR

  4. Instrumentation and Maintenance section should be linked to NMS station report and inventory see ISSUE 12 - https://github.com/opencdms/surface/issues/12

fabiosato commented 2 years ago

@Midms27 check this link for reference on mandatory fields of station information highlighted by @scottylad501: https://oscar.wmo.int/surface/#/search/station/stationReportDetails/0-20000-0-78583

image

fabiosato commented 2 years ago

@Midms27 this is a repository maintained by WMO with WIGOS code tables: https://github.com/wmo-im/wmds/tree/master/tables_en

fabiosato commented 2 years ago

@iedwards I am considering adding https://github.com/wmo-im/wmds as a git submodule to the project so we can refer to the WIGOS code tables in this WMO repository.

fabiosato commented 2 years ago

@Midms27 please proceed with the following changes:

  1. Replace WMO Region text input by a dropdown, using the following dataset for the new model: https://github.com/wmo-im/wmds/blob/master/tables_en/3-01.csv
  2. Replace "Country" text input by a dropdow, using the following table: https://github.com/wmo-im/wmds/blob/master/tables_en/3-02.csv
  3. Replace "Station/Platform Type (WMO)" text input by a dropdown using the following table: https://github.com/wmo-im/wmds/blob/master/tables_en/3-04.csv
  4. Replace "WMO Program" text input by a dropdown with MULTIPLE selection using the following table: https://github.com/wmo-im/wmds/blob/master/tables_en/2-02.csv
fabiosato commented 2 years ago

General instructions:

For each of these fields use the following steps: 1 - Create a corresponding model for the new table. Example: for "WMO Region" create WMORegion model and add a new ForeignKey field to the Station model linking these two objects. For "WMO Program" search for the correct type. 2 - Generate migrations and apply it 3 - Load the CSV file into the new model table. Example for "WMORegion" model, load into wx_wmoregion table 4 - Generate the fixture for this model using the django unload command: https://docs.djangoproject.com/en/4.0/howto/initial-data/#:~:text=You%20can%20load%20data%20by,re%2Dloaded%20into%20the%20database. 5 - Update the frontend code to replace the input text by a dropdown component pointing to the new field

Remark: We will create an update script to move the data stored in the old text fields in Belize to the new field before removing the old fields.

fabiosato commented 2 years ago

@Midms27 plz check if we can rename the existing "country" CharField to "remarks" and then add a new ForeignKey field for country.