NAVADMC / ADSM

A simulation of disease spread in livestock populations. Includes detection and containment simulation.
Other
10 stars 5 forks source link

Import error wording improvement #899

Closed missyschoenbaum closed 4 years ago

missyschoenbaum commented 5 years ago

We have an inconsistency in how we describe the starting disease state of a unit. In the database (ScenarioCreator_unit) we call it initial_state. In the import error message that fails that field, we call it initial_state (image included).

In documentation, we tell users that the population file requires a field called 'status' to describe the initial state. I assume from this that the import is looking for a field called status. wiki Population File requirements

Status and initial_state are the same thing.

It is easy for me to fixed the documentation, but I want to make it consistent throughout the process. What's the least work fix we can do to make this field flow through with one name?

initialstate

ConradSelig commented 5 years ago

We already accept a wide range of import formats for both CSV and XML. We can just layer another format on top of existing ones that substitutes "initial_state" for "status". Then I'll also start exporting with initial_state instead of status so new files have correct wording.

I don't expect this to take more than 3 hours at absolute most, so I'll just go ahead and make the needed changes.

ConradSelig commented 5 years ago

Old formats for both CSV and XML should still work, and newly exported populations will use "initial_state" instead of "status".

ConradSelig commented 5 years ago

Commit cc74e89 is not for this ticket. Disregard record of the commit in this thread.

missyschoenbaum commented 5 years ago

@ConradSelig I tried this with both Initial_state, Initial_State and initial_state and none worked. I think we have initial caps on all the other fields, so if we are fixing, make Initial_state

missyschoenbaum commented 5 years ago

This is attempt with lower case initial_state and on replace (as compared to make new) LoadPop_lc_replace

Note I have to change .csv to xls to get it to load here. SampleScenarioADSMTestlcinitialstate.xlsx

missyschoenbaum commented 5 years ago

Also, I loaded a pop file with status to make sure it was still working.

I get the same error when I attempt Initial_State LoadPop_uc_replace

SampleScenarioADSMTestInitialState.xlsx

ConradSelig commented 5 years ago

@missyschoenbaum What are you asking here? Ticket title indicates to me that you want the error message fixed, not that imports are not acting as expected. Your posts in this thread indicate the opposite however - so just to clear things up, here are all of the accepted population CSV formats:

Columns can be in any order, but must fit the formatting for one of the options in this list EXACTLY. Your population files have the following headers:

'UnitID', 'ProductionType', 'UnitSize', 'Lat', 'Lon', 'Initial_State'

Which don't match any of the above options.

Where did you get these column titles? Should be we including a new CSV format?

missyschoenbaum commented 4 years ago

@ConradSelig Thanks for posting all the options. That is good to have. I will try again and make sure I have things correct or open another ticket if needed. This also points out that my training materials need to make it very clear that there are no caps.

missyschoenbaum commented 4 years ago

Having a correct format fixed this. Thanks for pointing out where I was off. I think I need to improve my documentation.