src layout: move core code into src/tinyweb/ package
- Moved app.py, db.py, gateway.py, templates.py, embeddings.py, rns_client.py, and handlers/ into src/tinyweb/ - Created root app.py shim (adds src/ to sys.path, imports main) - Created pyproject.toml with setuptools config (where = ["src"]) - Added src/tinyweb/__init__.py - Updated all internal imports to use tinyweb. prefix (73 occurrences) - Removed sys.path.insert hack from conftest.py - Updated Dockerfile: pip install -e /app before running - Updated gateway.py usage message: python -m tinyweb.gateway - Updated README.md gateway usage instructions
This commit is contained in:
parent
60aa4b274a
commit
3e30678e21
35 changed files with 400 additions and 384 deletions
|
|
@ -5,15 +5,11 @@ per-test tempfile, `seeded_db` layers sample rows on top, and `csrf_session`
|
|||
primes the thread-local CSRF token that handlers read.
|
||||
"""
|
||||
import socket
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
|
||||
import db as db_module
|
||||
import handlers as handlers_module
|
||||
import tinyweb.db as db_module
|
||||
import tinyweb.handlers as handlers_module
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue