From 75dc1c360f313c657726faa18ba4ce79edaab754 Mon Sep 17 00:00:00 2001 From: nugget <nugget@computerwerk.org> Date: Wed, 15 Jun 2022 09:56:08 +0200 Subject: [PATCH] Imports with absolute paths. --- src/plotid/create_id.py | 2 +- src/plotid/example.py | 4 ++-- src/plotid/publish.py | 2 +- src/plotid/tagplot.py | 4 ++-- src/plotid/tagplot_matplotlib.py | 4 ++-- tests/test_tagplot_matplotlib.py | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/plotid/create_id.py b/src/plotid/create_id.py index fa7febc..450e2da 100644 --- a/src/plotid/create_id.py +++ b/src/plotid/create_id.py @@ -3,7 +3,7 @@ Create an identifier to print it on a plot. Functions: - create_id(int) -> string + create_id(str) -> string """ import time import uuid diff --git a/src/plotid/example.py b/src/plotid/example.py index fcf7713..5187d2b 100644 --- a/src/plotid/example.py +++ b/src/plotid/example.py @@ -11,8 +11,8 @@ the function publish. import numpy as np # import h5py as h5 import matplotlib.pyplot as plt -from plotid.tagplot import tagplot -from plotid.publish import publish +from src.plotid.tagplot import tagplot +from src.plotid.publish import publish # %% Set Project ID PROJECT_ID = "MR04_" diff --git a/src/plotid/publish.py b/src/plotid/publish.py index 41b4ae1..f7a59e4 100644 --- a/src/plotid/publish.py +++ b/src/plotid/publish.py @@ -15,7 +15,7 @@ import os import shutil import sys import warnings -import plotid.save_plot as save_plot +from src.plotid.save_plot import save_plot def publish(src_datapath, dst_path, figure, plot_name, data_storage): diff --git a/src/plotid/tagplot.py b/src/plotid/tagplot.py index 695d2b1..429a1e7 100644 --- a/src/plotid/tagplot.py +++ b/src/plotid/tagplot.py @@ -11,8 +11,8 @@ Functions: """ import warnings -from plotid.plotoptions import PlotOptions -from plotid.tagplot_matplotlib import tagplot_matplotlib +from src.plotid.plotoptions import PlotOptions +from src.plotid.tagplot_matplotlib import tagplot_matplotlib def tagplot(figs, engine, prefix='', id_method='time', location='east'): diff --git a/src/plotid/tagplot_matplotlib.py b/src/plotid/tagplot_matplotlib.py index b67acfc..1b1ba9a 100644 --- a/src/plotid/tagplot_matplotlib.py +++ b/src/plotid/tagplot_matplotlib.py @@ -8,8 +8,8 @@ Functions: import matplotlib import matplotlib.pyplot as plt -import plotid.create_id as create_id -from plotid.plotoptions import PlotOptions +import src.plotid.create_id as create_id +from src.plotid.plotoptions import PlotOptions def tagplot_matplotlib(plotid_object): diff --git a/tests/test_tagplot_matplotlib.py b/tests/test_tagplot_matplotlib.py index 4a6abf2..78e3d14 100644 --- a/tests/test_tagplot_matplotlib.py +++ b/tests/test_tagplot_matplotlib.py @@ -7,8 +7,8 @@ Unittests for TagPlot_matplotlib import unittest import matplotlib.pyplot as plt from matplotlib.figure import Figure -from tagplot_matplotlib import tagplot_matplotlib -from plotoptions import PlotOptions +from src.plotid.tagplot_matplotlib import tagplot_matplotlib +from src.plotid.plotoptions import PlotOptions FIG1 = plt.figure() -- GitLab