Emily Soth
b1d0043eb4
fix hra test; move function from datastack to utils to avoid circular import
2025-02-06 17:44:35 -08:00
Emily Soth
ad59b739d2
enable gdal.UseExceptions in entrypoints and tests
...
Enable gdal exceptions in the CLI and server. Update all models to
expect and handle gdal exceptions where they are now raised.
2024-11-19 13:32:47 -08:00
Emily Soth
a5cd7186bf
update tests
2024-01-22 10:44:09 -08:00
Emily Soth
66fb9b80dc
update hra tests to work with nested path validation
2024-01-19 10:48:56 -08:00
Doug
4a9758764e
I. #1467 Update test to test criteria and info table stressor and habitat case sensitivity.
2023-12-14 10:24:18 -05:00
James Douglass
0bc66becde
Doing the test by opening the file in binary mode. RE:#1460
2023-12-07 20:39:21 -08:00
James Douglass
4dbe7f5fc6
Making sure the new file is closed after we're done with it. RE:#1460
2023-12-06 19:43:51 -08:00
James Douglass
b19b946bbd
Using utf-8-sig encoding directly.
...
RE:#1460
2023-12-06 18:27:22 -08:00
James Douglass
753bcb31da
Fixing and testing UTF-8-SIG for the criteria table.
...
RE:#1460
2023-12-05 15:28:54 -08:00
Emily Soth
0eb35a1926
remove support for excel files #1391
2023-08-29 15:05:05 -07:00
davemfish
e20ddd44a9
remove test for the removed function. #1312
2023-08-24 16:53:22 -04:00
Emily Soth
e05ca5c0b3
remove na_allowed option from draft read_csv_to_dataframe
2023-07-12 12:18:07 -07:00
Emily Soth
73fbcadf43
update all models and tests to use new version of read_csv_to_dataframe
2023-07-06 12:44:15 -07:00
Emily Soth
33850d1ff1
remove XLS format from HRA to update to pandas 2.0 #1271
2023-04-04 14:06:18 -07:00
James Douglass
cc91a81ac7
Adding a test to skip all the criteria.
...
RE:1250
2023-03-16 12:25:21 -07:00
James Douglass
bdb96f868d
Improving the usability of the criteria table parsing function.
...
Now, the criteria table parsing will trim leading/trailing whitespace
from string table cells and will also raise an exception if one or more
of the required table sections is missing.
RE:#1191
2023-02-18 20:24:20 -08:00
Dave Fisher
99dc889edb
Merge pull request #1083 from phargogh/bugfix/1080-hra-summary-statistcs-table-incorrect
...
Correct HRA summary statistics table
2022-12-15 11:06:08 -08:00
James Douglass
43a37ec52e
Renaming variables, adding a comment for clarity.
...
RE:#1080
2022-12-14 15:07:03 -08:00
James Douglass
edaa069f7d
Reworking summary table test to clarify intent.
...
I wasn't being clear about which classification arrays were affecting
which records in the tests. This commit changes that by renaming a few
array variables, clarifying which values are derived from which arrays,
and adding a helper function to clearly derive values from arrays.
RE:#1080
2022-12-14 14:58:45 -08:00
Emily Soth
07557841db
make expected paths absolute in hra test
2022-12-09 17:00:56 -08:00
Emily Soth
41924bac88
fix hra test
2022-12-06 14:14:57 -08:00
Emily Soth
e0e9205405
clean up and fix last hra test
2022-12-06 13:42:41 -08:00
Emily Soth
c94fd806f5
remove hra handling of cross platform paths natcap/invest#1025
2022-12-06 11:31:19 -08:00
Emily Soth
7a07bea1f6
handle relative path parsing in utils
2022-12-02 15:35:12 -08:00
James Douglass
1003937557
Merge branch 'main' into bugfix/1080-hra-summary-statistcs-table-incorrect
2022-11-28 10:47:45 -08:00
James Douglass
7981e9dbdf
Updating tests to reflect new functionality.
...
RE:#1120
2022-11-21 14:30:29 -08:00
James Douglass
6c68518919
Adding a test for the summary statistics table.
...
RE:#1080
2022-09-15 16:01:43 -07:00
James Douglass
bd91d261d4
Removing a test that's no longer needed. RE:#1080
2022-09-14 16:33:14 -07:00
James Douglass
19bf7fe892
Updating AOIs in test data to cover the ZeroDivisionError.
...
The ZeroDivisionError only occurred when we had a subregion that
intersected some but not all of the habitats and stressors.
RE:#819
2022-08-26 11:59:16 -07:00
James Douglass
6f7ec767a7
At least covering the lines resolving the ZeroDivisionError.
...
RE:#819
2022-08-26 10:52:25 -07:00
James Douglass
ed494493cb
Moving a few unit tests out of the model tests fixture.
2022-08-02 15:42:18 -07:00
James Douglass
f5824d022b
Adding target GDT_* datatype to _sum_rasters function signature.
...
RE:#819
2022-07-26 11:22:29 -05:00
James Douglass
c138180bb7
Adding validation for criteria files during criteria table parsing.
...
RE:#819
2022-07-26 11:05:15 -05:00
James Douglass
e50e25cfce
Tweaking another test for coverage. RE:#819
2022-07-12 16:00:06 -07:00
James Douglass
55e08c04f0
Minor tweaks for coverage. RE:#819
2022-07-12 15:53:52 -07:00
James Douglass
3daddc63cd
Testing and failing faster when invalid decay type provided. RE#819
2022-07-12 15:44:57 -07:00
James Douglass
d579e019df
Adding a test for 0 decay distance. RE:#819
2022-07-12 15:36:23 -07:00
James Douglass
1971ec1764
Minor tweaks to a test for coverage. RE:#819
2022-07-12 15:24:21 -07:00
James Douglass
89c822706f
Improving coverage. RE:#819
2022-07-12 15:03:29 -07:00
James Douglass
75e3d8a281
Fixing missing keys in a test and making visualize_outputs optional. RE:#819
2022-07-12 14:52:16 -07:00
James Douglass
ab1a400d18
Correcting the available options for decay. RE:#819
2022-06-15 08:13:52 -05:00
James Douglass
e9d103bc45
Ensuring forward slashes used. RE:#819
2022-06-08 14:32:13 -07:00
James Douglass
947920034f
Fixing one test on Windows and I think fixing another test, but setting maxDiff=None just in case.
2022-06-08 12:14:29 -07:00
James Douglass
0e5c02fbfd
Adding docstrings to tests. RE:#819
2022-06-07 17:38:11 -07:00
James Douglass
4c400cc395
Asserting that habitat and stressor names are nonoverlapping sets. RE:#819
2022-06-07 17:15:02 -07:00
James Douglass
6c53ef27da
Adding a few assertions to the model test. RE:#819
2022-06-07 16:47:58 -07:00
James Douglass
e0f6006f1c
Adding datastack archiving/unarchiving before running HRA model test.
...
RE:#819
RE:#751
2022-06-07 16:38:33 -07:00
James Douglass
4a2fd156fe
Finishing reworking of datastack override.
...
RE:#819
RE:#751
2022-06-07 11:38:43 -07:00
James Douglass
c7781addd9
Reworking the override system for datastack archives.
...
After some reflection (and when starting to prototype this), I realized
that it makes more sense to allow specific overrides of specific inputs.
In HRA, for example, only the criteria table needs to be overridden ...
all the other inputs are already described by ARGS_SPEC. Why not just
provide the one special case that needs it? So that's what I'm trying
to do now. RE:#819
2022-06-06 17:35:39 -07:00
James Douglass
041515e8aa
Calculating precise intersection of bounding boxes in alignment. RE:#819
2022-06-06 15:30:50 -07:00