Skip to content

Commit

Permalink
add scheduling to alliance disease ingest
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinschaper committed Sep 17, 2024
1 parent 7046b02 commit b29bf82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ name: Create Release

on:
workflow_dispatch:
# schedule:
# - cron: '0 0 * * 0'
schedule:
- cron: '0 0 3 * *' # Monthly on the 3rd day of the month

jobs:
create-release:
Expand Down Expand Up @@ -50,4 +50,3 @@ jobs:
files: |
output/*
generate_release_notes: true
draft: true
7 changes: 6 additions & 1 deletion src/alliance_disease_association_ingest/transform.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import uuid

from biolink_model.datamodel.pydanticmodel_v2 import (
Association,
GeneToDiseaseAssociation,
GenotypeToDiseaseAssociation,
VariantToDiseaseAssociation, KnowledgeLevelEnum, AgentTypeEnum,
)
from typing import Dict
from koza.cli_utils import get_koza_app

# TODO: look at row["source"] to update this map
Expand All @@ -23,6 +25,7 @@

koza_app = get_koza_app("alliance_disease")

entities = [] # : Dict[str, Association] = {}
while (row := koza_app.get_row()) is not None:
subject_category = row["DBobjectType"]
if subject_category == 'gene':
Expand Down Expand Up @@ -79,4 +82,6 @@
agent_type=AgentTypeEnum.manual_agent
)

koza_app.write(association)
entities.append(association)

koza_app.write(*entities)

0 comments on commit b29bf82

Please sign in to comment.