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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
Siputils
Commits
d02e1dbd
Commit
d02e1dbd
authored
3 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-761
: Fix to force all derived complexType's to add their type as an attribute
parent
03108ca7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/siplib.py
+8
-0
8 additions, 0 deletions
lib/siplib.py
with
8 additions
and
0 deletions
lib/siplib.py
+
8
−
0
View file @
d02e1dbd
...
...
@@ -41,6 +41,14 @@ logger = logging.getLogger(__name__)
VERSION
=
"
SIPlib 0.4
"
ltasip
.
Namespace
.
setPrefix
(
'
sip
'
)
# The LTA catalogue expectes all lofar complexType objects to be annotated as xsi:type="<my_type>"
# Trick pyxb into doing this, by override the _RequireXSIType, and make the xsitype required for out types.
import
inspect
from
pyxb.binding.basis
import
complexTypeDefinition
for
member
in
inspect
.
getmembers
(
ltasip
,
inspect
.
isclass
):
if
issubclass
(
member
[
1
],
complexTypeDefinition
):
member
[
1
].
_RequireXSIType
=
classmethod
(
lambda
_1
,
_2
:
True
)
# todo: create docstrings for everything.
# specify types and explain purpose of the field (-> ask someone with more astronomical background)
...
...
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