traitecoevo/traits.build

Rename `plot_id`, `temporal_id` and (maybe) `treatment_id`

Closed this issue · 1 comments

ehwenk commented

There are 5 identifiers that are created for context categories, entity_context_id, method_context_id (previously method_id), plot_id, temporal_id and treatment_id.

These are all actually types of context_ids. The first two were renamed to avoid confusion with entity_type and a newly introduced method_id, that actually identifies methods.

On reflection, it would be much clearer for plot_id to become plot_context_id and temporal_id to become temporal_context_id, since these are context properties, not an identifier of a plot or time.

treatment_id could stay the same or be changed to treatment_context_id, since treatment is very explicitly a type of context.

In each case there needs to be a mass renaming in all metadata files from:

category: plot to category: plot_context and in process from plot_id to plot_context_id; same for temporal terms

ehwenk commented

Let's change all context ids to ending with context_id. Within all austraits metadata files, this means:
category: temporal -> category: temporal_context
category: treatment -> category: treatment_context
category: plot -> category: plot_context

(and also in traits.build, in all tests)

In traits.build, all schema mentions of temporal_id; treatment_id; plot_id become temporal_context_id; treatment_context_id; plot_context_id

In traits.build process.R , lines 1088 v <- setNames(nm = c("entity_context_id", "plot_id", "treatment_id", "temporal_id", "method_context_id")) and lines 631 categories <- c("plot", "treatment", "entity_context", "temporal", "method_context") %>% subset(., . %in% tmp$category) need to change. I think that is it.

AusInvertTraits also needs to make the metadata file changes