Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ICARTT Python Package
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
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
MBEES
ICARTT Python Package
Merge requests
!6
The source project of this merge request has been removed.
code refactor
Merged
code refactor
(removed):master
into
master
Overview
4
Commits
32
Pipelines
0
Changes
1
Merged
Florian Obersteiner
requested to merge
(removed):master
into
master
3 years ago
Overview
4
Pipelines
0
Changes
1
Expand
related to
#8 (closed)
:
I kept changes per commit small, so the number of commits got kind of numerous...
Edited
3 years ago
by
Florian Obersteiner
0
0
Merge request reports
Viewing commit
c17544f0
Prev
Next
Show latest version
1 file
+
4
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
c17544f0
isValidFileName revised and added as a warning
· c17544f0
Florian Obersteiner
authored
3 years ago
src/icartt/dataset.py
+
4
−
3
Options
@@ -710,10 +710,10 @@ class Dataset:
def
isAsciiAlpha
(
x
):
return
re
.
match
(
"
[a-zA-Z0-9-_.]
"
,
x
)
allAsciiAlpha
=
all
(
[
isAsciiAlpha
(
x
)
for
x
in
name
]
)
allAsciiAlpha
=
all
(
isAsciiAlpha
(
x
)
for
x
in
name
)
lessThan128Characters
=
len
(
name
)
<
128
return
allAsciiAlpha
and
lessThan128Characters
return
allAsciiAlpha
and
lessThan128Characters
and
name
.
endswith
(
'
.ict
'
)
def
writeHeader
(
self
,
f
=
sys
.
stdout
,
delimiter
=
DEFAULT_FIELD_DELIM
):
"""
Write header
@@ -914,7 +914,8 @@ class Dataset:
else
:
self
.
inputFhandle
=
f
# TODO should we add a filename characters check, as we have it for the variable names?
if
not
self
.
isValidFileName
(
pathlib
.
Path
(
f
).
name
):
warnings
.
warn
(
f
"
{
pathlib
.
Path
(
f
).
name
}
is not a valid ICARTT filename
"
)
self
.
readHeader
(
splitChar
)
if
loadData
:
Loading