From 35466a6fd5d2e0283df70a738a4208e1ad643667 Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:59:28 -0500 Subject: [PATCH 1/3] Cast to UTC epoch seconds explicitly --- pharus/interface.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pharus/interface.py b/pharus/interface.py index 74d402c..ec32b36 100644 --- a/pharus/interface.py +++ b/pharus/interface.py @@ -201,7 +201,9 @@ def _fetch_records( r"timestamp", attribute_info.type ): # Datetime or timestamp, use timestamp to covert to epoch time - row.append(non_blobs_row[attribute_name].timestamp()) + row.append(non_blobs_row[attribute_name].replace( + tzinfo=datetime.timezone.utc + ).timestamp()) elif attribute_info.type[0:7] == "decimal": # Covert decimal to string row.append(str(non_blobs_row[attribute_name])) From a0bfc79756d8a5bf9d691d2d7181e89374801520 Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Thu, 3 Oct 2024 15:02:21 -0500 Subject: [PATCH 2/3] Format with black==23.12.1 --- pharus/interface.py | 8 +++++--- tests/test_interface.py | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pharus/interface.py b/pharus/interface.py index ec32b36..b291859 100644 --- a/pharus/interface.py +++ b/pharus/interface.py @@ -201,9 +201,11 @@ def _fetch_records( r"timestamp", attribute_info.type ): # Datetime or timestamp, use timestamp to covert to epoch time - row.append(non_blobs_row[attribute_name].replace( - tzinfo=datetime.timezone.utc - ).timestamp()) + row.append( + non_blobs_row[attribute_name] + .replace(tzinfo=datetime.timezone.utc) + .timestamp() + ) elif attribute_info.type[0:7] == "decimal": # Covert decimal to string row.append(str(non_blobs_row[attribute_name])) diff --git a/tests/test_interface.py b/tests/test_interface.py index df27ae6..b973d29 100644 --- a/tests/test_interface.py +++ b/tests/test_interface.py @@ -17,7 +17,6 @@ def nei_nienborg_model_labeledvideo_file( class TestDJConnector: - def test_can_init(self): djc = DJC() assert djc is not None From e4bf355b35d45793b9cef57725d1c1289753cbe9 Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Thu, 3 Oct 2024 15:05:39 -0500 Subject: [PATCH 3/3] Version tick to 0.8.12 --- CHANGELOG.md | 10 ++++++++-- docker-compose-deploy.yaml | 4 ++-- pharus/server.py | 2 +- pharus/version.py | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2bde88..18b1a29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,17 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention. -## [0.8.11] - TBD +## [0.8.12] - 2024-10-03 ### Fixed -- bug with forms that was preventing nullable foreign keys from being null in sci-viz[#172](https://github.com/datajoint/pharus/pull/172) +- Ensure that timestamps are in UTC format for the Works frontend [#179](https://github.com/datajoint/pharus/pull/179) + +## [0.8.11] - 2024-09-17 + +### Fixed + +- Bug with forms that was preventing nullable foreign keys from being null in sci-viz[#172](https://github.com/datajoint/pharus/pull/172) - Bug in Works where NaN values were breaking the Works frontend [#174](https://github.com/datajoint/pharus/pull/174) ## [0.8.10] - 2023-11-16 diff --git a/docker-compose-deploy.yaml b/docker-compose-deploy.yaml index f27be25..03b9f88 100644 --- a/docker-compose-deploy.yaml +++ b/docker-compose-deploy.yaml @@ -1,5 +1,5 @@ -# PHARUS_VERSION=0.8.0 docker-compose -f docker-compose-deploy.yaml pull -# PHARUS_VERSION=0.8.0 docker-compose -f docker-compose-deploy.yaml up -d +# PHARUS_VERSION=0.8.12 docker-compose -f docker-compose-deploy.yaml pull +# PHARUS_VERSION=0.8.12 docker-compose -f docker-compose-deploy.yaml up -d # # Intended for production deployment. # Note: You must run both commands above for minimal outage diff --git a/pharus/server.py b/pharus/server.py index 9b9f37d..5fe9c85 100644 --- a/pharus/server.py +++ b/pharus/server.py @@ -164,7 +164,7 @@ def api_version() -> str: Content-Type: application/json { - "version": "0.8.11" + "version": "0.8.12" } ``` diff --git a/pharus/version.py b/pharus/version.py index e05d363..ed981cb 100644 --- a/pharus/version.py +++ b/pharus/version.py @@ -1,3 +1,3 @@ """Package metadata.""" -__version__ = "0.8.11" +__version__ = "0.8.12"