Skip to content

Commit

Permalink
R.C. 0.6.0 (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
toddroper authored Aug 7, 2023
1 parent ed5cc68 commit 398f911
Show file tree
Hide file tree
Showing 57 changed files with 2,107 additions and 1,297 deletions.
15 changes: 9 additions & 6 deletions migrate/scripts/seed_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm import Session

from tds.autogen import orm
from tds.modules.external.model import Publication
from tds.modules.model.model import ModelFramework
from tds.modules.person.model import Person
from tds.modules.project.model import Project, ProjectAsset
from tds.modules.provenance.model import Provenance

migrate_dir = Path(os.path.dirname(__file__))
Expand All @@ -24,12 +27,12 @@
SQL_DB = os.getenv("SQL_DB")

pg_data_load = {
"model_framework": orm.ModelFramework,
"persons": orm.Person,
"projects": orm.Project,
"project_assets": orm.ProjectAsset,
"model_framework": ModelFramework,
"persons": Person,
"projects": Project,
"project_assets": ProjectAsset,
"provenance": Provenance,
"publications": orm.Publication,
"publications": Publication,
}


Expand Down
4 changes: 0 additions & 4 deletions tds/autogen/README.md

This file was deleted.

Empty file removed tds/autogen/__init__.py
Empty file.
137 changes: 0 additions & 137 deletions tds/autogen/orm.py

This file was deleted.

140 changes: 0 additions & 140 deletions tds/autogen/schema.py

This file was deleted.

2 changes: 2 additions & 0 deletions tds/db/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@

from elasticsearch import ConflictError
from pydantic import BaseModel, Field
from sqlalchemy.ext.declarative import declarative_base

from tds.db import es_client
from tds.settings import settings

es = es_client()
Base = declarative_base()


def new_uuid() -> str:
Expand Down
15 changes: 15 additions & 0 deletions tds/autogen/enums.py → tds/db/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,18 @@ class SimulationStatus(str, Enum):
queued = "queued"
running = "running"
failed = "failed"


class ColumnTypes(str, Enum):
UNKNOWN = "unknown"
BOOLEAN = "boolean"
STRING = "string"
CHAR = "string"
INTEGER = "integer"
INT = "integer"
FLOAT = "float"
DOUBLE = "double"
TIMESTAMP = "timestamp"
DATETIME = "datetime"
DATE = "date"
TIME = "time"
Loading

0 comments on commit 398f911

Please sign in to comment.