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

removing ontology checking

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