Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sweep GHA Fix] The GitHub Actions run failed with... #8

Open
wants to merge 6 commits into
base: betterapi
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions openoligo/api/models.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
"""
Tortoise ORM Models for the OpenOligo API
"""
import json

import re
from dataclasses import dataclass
from enum import Enum
from typing import Optional

from pydantic import BaseModel
from pydantic import BaseModel
# Existing import
from tortoise import fields
from tortoise.contrib.pydantic import pydantic_model_creator
from tortoise.exceptions import ValidationError
Expand All @@ -21,6 +23,7 @@
)

from openoligo.seq import Seq
import json


class TaskStatus(str, Enum):
Expand All @@ -47,6 +50,7 @@ class ReactantType(str, Enum):

class InstrumentHealth(str, Enum):
"""Instrument health status"""
"""Instrument health status"""

OPERATIONAL = "Operational"
DEGRADED = "Degraded"
Expand Down Expand Up @@ -168,7 +172,7 @@ class Config:
}


def json_to_seq(raw_json: str | bytes) -> NucleotidesModel:
def json_to_seq(raw_json: 'Union[str, bytes]') -> NucleotidesModel:
"""Convert json to a Nucleotide[]"""
seq: NucleotidesModel = NucleotidesModel.parse_raw(raw_json)
return seq
Expand Down Expand Up @@ -197,6 +201,12 @@ class SynthesisTask(Model):
)
created_at = fields.DatetimeField(auto_now_add=True)
started_at = fields.DatetimeField(null=True)
def public_method_one(self):
pass

def public_method_two(self):
pass

completed_at = fields.DatetimeField(null=True)

log_file = fields.TextField(
Expand Down
2 changes: 1 addition & 1 deletion openoligo/scripts/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ async def update_a_synthesis_task(

if sequence is not None:
try:
seq_validator = ValidSeq()

# seq_validator(sequence)
task.sequence = sequence # type: ignore
except ValidationError as exc:
Expand Down