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
Commits
d04c3f0a
Commit
d04c3f0a
authored
3 years ago
by
Florian Obersteiner
Browse files
Options
Downloads
Patches
Plain Diff
revision keywrd comments parser
parent
f8ea4e0c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!15
updated normal comments handling
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/icartt/dataset.py
+10
-10
10 additions, 10 deletions
src/icartt/dataset.py
with
10 additions
and
10 deletions
src/icartt/dataset.py
+
10
−
10
View file @
d04c3f0a
...
...
@@ -216,26 +216,26 @@ class StandardNormalComments(collections.UserList):
# in the order listed in the ICARTT documentation.
currentKeyword
=
None
keywordLine
=
False
for
l
in
raw
:
possibleKeyword
=
l
.
split
(
"
:
"
)[
0
].
strip
()
if
possibleKeyword
in
self
.
keywords
or
re
.
match
(
"
R[a-zA-Z0-9]{1,2}[ ]*
"
,
possibleKeyword
):
if
possibleKeyword
in
self
.
keywords
or
re
.
match
(
"
R[a-zA-Z0-9]{1,2}[ ]*
"
,
possibleKeyword
):
currentKeyword
=
possibleKeyword
keywordLine
=
True
if
not
currentKeyword
in
self
.
keywords
:
# for the revisions only...
self
.
keywords
[
currentKeyword
]
=
KeywordComment
(
currentKeyword
,
Fa
lse
)
self
.
keywords
[
currentKeyword
]
=
KeywordComment
(
currentKeyword
,
False
)
e
lse
:
keywordLine
=
False
if
currentKeyword
is
None
:
self
.
freeform
.
append
(
l
)
elif
keywordLine
:
self
.
keywords
[
currentKeyword
].
append
(
l
.
replace
(
l
.
split
(
"
:
"
)[
0
]
+
"
:
"
,
""
).
strip
())
else
:
self
.
keywords
[
currentKeyword
].
append
(
l
.
replace
(
l
.
split
(
"
:
"
)[
0
]
+
"
:
"
,
""
).
strip
()
)
self
.
keywords
[
currentKeyword
].
append
(
l
.
strip
())
for
key
in
self
.
keywords
:
if
self
.
keywords
[
key
].
data
==
[]
:
if
not
self
.
keywords
[
key
].
data
:
warnings
.
warn
(
f
"
Normal comments: required keyword
{
str
(
key
)
}
is missing.
"
)
...
...
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