Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Siputils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
Siputils
Commits
73b1237d
Commit
73b1237d
authored
Apr 26, 2022
by
Roy de Goei
Browse files
Options
Downloads
Patches
Plain Diff
Update parameters for validatesip command line
parent
272fb755
No related branches found
No related tags found
No related merge requests found
Pipeline
#29579
passed with warnings
Apr 26, 2022
Stage: test
Stage: build
Stage: publish
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/validatesip
+2
-1
2 additions, 1 deletion
bin/validatesip
lib/validator.py
+5
-2
5 additions, 2 deletions
lib/validator.py
with
7 additions
and
3 deletions
bin/validatesip
+
2
−
1
View file @
73b1237d
...
@@ -5,7 +5,8 @@ from lofar.lta.sip.validator import main
...
@@ -5,7 +5,8 @@ from lofar.lta.sip.validator import main
def
parse_args
():
def
parse_args
():
parser
=
ArgumentParser
(
description
=
'
validates sip over the xsd
'
)
parser
=
ArgumentParser
(
description
=
'
validates sip over the xsd
'
)
parser
.
add_argument
(
'
sip
'
,
help
=
'
xml sip to validate
'
)
parser
.
add_argument
(
'
--sip
'
,
nargs
=
'
?
'
,
default
=
''
,
help
=
'
xml SIP file to validate
'
)
parser
.
add_argument
(
'
--xsd
'
,
nargs
=
'
?
'
,
default
=
None
,
help
=
'
Alternative xsd schema file for validation
'
)
return
parser
.
parse_args
()
return
parser
.
parse_args
()
...
...
This diff is collapsed.
Click to expand it.
lib/validator.py
+
5
−
2
View file @
73b1237d
...
@@ -109,14 +109,17 @@ def check_consistency_of_file(xmlpath):
...
@@ -109,14 +109,17 @@ def check_consistency_of_file(xmlpath):
return
check_consistency
(
sip
)
return
check_consistency
(
sip
)
def
main
(
xml
):
def
main
(
xml
,
xsd_file
):
"""
"""
validates given xml against the SIP XSD and does consistency check
validates given xml against the SIP XSD and does consistency check
"""
"""
try
:
try
:
xml
=
xml
xml
=
xml
if
xsd_file
is
None
:
xsd
=
DEFAULT_SIP_XSD_PATH
xsd
=
DEFAULT_SIP_XSD_PATH
else
:
xsd
=
xsd_file
valid
=
validate
(
xml
,
xsd
)
valid
=
validate
(
xml
,
xsd
)
consistent
=
check_consistency_of_file
(
xml
)
consistent
=
check_consistency_of_file
(
xml
)
return
valid
and
consistent
return
valid
and
consistent
...
...
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