From 04d6006e513393cd2ddd78e7653a5cc8428756b9 Mon Sep 17 00:00:00 2001 From: pciturri Date: Wed, 15 Nov 2023 17:17:26 +0100 Subject: [PATCH] ga: added only windows 3.10 ga: updated github actions to test windows. fix jma tests ga: reverted to run GA on maaster(main) branch & fork --- .github/workflows/build-test.yml | 3 +++ tests/test_JmaCsvCatalog.py | 9 ++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 289f6a14..ab681372 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -15,6 +15,9 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] python-version: ['3.7', '3.8', '3.9', '3.10'] + include: + - os: windows-latest + python-version: '3.10' defaults: run: shell: bash -l {0} diff --git a/tests/test_JmaCsvCatalog.py b/tests/test_JmaCsvCatalog.py index a971c454..ab748f1c 100644 --- a/tests/test_JmaCsvCatalog.py +++ b/tests/test_JmaCsvCatalog.py @@ -1,9 +1,7 @@ import unittest import csep - - +from csep.utils.time_utils import datetime_to_utc_epoch import os.path - import numpy def get_datadir(): @@ -43,8 +41,9 @@ def test_JmaCsvCatalog_loading(): # _datetimes.fill(numpy.nan) for _idx, _val in enumerate(_dummy): - _datetimes[_idx] = round(1000. * _val.timestamp()) + _datetimes[_idx] = datetime_to_utc_epoch(_val) numpy.testing.assert_allclose(_datetimes, test_catalog.catalog['origin_time'], err_msg='timestamp mismatch', - verbose=True, rtol=0, atol=0) + verbose=True, + rtol=1e-3, atol=0)