Skip to content
Snippets Groups Projects
Commit 4cf1ce9b authored by Leštáková, Michaela's avatar Leštáková, Michaela
Browse files

removing ontology checking

parent cdc6a27d
Branches
Tags
1 merge request!14removing ontology checking
Pipeline #1064842 passed
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
__author__ = "Michaela Lestakova" __author__ = "Michaela Lestakova"
__email__ = "michaela.lestakova@fst.tu-darmstadt.de" __email__ = "michaela.lestakova@fst.tu-darmstadt.de"
__version__ = "0.1.2" __version__ = "0.1.3"
...@@ -25,8 +25,6 @@ class Deserializer: ...@@ -25,8 +25,6 @@ class Deserializer:
p.axes = [] p.axes = []
for a in d["axes"]: for a in d["axes"]:
axis = Axis() axis = Axis()
axis.xlabel = a["xlabel"]
axis.ylabel = a["ylabel"]
axis.traces = [] axis.traces = []
for t in a["traces"]: for t in a["traces"]:
plotted_element = Trace() plotted_element = Trace()
...@@ -52,8 +50,6 @@ class Deserializer: ...@@ -52,8 +50,6 @@ class Deserializer:
fig = plt.figure() fig = plt.figure()
for axis in self.plot.axes: for axis in self.plot.axes:
ax = fig.add_subplot() ax = fig.add_subplot()
ax.set_xlabel(axis.xlabel)
ax.set_ylabel(axis.ylabel)
for t in axis.traces: for t in axis.traces:
ax.plot(t.xdata, t.ydata, label=t.label, color=t.color) ax.plot(t.xdata, t.ydata, label=t.label, color=t.color)
return fig return fig
from warnings import warn
from plot_serializer.exceptions import OntologyWarning
from plot_serializer.utils import unit_in_ontology
class Plot: class Plot:
# __slots__ = ["_id", "_axes", "_title", "_caption"] # __slots__ = ["_id", "_axes", "_title", "_caption"]
def __init__(self) -> None: def __init__(self) -> None:
......
...@@ -3,7 +3,6 @@ import json ...@@ -3,7 +3,6 @@ import json
import numpy as np import numpy as np
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import pytest import pytest
from plot_serializer.exceptions import OntologyWarning
from plot_serializer.serializer import Serializer from plot_serializer.serializer import Serializer
...@@ -53,7 +52,6 @@ def test_to_json(): ...@@ -53,7 +52,6 @@ def test_to_json():
benchmark_file = open("tests/test_plot.json") benchmark_file = open("tests/test_plot.json")
benchmark_dict = json.load(benchmark_file) benchmark_dict = json.load(benchmark_file)
with pytest.warns(OntologyWarning):
dict_from_serialized = json.loads(serialize_plot()) dict_from_serialized = json.loads(serialize_plot())
np.testing.assert_array_equal( np.testing.assert_array_equal(
...@@ -69,7 +67,6 @@ def test_to_json_linux(): ...@@ -69,7 +67,6 @@ def test_to_json_linux():
benchmark_file = open("tests/test_plot.json") benchmark_file = open("tests/test_plot.json")
benchmark_dict = json.load(benchmark_file) benchmark_dict = json.load(benchmark_file)
with pytest.warns(OntologyWarning):
dict_from_serialized = json.loads(serialize_plot()) dict_from_serialized = json.loads(serialize_plot())
np.testing.assert_array_equal( np.testing.assert_array_equal(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment