Skip to content
Snippets Groups Projects
Commit d6c2925e authored by nugget's avatar nugget
Browse files

Change imports to absolute imports. That makes the package when installed via...

Change imports to absolute imports. That makes the package when installed via pip work. BUT it breaks the code if it is run not as a package.
parent 46e7cd31
No related branches found
No related tags found
3 merge requests!12v.0.1 for alpha release,!11Draft: Merge version0.1 changes into dev,!10Version0.1
Pipeline #734928 failed
This commit is part of merge request !11. Comments created here will be created in the context of that merge request.
[metadata] [metadata]
name = example-package-plotid-test name = example-package-plotid-test
version = 0.0.1 version = 0.0.2
author = Example Author author = Example Author
author_email = author@example.com author_email = author@example.com
description = A small example package description = A small example package
......
...@@ -11,8 +11,8 @@ the function publish. ...@@ -11,8 +11,8 @@ the function publish.
import numpy as np import numpy as np
# import h5py as h5 # import h5py as h5
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from tagplot import tagplot from plotid.tagplot import tagplot
from publish import publish from plotid.publish import publish
# %% Set Project ID # %% Set Project ID
PROJECT_ID = "MR04_" PROJECT_ID = "MR04_"
......
...@@ -15,7 +15,7 @@ import os ...@@ -15,7 +15,7 @@ import os
import shutil import shutil
import sys import sys
import warnings import warnings
from save_plot import save_plot import plotid.save_plot as save_plot
def publish(src_datapath, dst_path, figure, plot_name, data_storage): def publish(src_datapath, dst_path, figure, plot_name, data_storage):
......
...@@ -11,8 +11,8 @@ Functions: ...@@ -11,8 +11,8 @@ Functions:
""" """
import warnings import warnings
from plotoptions import PlotOptions from plotid.plotoptions import PlotOptions
from tagplot_matplotlib import tagplot_matplotlib from plotid.tagplot_matplotlib import tagplot_matplotlib
def tagplot(figs, engine, prefix='', id_method='time', location='east'): def tagplot(figs, engine, prefix='', id_method='time', location='east'):
......
...@@ -8,8 +8,8 @@ Functions: ...@@ -8,8 +8,8 @@ Functions:
import matplotlib import matplotlib
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import create_id import plotid.create_id as create_id
from plotoptions import PlotOptions from plotid.plotoptions import PlotOptions
def tagplot_matplotlib(plotid_object): def tagplot_matplotlib(plotid_object):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment