diff --git a/peppy/const.py b/peppy/const.py index 0f009a52..1408cdc1 100644 --- a/peppy/const.py +++ b/peppy/const.py @@ -17,7 +17,7 @@ SAMPLE_MODS_KEY = "sample_modifiers" PROJ_MODS_KEY = "project_modifiers" NAME_TABLE_ATTR = "sample_table" -CONSTANT_KEY = "append" +APPEND_KEY = "append" REMOVE_KEY = "remove" DUPLICATED_KEY = "duplicate" DERIVED_KEY = "derive" @@ -33,11 +33,11 @@ AMENDMENTS_KEY = "amend" ACTIVE_AMENDMENTS_KEY = "_" + AMENDMENTS_KEY SAMPLE_EDIT_FLAG_KEY = "_samples_touched" -SAMPLE_MODIFIERS = [CONSTANT_KEY, IMPLIED_KEY, DERIVED_KEY, DUPLICATED_KEY, REMOVE_KEY] +SAMPLE_MODIFIERS = [APPEND_KEY, IMPLIED_KEY, DERIVED_KEY, DUPLICATED_KEY, REMOVE_KEY] PROJECT_MODIFIERS = [CFG_IMPORTS_KEY, AMENDMENTS_KEY] PROJECT_CONSTANTS = [ "REQUIRED_VERSION", - "CONSTANT_KEY", + "APPEND_KEY", "DERIVED_SOURCES_KEY", "DERIVED_KEY", "SAMPLE_MODS_KEY", diff --git a/peppy/project.py b/peppy/project.py index 48dc9e9f..d2701111 100644 --- a/peppy/project.py +++ b/peppy/project.py @@ -27,7 +27,7 @@ CONFIG_FILE_KEY, CONFIG_KEY, CONFIG_VERSION_KEY, - CONSTANT_KEY, + APPEND_KEY, DERIVED_ATTRS_KEY, DERIVED_KEY, DERIVED_SOURCES_KEY, @@ -587,8 +587,8 @@ def attr_constants(self): Update each Sample with constants declared by a Project. If Project does not declare constants, no update occurs. """ - if self._modifier_exists(CONSTANT_KEY): - to_append = self[CONFIG_KEY][SAMPLE_MODS_KEY][CONSTANT_KEY] + if self._modifier_exists(APPEND_KEY): + to_append = self[CONFIG_KEY][SAMPLE_MODS_KEY][APPEND_KEY] _LOGGER.debug("Applying constant attributes: {}".format(to_append)) for s in track(