Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bliss
bliss
Commits
d4bdecbe
Commit
d4bdecbe
authored
Jun 11, 2021
by
Valentin Valls
Browse files
Add deprecation warning
parent
31c9b0a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
bliss/flint/client/plots.py
View file @
d4bdecbe
...
...
@@ -18,6 +18,7 @@ import contextlib
from
.
import
proxy
from
bliss.common
import
event
from
bliss.common
import
deprecation
class
BasePlot
(
object
):
...
...
@@ -263,11 +264,20 @@ class _DataPlot(BasePlot):
field: Identifier in the targeted plot
data: Data to upload
"""
deprecation
.
deprecated_warning
(
"Method"
,
"upload_data"
,
replacement
=
"set_data"
,
since_version
=
"1.9"
)
return
self
.
submit
(
"updateStoredData"
,
field
,
data
)
def
upload_data_if_needed
(
self
,
field
,
data
):
"""Upload data only if it is a numpy array or a list
"""
deprecation
.
deprecated_warning
(
"Method"
,
"upload_data_if_needed"
,
replacement
=
"set_data"
,
since_version
=
"1.9"
,
)
if
isinstance
(
data
,
(
numpy
.
ndarray
,
list
)):
self
.
submit
(
"updateStoredData"
,
field
,
data
)
return
field
...
...
@@ -276,6 +286,9 @@ class _DataPlot(BasePlot):
def
add_data
(
self
,
data
,
field
=
"default"
):
# Get fields
deprecation
.
deprecated_warning
(
"Method"
,
"add_data"
,
replacement
=
"set_data"
,
since_version
=
"1.9"
)
if
isinstance
(
data
,
dict
):
fields
=
list
(
data
)
else
:
...
...
@@ -296,9 +309,21 @@ class _DataPlot(BasePlot):
self
.
submit
(
"removeStoredData"
,
field
)
def
select_data
(
self
,
*
names
,
**
kwargs
):
deprecation
.
deprecated_warning
(
"Method"
,
"select_data"
,
replacement
=
"set_data/add_curve/add_curve_item/set_data"
,
since_version
=
"1.9"
,
)
self
.
submit
(
"selectStoredData"
,
*
names
,
**
kwargs
)
def
deselect_data
(
self
,
*
names
):
deprecation
.
deprecated_warning
(
"Method"
,
"deselect_data"
,
replacement
=
"set_data/add_curve/add_curve_item"
,
since_version
=
"1.9"
,
)
self
.
submit
(
"deselectStoredData"
,
*
names
)
def
clear_data
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment