From 16f91b8d25141d3efc120bdf3dc20e0d9041cb71 Mon Sep 17 00:00:00 2001 From: "matthias@arch" Date: Sun, 27 Nov 2022 23:01:30 +0100 Subject: [PATCH] changed import names --- regina/__init__.py | 4 +++- regina/db_operation/__init__.py | 1 + regina/db_operation/database.py | 1 - regina/main.py | 4 ++-- setup.py | 6 +++--- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/regina/__init__.py b/regina/__init__.py index 9d718fe..611bd1e 100644 --- a/regina/__init__.py +++ b/regina/__init__.py @@ -1,5 +1,7 @@ """Gather analytics from nginx access logs and visualize them through generated images and a generated html""" # __package__ = 'regina' -from db_operation import database, visualize, collect +# from db_operation import database, visualize, collect +import regina.db_operation +import regina.utility print("running __init__.py") diff --git a/regina/db_operation/__init__.py b/regina/db_operation/__init__.py index a694da7..48f4e1a 100644 --- a/regina/db_operation/__init__.py +++ b/regina/db_operation/__init__.py @@ -1,2 +1,3 @@ """Gather analytics from nginx access logs and visualize them through generated images and a generated html""" # __package__ = 'regina' +import regina.utility diff --git a/regina/db_operation/database.py b/regina/db_operation/database.py index 3cdd830..0819a8f 100644 --- a/regina/db_operation/database.py +++ b/regina/db_operation/database.py @@ -6,7 +6,6 @@ from os import path, listdir from utility.sql_util import sanitize, sql_select, sql_exists, sql_insert, sql_tablesize from utility.utility import pdebug - """ create reginas database as shown in the uml diagram database.uxf """ diff --git a/regina/main.py b/regina/main.py index 810e5cd..fc0d744 100644 --- a/regina/main.py +++ b/regina/main.py @@ -3,10 +3,10 @@ # __package__="." from sys import argv, exit from os.path import isfile -from db_operation.visualize import visualize -from utility.settings_manager import read_settings_file from db_operation.collect import parse_log, add_requests_to_db from db_operation.database import create_db +from db_operation.visualize import visualize +from utility.settings_manager import read_settings_file from utility.globals import settings, version """ diff --git a/setup.py b/setup.py index 3c075a7..6cd0f63 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -from setuptools import setup +from setuptools import setup, find_packages setup( name="regina", @@ -12,7 +12,7 @@ setup( license="GPLv3", - packages=["regina"], + packages=find_packages(), install_requires=[], python_requires='>=3.10', @@ -26,6 +26,6 @@ setup( # scripts=["bin/nicole"], entry_points={ - "console_scripts": [ "regina=regina.regina:main" ], + "console_scripts": [ "regina=regina.main:main" ], }, )