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

Merge branch 'first-release' into 'main'

removing ontology checking

See merge request !14
parents a3d3d35b 4cf1ce9b
Branches
Tags v0.1.3
1 merge request!14removing ontology checking
Pipeline #1064864 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,8 +52,7 @@ 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())
dict_from_serialized = json.loads(serialize_plot())
np.testing.assert_array_equal(
np.array(benchmark_dict.keys()),
......@@ -69,8 +67,7 @@ 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())
dict_from_serialized = json.loads(serialize_plot())
np.testing.assert_array_equal(
np.array(benchmark_dict.keys()),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment