Skip to content

Commit

Permalink
cli: remove duplicate tags during parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Mar 9, 2021
1 parent 3940d01 commit 1e46dca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions emmet-cli/emmet/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,11 @@ def parse_vasp_dirs(vaspdirs, tag, task_ids, snl_metas):

if docs:
# make sure that task gets the same tags as the previously parsed task
# (run through set to implicitly remove duplicate tags)
if docs[0]["tags"]:
task_doc["tags"] += docs[0]["tags"]
logger.info(f"Adding existing tags {docs[0]['tags']} to {tags}.")
existing_tags = list(set(docs[0]["tags"]))
task_doc["tags"] += existing_tags
logger.info(f"Adding existing tags {existing_tags} to {tags}.")

snl_dct = None
if snl_metas_avail:
Expand Down

0 comments on commit 1e46dca

Please sign in to comment.