diff --git a/unitgrade2/__pycache__/__init__.cpython-39.pyc b/unitgrade2/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e61f9803216fe17bf58c02cb47dd2fafcfca4760 Binary files /dev/null and b/unitgrade2/__pycache__/__init__.cpython-39.pyc differ diff --git a/unitgrade2/__pycache__/unitgrade2.cpython-39.pyc b/unitgrade2/__pycache__/unitgrade2.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7749fa08586d18f833ec0c121ea2de7810dddcd7 Binary files /dev/null and b/unitgrade2/__pycache__/unitgrade2.cpython-39.pyc differ diff --git a/unitgrade2/__pycache__/unitgrade_helpers2.cpython-39.pyc b/unitgrade2/__pycache__/unitgrade_helpers2.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f76b1e44bc92fcfc6082874dee8386d27b696f12 Binary files /dev/null and b/unitgrade2/__pycache__/unitgrade_helpers2.cpython-39.pyc differ diff --git a/unitgrade2/__pycache__/version.cpython-39.pyc b/unitgrade2/__pycache__/version.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..613bef2848d43d5e78803c81d3d366c27a5e2c62 Binary files /dev/null and b/unitgrade2/__pycache__/version.cpython-39.pyc differ diff --git a/unitgrade2/unitgrade2.py b/unitgrade2/unitgrade2.py index 95b071c1146b8c9a20558db65599ec262c09363c..35c3db7779d60a49304eb17429e5b227834ca4e0 100644 --- a/unitgrade2/unitgrade2.py +++ b/unitgrade2/unitgrade2.py @@ -2,20 +2,19 @@ git add . && git commit -m "Options" && git push && pip install git+ssh://git@gitlab.compute.dtu.dk/tuhe/unitgrade.git --upgrade """ -from . import cache_read +# from . import cache_read import unittest import numpy as np -import os import sys from io import StringIO import collections -import inspect import re import threading import tqdm import time import pickle import itertools +import os myround = lambda x: np.round(x) # required. msum = lambda x: sum(x) @@ -302,6 +301,15 @@ class Report(): def _file(self): return inspect.getfile(type(self)) + def _import_base_relative(self): + a ="234" + b = "234" + root_dir = self.pack_imports[0].__path__._path[0] + root_dir = os.path.dirname(root_dir) + relative_path = os.path.relpath(self._file(), root_dir) + return root_dir, relative_path + + def __init__(self, strict=False, payload=None): working_directory = os.path.abspath(os.path.dirname(self._file()))