Repository: wilhelmagren/gromp (language: python)

Issue:
Current release is broken, "no module named 'gromp.endpoint'"
When installing through PyPI and attempting to import gromp you get the following traceback:
```
Python 3.10.7 (main, Nov 24 2022, 19:45:47) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gromp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/juice/.local/lib/python3.10/site-packages/gromp/__init__.py", line 28, in <module>
    from gromp.endpoint import *
ModuleNotFoundError: No module named 'gromp.endpoint'
```

I suspect this has to do with how submodules are imported, relative to `__init__.py` files. A fix is on the way in a PR.

Otherwise, what could be the problem? Everything works locally and running unittests work...



Discussion / hints:

Fix patch:
diff --git a/gromp/__init__.py b/gromp/__init__.py
index a33bff9..3637ce4 100644
--- a/gromp/__init__.py
+++ b/gromp/__init__.py
@@ -22,13 +22,13 @@
 SOFTWARE.
 
 File created: 2023-01-23
-Last updated: 2023-02-06
+Last updated: 2023-02-13
 """
 
-from gromp.endpoint import *
-from gromp.handler import *
-from gromp.hook import *
-from gromp.url import *
+from gromp import endpoint
+from gromp import handler
+from gromp import hook
+from gromp import url
 from gromp.utils import *
 
 # Create logger and set up configuration
diff --git a/gromp/endpoint/__init__.py b/gromp/endpoint/__init__.py
index 38b442d..f337d56 100644
--- a/gromp/endpoint/__init__.py
+++ b/gromp/endpoint/__init__.py
@@ -22,9 +22,9 @@
 SOFTWARE.
 
 File created: 2023-02-05
-Last updated: 2023-02-05
+Last updated: 2023-02-13
 """
 
 from gromp.endpoint.base import NamedEndpoint
-from gromp.endpoint.league import *
+from gromp.endpoint import league
 
diff --git a/gromp/hook/__init__.py b/gromp/hook/__init__.py
index 43b20da..1c1a144 100644
--- a/gromp/hook/__init__.py
+++ b/gromp/hook/__init__.py
@@ -22,9 +22,9 @@
 SOFTWARE.
 
 File created: 2023-01-23
-Last updated: 2023-02-05
+Last updated: 2023-02-13
 """
 
-from .base import Hook
-from .league import League
+from gromp.hook.base import Hook
+from gromp.hook.league import League
 
diff --git a/gromp/url/__init__.py b/gromp/url/__init__.py
index e8fe07d..bc6f013 100644
--- a/gromp/url/__init__.py
+++ b/gromp/url/__init__.py
@@ -22,9 +22,9 @@
 SOFTWARE.
 
 File created: 2023-02-05
-Last updated: 2023-02-05
+Last updated: 2023-02-13
 """
 
 from gromp.url.base import Url, LeagueUrl
-from gromp.url.league import *
+from gromp.url import league
 


Test patch:
diff --git a/tests/__init__.py b/tests/__init__.py
index 8bae52a..6c0c1cc 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -11,7 +11,7 @@
 console_handler.setLevel(logging.DEBUG)
 
 formatter = logging.Formatter(
-    '[%(asctime)s] [%(name)s]\t[%(levelname)s] %(message)s'
+    '[%(asctime)s] [%(name)s] [%(levelname)s\t] %(message)s'
 )
 
 console_handler.setFormatter(formatter)
diff --git a/tests/hook/__init__.py b/tests/hook/__init__.py
index ff6479e..105cfa8 100644
--- a/tests/hook/__init__.py
+++ b/tests/hook/__init__.py
@@ -8,7 +8,7 @@
 console_handler.setLevel(logging.DEBUG)
 
 formatter = logging.Formatter(
-    '[%(asctime)s] [%(name)s]\t[%(levelname)s] %(message)s'
+    '[%(asctime)s] [%(name)s] [%(levelname)s\t] %(message)s'
 )
 
 console_handler.setFormatter(formatter)