diff --git a/plotid/.pylintrc b/plotid/.pylintrc new file mode 100644 index 0000000000000000000000000000000000000000..e50585eeb013f7809be10e3ccedd74d9608785a1 --- /dev/null +++ b/plotid/.pylintrc @@ -0,0 +1,2 @@ +[MASTER] +init-hook='import sys; sys.path.append("./plotid")' diff --git a/src/plotid/__init__.py b/plotid/__init__.py similarity index 100% rename from src/plotid/__init__.py rename to plotid/__init__.py diff --git a/src/plotid/create_id.py b/plotid/create_id.py similarity index 100% rename from src/plotid/create_id.py rename to plotid/create_id.py diff --git a/src/plotid/example.py b/plotid/example.py similarity index 94% rename from src/plotid/example.py rename to plotid/example.py index 5187d2b76f5ec6a546d1ff2bf6237f28b9482f58..fcf7713916dc9ffc92ff7b9508f8b2d8778dcb7a 100644 --- a/src/plotid/example.py +++ b/plotid/example.py @@ -11,8 +11,8 @@ the function publish. import numpy as np # import h5py as h5 import matplotlib.pyplot as plt -from src.plotid.tagplot import tagplot -from src.plotid.publish import publish +from plotid.tagplot import tagplot +from plotid.publish import publish # %% Set Project ID PROJECT_ID = "MR04_" diff --git a/src/plotid/filecompare.py b/plotid/filecompare.py similarity index 100% rename from src/plotid/filecompare.py rename to plotid/filecompare.py diff --git a/src/plotid/hdf5_external_link.py b/plotid/hdf5_external_link.py similarity index 100% rename from src/plotid/hdf5_external_link.py rename to plotid/hdf5_external_link.py diff --git a/src/plotid/plotoptions.py b/plotid/plotoptions.py similarity index 100% rename from src/plotid/plotoptions.py rename to plotid/plotoptions.py diff --git a/src/plotid/publish.py b/plotid/publish.py similarity index 98% rename from src/plotid/publish.py rename to plotid/publish.py index f7a59e40083e6fd048e4d02bce36af8d14f21546..e2b43c5d1fc089fc5ade31eee6aa53b4584c2d1f 100644 --- a/src/plotid/publish.py +++ b/plotid/publish.py @@ -15,7 +15,7 @@ import os import shutil import sys import warnings -from src.plotid.save_plot import save_plot +from plotid.save_plot import save_plot def publish(src_datapath, dst_path, figure, plot_name, data_storage): diff --git a/src/plotid/save_plot.py b/plotid/save_plot.py similarity index 100% rename from src/plotid/save_plot.py rename to plotid/save_plot.py diff --git a/src/plotid/tagplot.py b/plotid/tagplot.py similarity index 96% rename from src/plotid/tagplot.py rename to plotid/tagplot.py index 429a1e7fe57409204ca603898ff0f139e0315093..695d2b143d12ba3c47eafc592d836806d3559d22 100644 --- a/src/plotid/tagplot.py +++ b/plotid/tagplot.py @@ -11,8 +11,8 @@ Functions: """ import warnings -from src.plotid.plotoptions import PlotOptions -from src.plotid.tagplot_matplotlib import tagplot_matplotlib +from plotid.plotoptions import PlotOptions +from 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/plotid/tagplot_matplotlib.py similarity index 95% rename from src/plotid/tagplot_matplotlib.py rename to plotid/tagplot_matplotlib.py index 1b1ba9adc97ae2fc4d3eb314dbce009cae2ba673..b67acfcf8bfb8205a107ae94f36138f7825009fe 100644 --- a/src/plotid/tagplot_matplotlib.py +++ b/plotid/tagplot_matplotlib.py @@ -8,8 +8,8 @@ Functions: import matplotlib import matplotlib.pyplot as plt -import src.plotid.create_id as create_id -from src.plotid.plotoptions import PlotOptions +import plotid.create_id as create_id +from plotid.plotoptions import PlotOptions def tagplot_matplotlib(plotid_object): diff --git a/pyproject.toml b/pyproject.toml index d7e840034ed50460658669893359af8536606f5b..b519f7854682b15071afddae1cb25b862aa48f2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["setuptools>=42"] +requires = ["setuptools>=43", "wheel"] build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg index c63491b25fa9e9ab95107908c365c8e1523d9c89..1e0b8b5399dc1d44fd9648169dbfce360954973b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = example-package-plotid-test -version = 0.0.2 +version = 0.0.3 author = Example Author author_email = author@example.com description = A small example package @@ -16,9 +16,16 @@ classifiers = [options] package_dir = - = src + = plotid packages = find: python_requires = >=3.10 +install_requires = + matplotlib + numpy + +[options.extras_require] +test = + coverage [options.packages.find] -where = src +where = plotid diff --git a/src/plotid/.pylintrc b/src/plotid/.pylintrc deleted file mode 100644 index 0b39a7bbb506aa7953d4a46ba3f69c1f06e98631..0000000000000000000000000000000000000000 --- a/src/plotid/.pylintrc +++ /dev/null @@ -1,2 +0,0 @@ -[MASTER] -init-hook='import sys; sys.path.append("./src/plotid")' diff --git a/tests/runner_tests.py b/tests/runner_tests.py index 613dde132f8d03b502c6042cb6281abecc265270..de973b1e9d01e9c67946cb520ee063c7a59cd660 100644 --- a/tests/runner_tests.py +++ b/tests/runner_tests.py @@ -10,7 +10,7 @@ import os import unittest import coverage -path = os.path.abspath('src/plotid') +path = os.path.abspath('plotid') sys.path.append(path) cov = coverage.Coverage() diff --git a/tests/test_create_id.py b/tests/test_create_id.py index 0310ca471786ad3dc9103bacc593d8ccd081ea87..589405785640b5cd8ba74f69b9c8245ddfb92190 100644 --- a/tests/test_create_id.py +++ b/tests/test_create_id.py @@ -5,7 +5,7 @@ Unittests for CreateID """ import unittest -import src.plotid.create_id as cid +import plotid.create_id as cid class TestCreateID(unittest.TestCase): diff --git a/tests/test_publish.py b/tests/test_publish.py index f157600208776dade4851fe194c4e0b0b68e60e3..d09b7419f1793f9bae0a47788ebc06a1b1b60c74 100644 --- a/tests/test_publish.py +++ b/tests/test_publish.py @@ -10,7 +10,7 @@ import sys import shutil from unittest.mock import patch import matplotlib.pyplot as plt -from src.plotid.publish import publish +from plotid.publish import publish SRC_DIR = 'test_src_folder' diff --git a/tests/test_save_plot.py b/tests/test_save_plot.py index 14b8dee05e088d5bc93558f3268931d953a5e163..0f28ae73c00ffffc2deb9d178ea277b2a8730667 100644 --- a/tests/test_save_plot.py +++ b/tests/test_save_plot.py @@ -7,7 +7,7 @@ Unittests for save_plot import os import unittest import matplotlib.pyplot as plt -from src.plotid.save_plot import save_plot +from plotid.save_plot import save_plot FIGURE = plt.figure() PLOT_NAME = 'PLOT_NAME' diff --git a/tests/test_tagplot_matplotlib.py b/tests/test_tagplot_matplotlib.py index 78e3d14425efd28680ef4068cc2e4a7f9e82db88..8f81b6f742b3c6f0b8d176341a9e643afec44f8e 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 src.plotid.tagplot_matplotlib import tagplot_matplotlib -from src.plotid.plotoptions import PlotOptions +from plotid.tagplot_matplotlib import tagplot_matplotlib +from plotid.plotoptions import PlotOptions FIG1 = plt.figure()