Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
force-bdss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Adham Hashibon
force-bdss
Commits
63573d48
Commit
63573d48
authored
7 years ago
by
Stefano Borini
Browse files
Options
Downloads
Patches
Plain Diff
Changed MCO to Environment in source
parent
81727892
No related branches found
No related tags found
1 merge request
!69
Introduce slots and resolution of named variables
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
force_bdss/core/input_slot_map.py
+9
-7
9 additions, 7 deletions
force_bdss/core/input_slot_map.py
force_bdss/core/tests/test_input_slot_map.py
+1
-1
1 addition, 1 deletion
force_bdss/core/tests/test_input_slot_map.py
with
10 additions
and
8 deletions
force_bdss/core/input_slot_map.py
+
9
−
7
View file @
63573d48
...
@@ -5,15 +5,17 @@ from ..local_traits import Identifier
...
@@ -5,15 +5,17 @@ from ..local_traits import Identifier
class
InputSlotMap
(
HasStrictTraits
):
class
InputSlotMap
(
HasStrictTraits
):
"""
"""
Class that specifies the origin of data for the slots of a data source.
Class that specifies the origin of data for the slots of a data source
This entity will go in the model object, and associates the order
or KPI calculator.
it is in the containing tlist with the variable name the value
This entity will go in the model object, and associates the positional
should be taken from.
order in the containing list with the variable name that refers to the
value that should be taken.
"""
"""
#: Where the value will come from.
#: Where the value will come from.
#: At the moment, only MCO is supported: the source is the MCO parameter
#: At the moment, only the Environment is supported: the source is the
#: with name specified at ``name``.
#: parameter in the current execution environment with the name specified
source
=
Enum
(
'
MCO
'
)
#: as ``name``.
source
=
Enum
(
'
Environment
'
)
#: The user defined name of the variable containing the value.
#: The user defined name of the variable containing the value.
name
=
Identifier
()
name
=
Identifier
()
This diff is collapsed.
Click to expand it.
force_bdss/core/tests/test_input_slot_map.py
+
1
−
1
View file @
63573d48
...
@@ -8,7 +8,7 @@ class TestDataValue(unittest.TestCase):
...
@@ -8,7 +8,7 @@ class TestDataValue(unittest.TestCase):
def
test_initialization
(
self
):
def
test_initialization
(
self
):
slotmap
=
InputSlotMap
()
slotmap
=
InputSlotMap
()
self
.
assertEqual
(
slotmap
.
source
,
"
MCO
"
)
self
.
assertEqual
(
slotmap
.
source
,
"
Environment
"
)
self
.
assertEqual
(
slotmap
.
name
,
""
)
self
.
assertEqual
(
slotmap
.
name
,
""
)
with
self
.
assertRaises
(
TraitError
):
with
self
.
assertRaises
(
TraitError
):
slotmap
.
name
=
"
000
"
slotmap
.
name
=
"
000
"
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