From 3d07c4f92dbb65bfdfeaa0e62a091de80d3b9a4d Mon Sep 17 00:00:00 2001 From: Matthew Gidden Date: Fri, 1 Mar 2024 11:21:23 +0100 Subject: [PATCH] update CI to latest packages (#11) * dummy commit to test ci * update tests with latest environment and add checking notebook * try removing the rtd arg --- .readthedocs.yml | 1 - tests/check_rasterize_tests.ipynb | 18 ++++++++++++++++++ tests/test_data/weighted.nc | Bin 968734 -> 968734 bytes tests/test_raster.py | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 tests/check_rasterize_tests.ipynb diff --git a/.readthedocs.yml b/.readthedocs.yml index f34bf3c..3a91e0d 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -25,4 +25,3 @@ python: path: . extra_requirements: - docs - system_packages: true diff --git a/tests/check_rasterize_tests.ipynb b/tests/check_rasterize_tests.ipynb new file mode 100644 index 0000000..709d82c --- /dev/null +++ b/tests/check_rasterize_tests.ipynb @@ -0,0 +1,18 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/tests/test_data/weighted.nc b/tests/test_data/weighted.nc index e3c4000c6fd10c878d8b6df9d848bc46da506b0f..a17c158ba1531168e42a311e23c416d0db0c621a 100644 GIT binary patch delta 271 zcmbO?!Ft{V>kUHOyhb`1DQTv*hI)o3dIpo_xn)?qp0QeQw&&I`n7rOPfawPFcEe=G z{Y;xDF!D1tx7)Y3+cN?&6A&{4F$)m0Zg00|kUHOyoNd%DQTv*hI)oZdPbAwxn)@1i%PO=w&&I`Fsx^Q01hbq9!fVr zX>{?%$qm-xlhdsOm?ki9H%w;S&op@g zDQ>N0^8q+qdPh0Wmuea{w_X5OV=BHxTmxG4J+md3+g> E0MwC1ssI20 diff --git a/tests/test_raster.py b/tests/test_raster.py index 825021c..5e6dec2 100644 --- a/tests/test_raster.py +++ b/tests/test_raster.py @@ -89,7 +89,7 @@ def test_df_to_weighted_raster_roundtrip(): } ) ds = pt.df_to_weighted_raster(df, idxr, extra_coords=["year"]) - assert np.isclose(ds.data.sel(year=2015).sum(), 3348.12920833) + assert np.isclose(ds.data.sel(year=2015).sum(), 3349.6, rtol=1e-5) obs_df = pt.raster_to_df(ds, idxr, func="max") pdt.assert_frame_equal(