Skip to content
Snippets Groups Projects
Commit dc3245dd authored by tuhe's avatar tuhe
Browse files

updates

parent 0eb4f293
No related branches found
No related tags found
No related merge requests found
File added
File added
File added
File added
...@@ -2,20 +2,19 @@ ...@@ -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 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 unittest
import numpy as np import numpy as np
import os
import sys import sys
from io import StringIO from io import StringIO
import collections import collections
import inspect
import re import re
import threading import threading
import tqdm import tqdm
import time import time
import pickle import pickle
import itertools import itertools
import os
myround = lambda x: np.round(x) # required. myround = lambda x: np.round(x) # required.
msum = lambda x: sum(x) msum = lambda x: sum(x)
...@@ -302,6 +301,15 @@ class Report(): ...@@ -302,6 +301,15 @@ class Report():
def _file(self): def _file(self):
return inspect.getfile(type(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): def __init__(self, strict=False, payload=None):
working_directory = os.path.abspath(os.path.dirname(self._file())) working_directory = os.path.abspath(os.path.dirname(self._file()))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment