Skip to content

Commit

Permalink
Merge pull request #61 from usegalaxy-eu/float-fix
Browse files Browse the repository at this point in the history
Fixing float giving error when parsed in the xml
  • Loading branch information
bgruening authored Jan 20, 2022
2 parents cb88385 + 5dc08b0 commit 0be8bd3
Show file tree
Hide file tree
Showing 43 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion ena_upload/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.5.2"
__version__ = "0.5.3"
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000011.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000012.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000013.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000014.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000015.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000016.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000017.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000018.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000019.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000020.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000021.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000022.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000023.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000024.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000025.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000027.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000028.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000029.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000030.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000031.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000032.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000033.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000034.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000035.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000036.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000037.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000038.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000039.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000040.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000041.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000043.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000044.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000045.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000047.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000048.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000049.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000050.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000051.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000052.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
2 changes: 1 addition & 1 deletion ena_upload/templates/ENA_template_samples_ERC000053.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?python
import pandas as pd
def attributetest(row, column):
if hasattr(row, column) and pd.notna(row[column]) and not row[column].isspace() and str(row[column]).lower() not in ['nan', 'na']:
if hasattr(row, column) and pd.notna(row[column]) and not str(row[column]).isspace() and str(row[column]).lower() not in ['nan', 'na']:
return True
else:
return False
Expand Down
Binary file modified example_tables/ENA_excel_example_ERC000033.xlsx
Binary file not shown.

0 comments on commit 0be8bd3

Please sign in to comment.