update
This commit is contained in:
@@ -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",
|
||||
]
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
from .icon import Icon
|
||||
from .stringtodate import stringToDate
|
||||
from .documentation import launch_documentation
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user