mapaction / mapaction-toolbox

A collection of tools to help streamline the process of producing maps including data renaming and map exports.
GNU General Public License v3.0
3 stars 1 forks source link

Wrong value for "cmf_descriptor_path" generated by Event Config tool #195

Open andrewphilipsmith opened 4 years ago

andrewphilipsmith commented 4 years ago

Expected Behavior

The outputed json file should contain a key, value pair, where the key is ""cmf_descriptor_path" and the value is the relavite path to the cmf description file. These are examples of valid values:

# the default value
  "cmf_descriptor_path": "cmf_description.json",

# any arbitary name
  "cmf_descriptor_path": "my_crash_move_folder.json",

# a relitive path
  "cmf_descriptor_path": "../a_different_location/cmf_description.json",

As a minimum the Config tool should check that the specified cmf description file exists. Ideally the Config tool should also check that the cmf description file is itself valid - the reference inplenmenation for this is https://github.com/mapaction/mapactionpy_controller/blob/master/mapactionpy_controller/event.py

For a complete check the event description file should verify against the relevant schema file, currently in this dir https://github.com/mapaction/mapactionpy_controller/tree/master/mapactionpy_controller/schemas It should be documented which version of the schema is used.

The most comprehensive description of how this file should be updated is currently here https://wiki.mapaction.org/x/xoKPDQ

Actual Behavior

The outputed json contains the key, value pair like this example:

  "cmf_descriptor_path": "D:/MapAction/metis/test-data/2019lka01",

1) It should be the relitive path, not the absolute path. 2) It should be the name of the file which describes the cmf, not the root of the cmf itself. 3) The config tools does not check whether the description file exists. 4) It proscribes the names of the files event_description.json and cmf_descrition.json, rather then merely treating those names as conventions.

Steps to Reproduce the Problem

  1. Open ArcMap and open the Event Config Tool
  2. Create a new event config file.

Specifications

andrewphilipsmith commented 4 years ago

Just edited the description to include a comment about the schema of the event description.

andrewphilipsmith commented 4 years ago

I've added this line into the the description above; "The most comprehensive description of how this file should be updated is currently here https://wiki.mapaction.org/x/xoKPDQ"