Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
riga committed Sep 30, 2023
1 parent 4c327c4 commit be1b5fb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 27 deletions.
10 changes: 0 additions & 10 deletions modeltest.py

This file was deleted.

6 changes: 4 additions & 2 deletions order/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"AdapterModel", "Adapter", "Materialized", "DataProvider",
"UniqueObject", "LazyUniqueObject", "UniqueObjectIndex",
"DuplicateObjectException", "DuplicateNameException", "DuplicateIdException",
"GenOrder", "DatasetInfo", "Dataset", "LazyDataset", "DatasetIndex",
"Campaign",
]


Expand All @@ -24,14 +26,14 @@
# provisioning imports
from order.settings import Settings
from order.types import Lazy
from order.adapters.base import AdapterModel, Adapter, Materialized, DataProvider
from order.models.base import Model
from order.models.unique import (
UniqueObject, LazyUniqueObject, UniqueObjectIndex, DuplicateObjectException,
DuplicateNameException, DuplicateIdException,
)
from order.models.dataset import GenOrder, DatasetInfo, Dataset, LazyDataset, DatasetIndex
from order.models.campaign import Campaign
from order.models.dataset import Dataset
from order.adapters.base import AdapterModel, Adapter, Materialized, DataProvider

# import adapters to trigger their registration
import order.adapters.order
Expand Down
21 changes: 7 additions & 14 deletions order/models/campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,17 @@
from __future__ import annotations


__all__ = ["GT", "Campaign"]
__all__ = ["Campaign"]


from order.types import Lazy, Field
from order.models.base import Model
from order.types import Lazy, NonEmptyStrictStr, StrictFloat, Field
from order.models.unique import UniqueObject
from order.models.dataset import DatasetIndex


class GT(Model):
class Campaign(UniqueObject):

gt: str


class Campaign(Model):

id: int
name: str
tier: Lazy[str]
ecm: Lazy[float]
recommended_gt: GT
tier: Lazy[NonEmptyStrictStr]
ecm: Lazy[StrictFloat]
recommended_global_tag: NonEmptyStrictStr
datasets: DatasetIndex = Field(default_factory=DatasetIndex)
2 changes: 1 addition & 1 deletion order/models/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations


__all__ = ["Dataset"]
__all__ = ["GenOrder", "DatasetInfo", "Dataset", "LazyDataset", "DatasetIndex"]


import enum
Expand Down

0 comments on commit be1b5fb

Please sign in to comment.