Add HTML templates for dashboard, metrics, overview, and backtesting
CI / lint-test-build (push) Failing after 1m7s
CI / lint-test-build (push) Failing after 1m7s
- Introduced new HTML templates for the dashboard, metrics, overview, and backtesting functionalities. - Implemented partial templates for metrics, overview, audit, controls, and charts to enhance modularity. - Updated the Jinja2 template resolution logic to support different deployment environments. - Added a health check template to display the service status. - Included a test suite to verify the template resolution logic. - Updated `pyproject.toml` to include new HTML templates in the package data.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
from importlib import resources
|
||||
from pathlib import Path
|
||||
|
||||
from arbitrade.api import routes
|
||||
|
||||
|
||||
def test_template_directory_resolves_to_existing_location() -> None:
|
||||
template_dir = Path(routes._resolve_templates_directory())
|
||||
|
||||
assert template_dir.is_dir()
|
||||
assert (template_dir / "dashboard.html").is_file()
|
||||
|
||||
|
||||
def test_template_exists_in_package_resources() -> None:
|
||||
template_path = resources.files("arbitrade").joinpath(
|
||||
"web", "templates", "dashboard.html"
|
||||
)
|
||||
|
||||
assert template_path.is_file()
|
||||
Reference in New Issue
Block a user