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

Use datetime instead of start time #168

Merged
merged 1 commit into from
Oct 23, 2024
Merged
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
1 change: 0 additions & 1 deletion snowexsql/tables/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class Site(SingleLocationData, Base, InCampaign, HasDOI):
vegetation_height = Column(String())
tree_canopy = Column(String())
site_notes = Column(String())
start_time = Column(Time(timezone=True))
end_time = Column(Time(timezone=True))

@hybrid_property
Expand Down
2 changes: 0 additions & 2 deletions tests/db_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def _add_entry(
geom=kwargs.pop("geom"),
elevation=kwargs.pop("elevation"),
observers=observer_list,
start_time=kwargs.pop("start_time"),
end_time=kwargs.pop("end_time"),
)
)
Expand Down Expand Up @@ -127,7 +126,6 @@ def populated_layer(self, db):
),
'depth': 100,
'value': '42.5',
"start_time": "10:32:00",
"end_time": "10:39:00"
}
self._add_entry(
Expand Down
1 change: 0 additions & 1 deletion tests/factories/layer_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ class Meta:
doi = factory.SubFactory(DOIFactory)
site = factory.SubFactory(
SiteFactory,
start_time=datetime.time(10, 32, tzinfo=datetime.timezone.utc),
end_time=datetime.time(10, 39, tzinfo=datetime.timezone.utc)
)
1 change: 0 additions & 1 deletion tests/factories/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class Meta:
vegetation_height = "None"
tree_canopy = "Open"
site_notes = "Site Notes"
start_time = time(10, 32, tzinfo=timezone.utc)
end_time = time(10, 39, tzinfo=timezone.utc)

# Single Location data
Expand Down
5 changes: 0 additions & 5 deletions tests/tables/test_layer_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ def test_has_doi(self):
assert isinstance(self.subject.doi, DOI)
assert self.subject.doi.doi == self.attributes.doi.doi

def test_start_time(self):
assert self.subject.site.start_time is not None
assert isinstance(self.subject.site.start_time, datetime.time)
assert self.subject.site.start_time == self.attributes.site.start_time

def test_end_time(self):
assert self.subject.site.end_time is not None
assert isinstance(self.subject.site.end_time, datetime.time)
Expand Down
5 changes: 0 additions & 5 deletions tests/tables/test_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,6 @@ def test_has_observers(self):
assert isinstance(self.subject.observers, list)
assert type(self.subject.observers[0]) == Observer

def test_start_time(self):
assert self.subject.start_time is not None
assert isinstance(self.subject.start_time, datetime.time)
assert self.subject.start_time == self.attributes.start_time

def test_end_time(self):
assert self.subject.end_time is not None
assert isinstance(self.subject.end_time, datetime.time)
Expand Down