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
f533aa94
Commit
f533aa94
authored
1 year ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: clarify difference between old and new behavior
parent
5b6cd1b0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!73
MAINT: change wording of TableImporter argument and allow converters and...
,
!70
ENH: allow to provide required columns explicitly
Pipeline
#35531
passed
1 year ago
Stage: setup
Stage: cert
Stage: style
Stage: unittest
Stage: integrationtest
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+0
-2
0 additions, 2 deletions
CHANGELOG.md
src/caosadvancedtools/table_importer.py
+3
-1
3 additions, 1 deletion
src/caosadvancedtools/table_importer.py
with
3 additions
and
3 deletions
CHANGELOG.md
+
0
−
2
View file @
f533aa94
...
@@ -11,8 +11,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
...
@@ -11,8 +11,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ###
### Changed ###
-
The converters and datatype arguments of TableImporter now may have keys for nonexisting columns
-
The converters and datatype arguments of TableImporter now may have keys for nonexisting columns
-
The obligatory key word no longer enforces that the columns exist. Since all rows are still
checked whether this column has a non-NULL value, this is deemed a non breaking change.
### Deprecated ###
### Deprecated ###
...
...
This diff is collapsed.
Click to expand it.
src/caosadvancedtools/table_importer.py
+
3
−
1
View file @
f533aa94
...
@@ -221,7 +221,7 @@ class TableImporter():
...
@@ -221,7 +221,7 @@ class TableImporter():
value check is not necessary.
value check is not necessary.
obligatory_columns : list, optional
obligatory_columns : list, optional
List of column names that must not have missing values.
List of column names that
(if they exist)
must not have missing values.
unique_keys : list, optional
unique_keys : list, optional
List of column names that in combination must be unique: each row has a unique
List of column names that in combination must be unique: each row has a unique
...
@@ -387,6 +387,8 @@ class TableImporter():
...
@@ -387,6 +387,8 @@ class TableImporter():
while
okay
and
i
<
len
(
self
.
obligatory_columns
):
while
okay
and
i
<
len
(
self
.
obligatory_columns
):
key
=
self
.
obligatory_columns
[
i
]
key
=
self
.
obligatory_columns
[
i
]
if
key
not
in
df
.
columns
:
continue
i
+=
1
i
+=
1
if
pd
.
isnull
(
row
.
loc
[
key
]):
if
pd
.
isnull
(
row
.
loc
[
key
]):
...
...
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