feat: add desktop packaging (pywebview + PyInstaller)
- resource_path.py: frozen/dev path resolution for bundled data files - app_desktop.py: pywebview entry point (Dash in daemon thread) - app.spec: PyInstaller onedir config with data files and hidden imports - Updated queries.py, card_browser.py, app.py to use get_resource_path() - Added pywebview + pyinstaller to project dependencies - Fixed unresolved merge conflict in .gitignore - Removed stale 01_nhs_classic.html and AdditionalAnalytics.md
This commit is contained in:
@@ -9,12 +9,11 @@ Also provides get_all_drugs() for the flat "All Drugs" card.
|
||||
|
||||
import csv
|
||||
from collections import defaultdict
|
||||
from pathlib import Path
|
||||
|
||||
from core.resource_path import get_resource_path
|
||||
from data_processing.diagnosis_lookup import SEARCH_TERM_MERGE_MAP
|
||||
|
||||
DATA_DIR = Path(__file__).resolve().parents[2] / "data"
|
||||
DIM_SEARCH_TERM_PATH = DATA_DIR / "DimSearchTerm.csv"
|
||||
DIM_SEARCH_TERM_PATH = get_resource_path("data/DimSearchTerm.csv")
|
||||
|
||||
|
||||
def build_directorate_tree() -> dict[str, dict[str, list[str]]]:
|
||||
|
||||
@@ -5,9 +5,9 @@ Resolves the database path relative to this file's location and delegates
|
||||
to the shared functions in src/data_processing/pathway_queries.py.
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from core.resource_path import get_resource_path
|
||||
from data_processing.pathway_queries import (
|
||||
load_initial_data as _load_initial_data,
|
||||
load_pathway_nodes as _load_pathway_nodes,
|
||||
@@ -33,7 +33,7 @@ from data_processing.pathway_queries import (
|
||||
get_trend_data as _get_trend_data,
|
||||
)
|
||||
|
||||
DB_PATH = Path(__file__).resolve().parents[2] / "data" / "pathways.db"
|
||||
DB_PATH = get_resource_path("data/pathways.db")
|
||||
|
||||
|
||||
def load_initial_data() -> dict:
|
||||
|
||||
Reference in New Issue
Block a user