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
8de25d3a
Commit
8de25d3a
authored
6 years ago
by
Stefano Borini
Browse files
Options
Downloads
Patches
Plain Diff
Removed base class that used to be shared by the KPI and data source probe
parent
f41442fb
No related branches found
No related tags found
1 merge request
!130
Safer plugin import - 2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
force_bdss/tests/probe_classes/data_source.py
+10
-4
10 additions, 4 deletions
force_bdss/tests/probe_classes/data_source.py
force_bdss/tests/probe_classes/evaluator_factory.py
+0
-28
0 additions, 28 deletions
force_bdss/tests/probe_classes/evaluator_factory.py
with
10 additions
and
32 deletions
force_bdss/tests/probe_classes/data_source.py
+
10
−
4
View file @
8de25d3a
...
...
@@ -6,8 +6,6 @@ from force_bdss.api import (
Slot
)
from
.evaluator_factory
import
ProbeEvaluatorFactory
def
run_func
(
*
args
,
**
kwargs
):
return
[]
...
...
@@ -47,8 +45,16 @@ class ProbeDataSourceModel(BaseDataSourceModel):
self
.
changes_slots
=
True
class
ProbeDataSourceFactory
(
BaseDataSourceFactory
,
ProbeEvaluatorFactory
):
class
ProbeDataSourceFactory
(
BaseDataSourceFactory
):
run_function
=
Function
(
default_value
=
run_func
)
input_slots_type
=
Str
(
'
PRESSURE
'
)
output_slots_type
=
Str
(
'
PRESSURE
'
)
input_slots_size
=
Int
(
0
)
output_slots_size
=
Int
(
0
)
def
get_identifier
(
self
):
return
"
test_ds
"
...
...
This diff is collapsed.
Click to expand it.
force_bdss/tests/probe_classes/evaluator_factory.py
deleted
100644 → 0
+
0
−
28
View file @
f41442fb
try
:
import
mock
except
ImportError
:
from
unittest
import
mock
from
envisage.plugin
import
Plugin
from
traits.api
import
HasStrictTraits
,
Function
,
Str
,
Int
def
run_func
(
*
args
,
**
kwargs
):
return
[]
class
ProbeEvaluatorFactory
(
HasStrictTraits
):
def
__init__
(
self
,
plugin
=
None
,
*
args
,
**
kwargs
):
if
plugin
is
None
:
plugin
=
mock
.
Mock
(
Plugin
)
super
(
ProbeEvaluatorFactory
,
self
).
__init__
(
plugin
=
plugin
,
*
args
,
**
kwargs
)
run_function
=
Function
(
default_value
=
run_func
)
input_slots_type
=
Str
(
'
PRESSURE
'
)
output_slots_type
=
Str
(
'
PRESSURE
'
)
input_slots_size
=
Int
(
0
)
output_slots_size
=
Int
(
0
)
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