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

Adjust project structure that packaging works and unittests work as well.

parent 75dc1c36
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 #735378 passed
[MASTER]
init-hook='import sys; sys.path.append("./plotid")'
File moved
File moved
......@@ -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_"
......
File moved
File moved
File moved
......@@ -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):
......
File moved
......@@ -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'):
......
......@@ -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):
......
[build-system]
requires = ["setuptools>=42"]
requires = ["setuptools>=43", "wheel"]
build-backend = "setuptools.build_meta"
[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
[MASTER]
init-hook='import sys; sys.path.append("./src/plotid")'
......@@ -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()
......
......@@ -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):
......
......@@ -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'
......
......@@ -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'
......
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment