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
725ec246
Unverified
Commit
725ec246
authored
6 years ago
by
Stefano Borini
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #119 from force-h2020/add-kpi-flag-to-datavalue
Added new flag is_kpi to DataValue
parents
b82b6044
7b6f02c4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
force_bdss/core/data_value.py
+8
-1
8 additions, 1 deletion
force_bdss/core/data_value.py
with
8 additions
and
1 deletion
force_bdss/core/data_value.py
+
8
−
1
View file @
725ec246
from
traits.api
import
HasStrictTraits
,
Any
,
String
,
Enum
from
traits.api
import
HasStrictTraits
,
Any
,
String
,
Enum
,
Bool
class
DataValue
(
HasStrictTraits
):
class
DataValue
(
HasStrictTraits
):
...
@@ -22,6 +22,9 @@ class DataValue(HasStrictTraits):
...
@@ -22,6 +22,9 @@ class DataValue(HasStrictTraits):
#: A flag for the quality of the data.
#: A flag for the quality of the data.
quality
=
Enum
(
"
AVERAGE
"
,
"
POOR
"
,
"
GOOD
"
)
quality
=
Enum
(
"
AVERAGE
"
,
"
POOR
"
,
"
GOOD
"
)
# Set by the engine. True if the data value contains a KPI.
is_kpi
=
Bool
(
False
)
def
__str__
(
self
):
def
__str__
(
self
):
s
=
"
{} {} = {}
"
.
format
(
s
=
"
{} {} = {}
"
.
format
(
...
@@ -31,4 +34,8 @@ class DataValue(HasStrictTraits):
...
@@ -31,4 +34,8 @@ class DataValue(HasStrictTraits):
s
+=
"
+/- {}
"
.
format
(
str
(
self
.
accuracy
))
s
+=
"
+/- {}
"
.
format
(
str
(
self
.
accuracy
))
s
+=
"
({})
"
.
format
(
str
(
self
.
quality
))
s
+=
"
({})
"
.
format
(
str
(
self
.
quality
))
if
self
.
is_kpi
:
s
+=
"
(KPI)
"
return
s
return
s
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