Skip to content

Commit

Permalink
WIP #25 (probably not working)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adafede committed Mar 13, 2024
1 parent 8f33fb5 commit 1596fd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion storage/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ def upsert_structures(self, structures: list[dict[str, object]]) -> None:
session.commit()

# TODO this has not been tested, probably not working
def upsert_structures_descriptors(self, descriptors: list[dict[str, object]]) -> None:
def upsert_structures_descriptors(
self, descriptors: list[dict[str, object]]
) -> None:
with self.session(autoflush=False) as session:
for i in range(0, len(descriptors), self.list_limit // 2):
session.execute(
Expand Down
2 changes: 1 addition & 1 deletion update/generate_database_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def run(path: Path) -> None:
for rank in ranks:
taxo_ranks.append({"id": taxon, "rank_id": rank})
logging.info(" Processed taxa ranks")

storage.upsert_taxo_parenting(generate_taxon_parents_with_distance(path))
logging.info(" Taxo parenting inserted")
storage.upsert_triplets(triplets)
Expand Down

0 comments on commit 1596fd7

Please sign in to comment.