Skip to content

Commit

Permalink
fix matrix and rename folder
Browse files Browse the repository at this point in the history
  • Loading branch information
geomarceau committed Oct 2, 2023
1 parent 14ec184 commit 65e24a8
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 27 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions tests/testFiles/dissimilarity/geo.csv/ALLSKY_SFC_SW_DWN.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OM739053 0
OU471040 0.596319 0
ON129429 0.403681 1.0 0
OL989074 0.009816 0.586503 0.413497 0
ON134852 0.393865 0.990184 0.009816 0.403681 0
OM739053 0.000000
OU471040 0.596319 0.000000
ON129429 0.403681 1.000000 0.000000
OL989074 0.009816 0.586503 0.413497 0.000000
ON134852 0.393865 0.990184 0.009816 0.403681 0.000000
OM739053 OU471040 ON129429 OL989074 ON134852
10 changes: 5 additions & 5 deletions tests/testFiles/dissimilarity/geo.csv/PRECTOTCORR.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OM739053 0
OU471040 1.0 0
ON129429 0.603105 0.396896 0
OL989074 0.764967 0.235033 0.161862 0
ON134852 0.749446 0.250555 0.146341 0.015521 0
OM739053 0.000000
OU471040 1.000000 0.000000
ON129429 0.603105 0.396896 0.000000
OL989074 0.764967 0.235033 0.161862 0.000000
ON134852 0.749446 0.250555 0.146341 0.015521 0.000000
OM739053 OU471040 ON129429 OL989074 ON134852
10 changes: 5 additions & 5 deletions tests/testFiles/dissimilarity/geo.csv/QV2M.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OM739053 0
OU471040 0.161638 0
ON129429 0.62129 0.782929 0
OL989074 0.838362 1.0 0.217071 0
ON134852 0.08364 0.077999 0.70493 0.922001 0
OM739053 0.000000
OU471040 0.161638 0.000000
ON129429 0.62129 0.782929 0.000000
OL989074 0.838362 1.000000 0.217071 0.000000
ON134852 0.08364 0.077999 0.70493 0.922001 0.000000
OM739053 OU471040 ON129429 OL989074 ON134852
10 changes: 5 additions & 5 deletions tests/testFiles/dissimilarity/geo.csv/T2M.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OM739053 0
OU471040 0.463937 0
ON129429 0.536063 1.0 0
OL989074 0.494682 0.958619 0.041381 0
ON134852 0.094856 0.558794 0.441206 0.399825 0
OM739053 0.000000
OU471040 0.463937 0.000000
ON129429 0.536063 1.000000 0.000000
OL989074 0.494682 0.958619 0.041381 0.000000
ON134852 0.094856 0.558794 0.441206 0.399825 0.000000
OM739053 OU471040 ON129429 OL989074 ON134852
10 changes: 5 additions & 5 deletions tests/testFiles/dissimilarity/geo.csv/WS10M.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OM739053 0
OU471040 0.113953 0
ON129429 0.277519 0.391473 0
OL989074 0.722481 0.608527 1.0 0
ON134852 0.491473 0.377519 0.768992 0.231008 0
OM739053 0.000000
OU471040 0.113953 0.000000
ON129429 0.277519 0.391473 0.000000
OL989074 0.722481 0.608527 1.000000 0.000000
ON134852 0.491473 0.377519 0.768992 0.231008 0.000000
OM739053 OU471040 ON129429 OL989074 ON134852
5 changes: 3 additions & 2 deletions tests/test_climatic.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def climaticTreesSetup():
return utils.climaticPipeline(pd.read_csv(p.file_name), p.names)


@pytest.mark.skip(reason="Work in progress, new version matrix return 0.00000 instead than 0")
#@pytest.mark.skip(reason="Work in progress, new version matrix return 0.00000 instead than 0")
def test_climaticPipeline():
'''
This test is used to test the climaticPipeline function.
Expand Down Expand Up @@ -49,10 +49,11 @@ def test_climaticPipeline():
filename_without_ext = filename[0:-4]
file = Path(curent_dir / filename)
actual_matrix = utils.getDissimilaritiesMatrix(df, 'id', filename_without_ext)

print(f'Actual matrix: {actual_matrix}')
with open(file, 'r') as expected_file:
expected_matrix = expected_file.read()

print(f'Expected matrix: {expected_matrix}')
# test getDissimilaritiesMatrix
assert str(actual_matrix) == expected_matrix

Expand Down

0 comments on commit 65e24a8

Please sign in to comment.