Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,20 @@ poetry run pytest -s -v path/to/your/test.py

Reference data, crucial for validating the outcomes of our tests and detecting any deviations in `probtests` results, is maintained in the [tests/data](tests/data) directory. This approach guarantees that our tests are both comprehensive and reliable, safeguarding the integrity of our codebase.

### Update references for pytests
Some code changes might require to update the references in `tests/data`.
1. Check where new references are stored for example:
```bash
pytest -s -v tests
....
New reference data will be stored in /tmp/tmpg92cbw4z
```
2. Move new references to current reference location:
```bash
cp -v /tmp/tmpg92cbw4z/* /path/to/repo/tests/data
```
3. Commit new references.

### Formatting probtest source code

The probtest source code is formatted using multiple formatters.
Expand Down
4 changes: 2 additions & 2 deletions tests/data/cdo_table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ time,,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,
statistic,,rel_diff,1e-14,1e-12,1e-10,1e-08,1e-06,0.0001,0.01,1,rel_diff,1e-14,1e-12,1e-10,1e-08,1e-06,0.0001,0.01,1,rel_diff,1e-14,1e-12,1e-10,1e-08,1e-06,0.0001,0.01,1,rel_diff,1e-14,1e-12,1e-10,1e-08,1e-06,0.0001,0.01,1,rel_diff,1e-14,1e-12,1e-10,1e-08,1e-06,0.0001,0.01,1
file_ID,variable,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
NetCDF:*.nc,T,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
NetCDF:*.nc,V,9.921719431107e-12,0.02,0.08,0.9,0.0,0.0,0.0,0.0,0.0,9.982699111787952e-12,0.01,0.09,0.9,0.0,0.0,0.0,0.0,0.0,9.988356952773222e-12,0.0,0.08,0.92,0.0,0.0,0.0,0.0,0.0,9.802221256904886e-12,0.0,0.07,0.93,0.0,0.0,0.0,0.0,0.0,9.892477920735035e-12,0.0,0.11,0.89,0.0,0.0,0.0,0.0,0.0
NetCDF:*.nc,U,9.92169014373135e-12,0.02,0.08,0.9,0.0,0.0,0.0,0.0,0.0,9.98270930123186e-12,0.01,0.09,0.9,0.0,0.0,0.0,0.0,0.0,9.988354446153458e-12,0.0,0.08,0.92,0.0,0.0,0.0,0.0,0.0,9.802217402835667e-12,0.0,0.07,0.93,0.0,0.0,0.0,0.0,0.0,9.892582250399037e-12,0.0,0.11,0.89,0.0,0.0,0.0,0.0,0.0
NetCDF:*.nc,V,9.985114957089532e-12,0.0,0.09,0.91,0.0,0.0,0.0,0.0,0.0,9.889802981344082e-12,0.0,0.11,0.89,0.0,0.0,0.0,0.0,0.0,9.982414894693645e-12,0.0,0.09,0.91,0.0,0.0,0.0,0.0,0.0,9.785168231246644e-12,0.0,0.1,0.9,0.0,0.0,0.0,0.0,0.0,9.74188251225056e-12,0.0,0.08,0.92,0.0,0.0,0.0,0.0,0.0
NetCDF:*.nc,U,9.98504784780287e-12,0.0,0.09,0.91,0.0,0.0,0.0,0.0,0.0,9.889799666808787e-12,0.0,0.11,0.89,0.0,0.0,0.0,0.0,0.0,9.982422362748393e-12,0.0,0.09,0.91,0.0,0.0,0.0,0.0,0.0,9.78521174217307e-12,0.0,0.1,0.9,0.0,0.0,0.0,0.0,0.0,9.741891346240341e-12,0.0,0.08,0.92,0.0,0.0,0.0,0.0,0.0
40 changes: 20 additions & 20 deletions tests/data/stats_dp_1.csv
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ NetCDF:*.nc,T,60.0,20.0,25.0,15.0,20.0,25.0,15.0,20.0,25.0,15.0,20.0,25.0,15.0,2
NetCDF:*.nc,T,100.0,20.0,25.0,15.0,20.0,25.0,15.0,20.0,25.0,15.0,20.0,25.0,15.0,20.0,25.0,15.0
NetCDF:*.nc,T,140.0,20.0,25.0,15.0,20.0,25.0,15.0,20.0,25.0,15.0,20.0,25.0,15.0,20.0,25.0,15.0
NetCDF:*.nc,T,180.0,20.0,25.0,15.0,20.0,25.0,15.0,20.0,25.0,15.0,20.0,25.0,15.0,20.0,25.0,15.0
NetCDF:*.nc,V,-180.0,-99.99999999996308,-99.99999999910881,-100.0000000008203,-100.00000000040879,-99.99999999980618,-100.00000000099827,-99.99999999983825,-99.99999999925642,-100.0000000008586,-100.00000000000264,-99.9999999990357,-100.00000000068555,-100.00000000016512,-99.999999999207,-100.00000000078401
NetCDF:*.nc,V,-140.0,-76.60444431193723,-76.60444431126993,-76.60444431246565,-76.60444431172328,-76.60444431131425,-76.60444431259806,-76.6044443118737,-76.60444431134952,-76.60444431261774,-76.60444431171761,-76.60444431115592,-76.60444431235311,-76.60444431183194,-76.60444431132535,-76.60444431236856
NetCDF:*.nc,V,-100.0,-17.36481776680009,-17.364817766694415,-17.36481776686532,-17.36481776669259,-17.36481776654377,-17.3648177668322,-17.364817766740213,-17.3648177665678,-17.364817766864668,-17.3648177666648,-17.364817766525487,-17.364817766734838,-17.364817766721558,-17.36481776661726,-17.3648177668639
NetCDF:*.nc,V,-60.0,50.00000000002799,50.000000000409784,49.99999999964151,49.99999999997108,50.00000000038511,49.9999999995208,49.999999999938126,50.0000000004763,49.99999999958314,49.99999999993623,50.00000000041716,49.999999999580474,50.000000000078984,50.00000000049102,49.999999999531646
NetCDF:*.nc,V,-20.0,93.96926207853923,93.9692620790768,93.96926207794638,93.96926207879682,93.96926207947101,93.96926207778178,93.96926207875796,93.96926207952453,93.96926207765225,93.96926207857976,93.9692620794996,93.96926207773352,93.96926207865063,93.96926207951616,93.96926207767602
NetCDF:*.nc,V,20.0,93.96926207854105,93.96926207938438,93.96926207794111,93.96926207845706,93.96926207938257,93.9692620777663,93.96926207868582,93.96926207947764,93.96926207781203,93.96926207863366,93.96926207926623,93.96926207770544,93.96926207899087,93.96926207952043,93.96926207794498
NetCDF:*.nc,V,60.0,50.000000000168185,50.00000000044578,49.999999999711356,50.000000000077954,50.00000000035442,49.999999999790795,50.00000000003753,50.00000000047961,49.99999999953801,49.9999999998636,50.00000000024453,49.999999999556685,50.000000000048836,50.00000000040278,49.99999999966345
NetCDF:*.nc,V,100.0,-17.364817766735968,-17.364817766619115,-17.364817766860224,-17.364817766714946,-17.364817766525313,-17.364817766844833,-17.36481776664084,-17.36481776654277,-17.364817766831134,-17.364817766713745,-17.364817766537865,-17.36481776681185,-17.36481776667783,-17.36481776652178,-17.364817766856596
NetCDF:*.nc,V,140.0,-76.60444431210016,-76.60444431123507,-76.60444431261018,-76.60444431187184,-76.6044443113289,-76.6044443126437,-76.60444431191874,-76.60444431124075,-76.60444431261459,-76.6044443117889,-76.60444431115259,-76.60444431262407,-76.60444431209486,-76.60444431143,-76.60444431256406
NetCDF:*.nc,V,180.0,-99.99999999972702,-99.9999999990253,-100.00000000093962,-99.9999999999441,-99.9999999992297,-100.00000000068272,-99.99999999995634,-99.99999999902145,-100.00000000050258,-99.99999999998815,-99.99999999901978,-100.00000000091391,-99.99999999991846,-99.9999999991127,-100.00000000083342
NetCDF:*.nc,U,-180.0,-1.2246467991469012e-14,-1.2246467991364392e-14,-1.224646799157399e-14,-1.2246467991523593e-14,-1.2246467991449795e-14,-1.2246467991595785e-14,-1.224646799145372e-14,-1.224646799138247e-14,-1.2246467991578681e-14,-1.2246467991473856e-14,-1.2246467991355438e-14,-1.2246467991557486e-14,-1.2246467991493757e-14,-1.2246467991376417e-14,-1.2246467991569546e-14
NetCDF:*.nc,U,-140.0,-64.27876096868705,-64.2787609681271,-64.27876096913042,-64.2787609685075,-64.27876096816429,-64.27876096924153,-64.27876096863372,-64.2787609681939,-64.27876096925804,-64.27876096850277,-64.27876096803143,-64.278760969036,-64.27876096859869,-64.2787609681736,-64.27876096904896
NetCDF:*.nc,U,-100.0,-98.48077530182796,-98.48077530122865,-98.4807753021979,-98.48077530121832,-98.48077530037432,-98.48077530201007,-98.4807753014884,-98.48077530051059,-98.48077530219422,-98.48077530106072,-98.48077530027064,-98.48077530145791,-98.48077530138262,-98.48077530079111,-98.48077530218987
NetCDF:*.nc,U,-60.0,-86.60254037849234,-86.60254037782292,-86.60254037915361,-86.60254037839374,-86.60254037761385,-86.60254037911086,-86.60254037833667,-86.60254037772182,-86.60254037926882,-86.60254037833337,-86.6025403777172,-86.60254037916637,-86.60254037858064,-86.60254037763262,-86.60254037929431
NetCDF:*.nc,U,-20.0,-34.202014332548096,-34.202014332332304,-34.202014332743744,-34.20201433264184,-34.20201433227239,-34.202014332887224,-34.2020143326277,-34.20201433222525,-34.2020143329067,-34.202014332562825,-34.20201433225483,-34.202014332897626,-34.202014332588625,-34.2020143322339,-34.20201433290366
NetCDF:*.nc,U,20.0,34.20201433254874,34.20201433285569,34.202014332330386,34.202014332518175,34.202014332855036,34.202014332266764,34.202014332601436,34.20201433288964,34.202014332283404,34.202014332582465,34.20201433281269,34.20201433224461,34.202014332712466,34.202014332905215,34.20201433233179
NetCDF:*.nc,U,60.0,86.60254037873514,86.60254037921595,86.6025403779439,86.60254037857885,86.60254037905771,86.60254037808149,86.60254037850886,86.60254037927454,86.60254037764365,86.60254037820758,86.60254037886737,86.602540377676,86.60254037852842,86.60254037914147,86.60254037786092
NetCDF:*.nc,U,100.0,98.48077530146432,98.48077530216901,98.48077530080161,98.48077530134509,98.48077530208174,98.48077530026964,98.48077530092482,98.48077530200403,98.48077530036865,98.48077530133828,98.48077530189465,98.48077530034081,98.48077530113463,98.48077530214843,98.4807753002496
NetCDF:*.nc,U,140.0,64.27876096882375,64.2787609692517,64.27876096809784,64.27876096863216,64.27876096927983,64.27876096817658,64.27876096867152,64.27876096925542,64.27876096810262,64.27876096856255,64.27876096926336,64.27876096802864,64.2787609688193,64.27876096921301,64.27876096826142
NetCDF:*.nc,U,180.0,1.2246467991440102e-14,1.2246467991588603e-14,1.2246467991354168e-14,1.2246467991466683e-14,1.2246467991557142e-14,1.2246467991379199e-14,1.2246467991468185e-14,1.224646799153508e-14,1.2246467991353695e-14,1.224646799147208e-14,1.2246467991585454e-14,1.224646799135349e-14,1.2246467991463547e-14,1.2246467991575597e-14,1.224646799136487e-14
NetCDF:*.nc,V,-180.0,-99.999999999938,-99.99999999909076,-100.00000000097545,-99.9999999998936,-99.99999999933414,-100.00000000057265,-99.9999999999902,-99.9999999992747,-100.00000000061966,-100.00000000001361,-99.99999999902148,-100.00000000092821,-100.00000000023459,-99.99999999921533,-100.00000000096595
NetCDF:*.nc,V,-140.0,-76.60444431186886,-76.60444431127078,-76.60444431258306,-76.6044443118486,-76.60444431118019,-76.60444431260169,-76.60444431191601,-76.60444431134468,-76.60444431224704,-76.604444311938,-76.60444431144292,-76.60444431252695,-76.60444431174079,-76.60444431115371,-76.60444431245169
NetCDF:*.nc,V,-100.0,-17.364817766709976,-17.36481776653819,-17.364817766828853,-17.364817766705034,-17.36481776654792,-17.364817766864764,-17.364817766683565,-17.364817766535104,-17.36481776682638,-17.364817766664174,-17.364817766532386,-17.36481776684673,-17.364817766700035,-17.36481776653065,-17.36481776683164
NetCDF:*.nc,V,-60.0,49.99999999999794,50.00000000049927,49.99999999952295,50.00000000003705,50.00000000042772,49.99999999965576,50.000000000010395,50.000000000473335,49.999999999676504,50.000000000052694,50.00000000047155,49.99999999957813,49.9999999999895,50.000000000464034,49.999999999553886
NetCDF:*.nc,V,-20.0,93.96926207834889,93.96926207943261,93.96926207785661,93.96926207854042,93.96926207927268,93.96926207767626,93.96926207900285,93.96926207929644,93.96926207848801,93.9692620787126,93.96926207935138,93.9692620777057,93.96926207853421,93.96926207922411,93.96926207772522
NetCDF:*.nc,V,20.0,93.9692620787129,93.96926207947608,93.96926207786254,93.96926207882667,93.96926207951114,93.96926207775853,93.96926207869213,93.96926207925328,93.96926207808045,93.96926207855425,93.96926207942018,93.96926207780537,93.96926207851399,93.96926207918972,93.96926207773217
NetCDF:*.nc,V,60.0,49.9999999999831,50.00000000046593,49.999999999581775,50.00000000017652,50.000000000466066,49.99999999956546,49.99999999995518,50.000000000499135,49.99999999958413,49.999999999978996,50.000000000452516,49.999999999514024,49.99999999986598,50.00000000038635,49.999999999539774
NetCDF:*.nc,V,100.0,-17.36481776667393,-17.36481776653568,-17.36481776679457,-17.364817766690237,-17.364817766533385,-17.36481776684494,-17.364817766642737,-17.364817766531164,-17.364817766752036,-17.36481776669844,-17.364817766533395,-17.364817766839817,-17.36481776667758,-17.364817766523863,-17.364817766839792
NetCDF:*.nc,V,140.0,-76.60444431190852,-76.60444431140459,-76.60444431258053,-76.60444431190834,-76.60444431120088,-76.60444431257558,-76.60444431198039,-76.60444431117207,-76.60444431251852,-76.60444431170626,-76.60444431121223,-76.60444431262798,-76.60444431202981,-76.60444431134015,-76.6044443126008
NetCDF:*.nc,V,180.0,-99.99999999999363,-99.99999999926547,-100.00000000076771,-99.99999999987433,-99.9999999993205,-100.0000000009793,-100.00000000005306,-99.99999999923726,-100.00000000093759,-100.00000000002022,-99.99999999929878,-100.00000000072389,-99.9999999999908,-99.99999999932234,-100.00000000055714
NetCDF:*.nc,U,-180.0,-1.2246467991465942e-14,-1.2246467991362183e-14,-1.224646799159299e-14,-1.2246467991460502e-14,-1.2246467991391988e-14,-1.2246467991543662e-14,-1.2246467991472332e-14,-1.224646799138471e-14,-1.2246467991549419e-14,-1.2246467991475198e-14,-1.2246467991353698e-14,-1.2246467991587205e-14,-1.2246467991502262e-14,-1.224646799137744e-14,-1.2246467991591828e-14
NetCDF:*.nc,U,-140.0,-64.27876096862965,-64.27876096812781,-64.27876096922894,-64.27876096861269,-64.2787609680518,-64.27876096924457,-64.27876096866923,-64.27876096818983,-64.27876096894698,-64.27876096868766,-64.27876096827227,-64.27876096918186,-64.2787609685222,-64.27876096802957,-64.27876096911872
NetCDF:*.nc,U,-100.0,-98.48077530131691,-98.48077530034267,-98.48077530199109,-98.48077530128887,-98.48077530039784,-98.48077530219476,-98.48077530116714,-98.48077530032516,-98.48077530197708,-98.48077530105716,-98.48077530030974,-98.4807753020925,-98.48077530126052,-98.4807753002999,-98.4807753020069
NetCDF:*.nc,U,-60.0,-86.60254037844027,-86.60254037761757,-86.60254037930859,-86.60254037850801,-86.6025403778476,-86.60254037918466,-86.60254037846184,-86.60254037788353,-86.60254037926367,-86.6025403785351,-86.60254037771314,-86.60254037926059,-86.60254037842566,-86.60254037767115,-86.60254037924757
NetCDF:*.nc,U,-20.0,-34.20201433247881,-34.20201433229963,-34.20201433287325,-34.202014332548515,-34.202014332233986,-34.20201433281504,-34.20201433271683,-34.202014332529444,-34.20201433282369,-34.20201433261118,-34.2020143322447,-34.20201433284368,-34.202014332546256,-34.20201433225181,-34.202014332797354
NetCDF:*.nc,U,20.0,34.20201433261129,34.202014332889064,34.202014332301786,34.202014332652695,34.202014332901825,34.20201433226393,34.202014332603724,34.20201433280798,34.2020143323811,34.20201433255355,34.20201433286872,34.20201433228098,34.202014332538894,34.20201433278484,34.202014332254336
NetCDF:*.nc,U,60.0,86.6025403784146,86.60254037925085,86.60254037771945,86.60254037874958,86.60254037925108,86.6025403776912,86.60254037836621,86.60254037930837,86.60254037772354,86.60254037840745,86.60254037922762,86.60254037760211,86.6025403782117,86.60254037911301,86.6025403776467
NetCDF:*.nc,U,100.0,98.48077530111247,98.48077530179667,98.48077530032843,98.48077530120494,98.48077530208232,98.48077530031541,98.48077530093556,98.48077530155545,98.48077530030281,98.48077530125147,98.48077530205329,98.48077530031549,98.48077530113316,98.48077530205313,98.48077530026141
NetCDF:*.nc,U,140.0,64.27876096866297,64.27876096922682,64.27876096824009,64.2787609686628,64.27876096922267,64.27876096806916,64.27876096872323,64.2787609691748,64.27876096804499,64.27876096849326,64.27876096926664,64.27876096807869,64.27876096876471,64.27876096924383,64.27876096818602
NetCDF:*.nc,U,180.0,1.2246467991472753e-14,1.224646799156755e-14,1.2246467991383578e-14,1.2246467991458141e-14,1.2246467991593463e-14,1.2246467991390315e-14,1.2246467991480031e-14,1.2246467991588352e-14,1.2246467991380125e-14,1.2246467991476009e-14,1.2246467991562183e-14,1.2246467991387658e-14,1.2246467991472404e-14,1.224646799154176e-14,1.2246467991390542e-14
Loading