diff --git a/pyproject.toml b/pyproject.toml index 0572b27..d843b24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,6 @@ dependencies = [ "omegaconf>=2.3.0", "prettytable>=3.12.0", "pyqt6>=6.8.0", - "pyramid>=2.0.2", "python-dotenv>=1.0.1", "requests>=2.32.3", ] diff --git a/src/utils/__init__.py b/src/utils/__init__.py index 2a29a20..b3ef3ea 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -1,3 +1,2 @@ from .icon import Icon from .stringtodate import stringToDate -from .documentation import launch_documentation diff --git a/src/utils/documentation.py b/src/utils/documentation.py index 6a26c1c..057baaf 100644 --- a/src/utils/documentation.py +++ b/src/utils/documentation.py @@ -1,33 +1,15 @@ -from pyramid.config import Configurator -from wsgiref.simple_server import make_server -from src import docport, log import os import sys -def website(): - config = Configurator() - - # Set up static file serving from the 'site/' directory - config.add_static_view( - name="/", path=os.path.join(os.getcwd(), "site"), cache_max_age=3600 - ) - - app = config.make_wsgi_app() - return app - - -def launch_documentation(): - app = website() - server = make_server("localhost", 6543, app) - log.info("Serving MkDocs documentation on http://0.0.0.0:{}".format(docport)) +def run_mkdocs(): with open(os.devnull, "w") as devnull: old_stdout = sys.stdout old_stderr = sys.stderr sys.stdout = devnull sys.stderr = devnull try: - server.serve_forever() + os.system("mkdocs serve -q --no-livereload") finally: sys.stdout = old_stdout sys.stderr = old_stderr