Repository: pylhc/sdds

Issue:
Fix local imports

Discussion:

Patch:
diff --git a/requirements.txt b/requirements.txt
index 8f1f68b..2a6cded 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,5 +3,5 @@ pytest>=3.6
 pytest-cov>=2.6
 hypothesis>=3.23.0
 travis-sphinx>=2.1.0
-Sphinx>=1.7.5
-sphinx-rtd-theme>=0.2.4
+Sphinx>=1.8.1
+sphinx-rtd-theme>=0.4.3
diff --git a/sdds/reader.py b/sdds/reader.py
index 94927cf..fcf0854 100644
--- a/sdds/reader.py
+++ b/sdds/reader.py
@@ -9,8 +9,8 @@ Read sdds files.
 """
 from typing import IO, Any, List, Optional, Generator, Dict, Union, Tuple, Callable, Type
 import numpy as np
-from classes import (SddsFile, Column, Parameter, Definition, Array, Data, Description,
-                     ENCODING, NUMTYPES, NUMTYPES_CAST, NUMTYPES_SIZES)
+from sdds.classes import (SddsFile, Column, Parameter, Definition, Array, Data, Description,
+                          ENCODING, NUMTYPES, NUMTYPES_CAST, NUMTYPES_SIZES)
 
 
 def read_sdds(file_path: str) -> SddsFile:
diff --git a/sdds/writer.py b/sdds/writer.py
index b7e0f3b..982a237 100644
--- a/sdds/writer.py
+++ b/sdds/writer.py
@@ -10,8 +10,8 @@ Write sdds files.
 """
 from typing import IO, List, Union, Iterable
 import numpy as np
-from classes import (SddsFile, Column, Parameter, Definition, Array, Data, Description,
-                     ENCODING, NUMTYPES)
+from sdds.classes import (SddsFile, Column, Parameter, Definition, Array, Data, Description,
+                          ENCODING, NUMTYPES)
 
 
 def write_sdds(sdds_file: SddsFile, output_path: str) -> None:


Test patch:
diff --git a/tests/context.py b/tests/context.py
index eb7395a..37e42ae 100644
--- a/tests/context.py
+++ b/tests/context.py
@@ -3,8 +3,4 @@ from os.path import abspath, join, dirname, pardir
 root_path = abspath(join(dirname(__file__), pardir))
 if root_path not in sys.path:
     sys.path.insert(0, root_path)
-sdds_path = join(root_path, "sdds")
-if sdds_path not in sys.path:
-    sys.path.insert(0, sdds_path)
-
 import sdds
diff --git a/tests/test_sdds.py b/tests/test_sdds.py
index e1bd2dd..5aa80f6 100644
--- a/tests/test_sdds.py
+++ b/tests/test_sdds.py
@@ -3,15 +3,15 @@ import io
 import pytest
 import numpy as np
 from . import context
-from reader import (
+from sdds.reader import (
     read_sdds,
     _gen_words,
     _get_def_as_dict,
     _read_header,
     _sort_definitions,
 )
-from writer import write_sdds, _sdds_def_as_str
-from classes import Parameter, Column, Array
+from sdds.writer import write_sdds, _sdds_def_as_str
+from sdds.classes import Parameter, Column, Array
 
 
 CURRENT_DIR = os.path.dirname(__file__)