Skip to content

Commit

Permalink
ensure formula_pretty in projected doc
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Jun 24, 2021
1 parent 37793b3 commit ccfe9f7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions emmet-builders/emmet/builders/vasp/materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ def prechunk(self, number_splits: int) -> Iterable[Dict]:
temp_query["tags"] = {"$in": self.settings.BUILD_TAGS}

self.logger.info("Finding tasks to process")
all_tasks = list(self.tasks.query(temp_query, [self.tasks.key]))
all_tasks = list(
self.tasks.query(temp_query, [self.tasks.key, "formula_pretty"])
)

processed_tasks = set(self.materials.distinct("task_ids"))
to_process_tasks = {d[self.tasks.key] for d in all_tasks} - processed_tasks
Expand Down Expand Up @@ -140,7 +142,9 @@ def get_items(self) -> Iterator[List[Dict]]:
temp_query["tags"] = {"$in": self.settings.BUILD_TAGS}

self.logger.info("Finding tasks to process")
all_tasks = list(self.tasks.query(temp_query, [self.tasks.key]))
all_tasks = list(
self.tasks.query(temp_query, [self.tasks.key, "formula_pretty"])
)

processed_tasks = set(self.materials.distinct("task_ids"))
to_process_tasks = {d[self.tasks.key] for d in all_tasks} - processed_tasks
Expand Down

0 comments on commit ccfe9f7

Please sign in to comment.