cal-adapt / climakitae

A Python toolkit for retrieving, visualizing, and performing scientific analyses with data from the Cal-Adapt Analytics Engine.
https://climakitae.readthedocs.io
BSD 3-Clause "New" or "Revised" License
21 stars 2 forks source link

SCE Pilot- Tech Debt Initial Tests Pt. 1 #413

Closed claalmve closed 4 weeks ago

claalmve commented 3 months ago

Description of PR

Summary of changes and related issue We want to have test coverage for cava_data and its respective helper functions. This PR creates tests for the helper functions of cava_data. A future PR will provide full test coverage over cava_data as well.

Relevant motivation and context We want full test coverage so that when something breaks, we know about it.

Type of change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Checklist:

vicford commented 3 months ago

Instructions for testing unit tests, because it's not listed (if this is wrong @claalmve please correct me):

vicford commented 3 months ago

I had to install the following packages for this test: boto3, IPython, timezonefinder

Upon running:

claalmve commented 3 months ago

Also need to install h5netcdf

elehmer commented 3 months ago

Also need to install h5netcdf

The testing environment uses the conda-lock file, not the env.yml. h5netcdf is installed in that environment (hopefully).

elehmer commented 3 months ago

The tests might be failing because of a version issue. Not all packages are exactly the same as on the HUB and we might be running into an incompatibility.

vicford commented 1 month ago

This is still failing for me @claalmve. On test_metric_agg it looks like

1 failed, 3 passed, 10 warnings

vicford commented 1 month ago

Alright, all 4 tests are passing on the hub! Failing locally (but I am also on a Mac OS)