-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tables - Simplify inheritance structure
Moving all common declaration into the `Base` class, which removes the `SnowData` class.
- Loading branch information
Showing
7 changed files
with
18 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
from .base import Base, Measurement, SingleLocationData, SnowData | ||
from .image_data import ImageData | ||
from .layer_data import LayerData | ||
from .point_data import PointData | ||
from .site_data import SiteData | ||
|
||
__all__ = [ | ||
'Base', | ||
'ImageData', | ||
'LayerData', | ||
'Measurement', | ||
'PointData', | ||
'SingleLocationData', | ||
'SiteData' | ||
'SnowData', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
from geoalchemy2 import Raster | ||
from sqlalchemy import Column, String | ||
|
||
from .base import Base, Measurement, SnowData | ||
from .base import Base, Measurement | ||
|
||
|
||
class ImageData(SnowData, Measurement, Base): | ||
class ImageData(Base, Measurement): | ||
""" | ||
Class representing the images table. This table holds all images/rasters | ||
""" | ||
__tablename__ = 'images' | ||
__table_args__ = {"schema": "public"} | ||
raster = Column(Raster) | ||
description = Column(String(1000)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters