Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-advanced-user-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-advanced-user-tools
Commits
c106c939
Commit
c106c939
authored
3 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
FIX: updated dataframe needs to be returned
parent
a612f4b0
No related branches found
No related tags found
1 merge request
!39
Release 0.4.0
Pipeline
#17512
passed
3 years ago
Stage: setup
Stage: cert
Stage: style
Stage: unittest
Stage: integrationtest
Changes
1
Pipelines
7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caosadvancedtools/table_importer.py
+8
-3
8 additions, 3 deletions
src/caosadvancedtools/table_importer.py
with
8 additions
and
3 deletions
src/caosadvancedtools/table_importer.py
+
8
−
3
View file @
c106c939
...
@@ -156,6 +156,9 @@ def win_path_converter(val):
...
@@ -156,6 +156,9 @@ def win_path_converter(val):
checks whether the value looks like a windows path and converts it to posix
checks whether the value looks like a windows path and converts it to posix
"""
"""
if
val
==
""
:
return
val
if
not
check_win_path
(
val
):
if
not
check_win_path
(
val
):
raise
ValueError
(
raise
ValueError
(
"
Field should be a Windows path, but is
\n
'
{}
'
.
"
.
format
(
val
))
"
Field should be a Windows path, but is
\n
'
{}
'
.
"
.
format
(
val
))
...
@@ -367,6 +370,8 @@ class TableImporter(object):
...
@@ -367,6 +370,8 @@ class TableImporter(object):
if
len
(
self
.
unique_keys
)
>
0
:
if
len
(
self
.
unique_keys
)
>
0
:
df
=
self
.
check_unique
(
df
,
filename
=
filename
)
df
=
self
.
check_unique
(
df
,
filename
=
filename
)
return
df
class
XLSImporter
(
TableImporter
):
class
XLSImporter
(
TableImporter
):
def
read_file
(
self
,
filename
,
**
kwargs
):
def
read_file
(
self
,
filename
,
**
kwargs
):
...
@@ -405,7 +410,7 @@ class XLSImporter(TableImporter):
...
@@ -405,7 +410,7 @@ class XLSImporter(TableImporter):
'
category
'
:
"
inconsistency
"
})
'
category
'
:
"
inconsistency
"
})
raise
DataInconsistencyError
(
*
e
.
args
)
raise
DataInconsistencyError
(
*
e
.
args
)
self
.
check_dataframe
(
df
,
filename
)
df
=
self
.
check_dataframe
(
df
,
filename
)
return
df
return
df
...
@@ -422,7 +427,7 @@ class CSVImporter(TableImporter):
...
@@ -422,7 +427,7 @@ class CSVImporter(TableImporter):
'
category
'
:
"
inconsistency
"
})
'
category
'
:
"
inconsistency
"
})
raise
DataInconsistencyError
(
*
ve
.
args
)
raise
DataInconsistencyError
(
*
ve
.
args
)
self
.
check_dataframe
(
df
,
filename
)
df
=
self
.
check_dataframe
(
df
,
filename
)
return
df
return
df
...
@@ -439,6 +444,6 @@ class TSVImporter(TableImporter):
...
@@ -439,6 +444,6 @@ class TSVImporter(TableImporter):
'
category
'
:
"
inconsistency
"
})
'
category
'
:
"
inconsistency
"
})
raise
DataInconsistencyError
(
*
ve
.
args
)
raise
DataInconsistencyError
(
*
ve
.
args
)
self
.
check_dataframe
(
df
,
filename
)
df
=
self
.
check_dataframe
(
df
,
filename
)
return
df
return
df
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment