From 2464355b53f36fdcb95376bdedfab1acd6a24aa6 Mon Sep 17 00:00:00 2001 From: Auguste Baum Date: Wed, 17 Jul 2024 17:26:38 +0200 Subject: [PATCH 1/3] docs: update readme --- README.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e6c4f757..108d7c37 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,9 @@ ![lint and test](https://github.com/probabl-ai/mandr/actions/workflows/lint-and-test.yml/badge.svg) -Service to send data into, install via - -``` -python -m pip install -e -python -m pip install flask diskcache pandas altair -``` +A service to send data into. +## Example ```python from mandr import InfoMander @@ -21,16 +17,19 @@ mander.add_templates(...) mander.add_views(...) ``` -When ready to view, run flask: +## Development -``` -python -m flask --app mandr.app run --reload +Install dependencies with +```sh +make install ``` -## Dependencies +You can run the API server with +```sh +make serve-api +``` -When dependencies are changed in `pyproject.toml` the lockfiles should be updated by running [`pip-compile`](https://github.com/jazzband/pip-tools): +When dependencies are changed in `pyproject.toml` the lockfiles should be updated via [`pip-compile`](https://github.com/jazzband/pip-tools): ```sh -pip-compile --output-file=requirements.txt pyproject.toml -pip-compile --extra=test --output-file=requirements-test.txt pyproject.toml +make pip-compile ``` From 7e345adbd3033fd3f7fe38d3eebde569092a5543 Mon Sep 17 00:00:00 2001 From: Auguste Baum Date: Thu, 18 Jul 2024 11:43:37 +0200 Subject: [PATCH 2/3] chore: update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0482e0b9..15103b43 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ check-wip: python -m pytest tests serve-api: - MANDR_ROOT=.datamander MANDR_PATH=probabl-ai python -m uvicorn mandr.dashboard.webapp:app --reload --reload-dir ./src --host 0.0.0.0 --timeout-graceful-shutdown 0 + MANDR_ROOT=.datamander python -m uvicorn mandr.dashboard.webapp:app --reload --reload-dir ./src --host 0.0.0.0 --timeout-graceful-shutdown 0 build-frontend: # build the SPA From 8bcd7efa4e51d8a26183ef035ac7019a88c570b0 Mon Sep 17 00:00:00 2001 From: Auguste Baum Date: Thu, 18 Jul 2024 11:45:14 +0200 Subject: [PATCH 3/3] chore: remove legacy webapp --- src/mandr/templates/page.html | 22 -------- src/mandr/templates/partials/artifacts.html | 17 ------- src/mandr/templates/partials/info.html | 53 -------------------- src/mandr/templates/partials/logs.html | 24 --------- src/mandr/templates/partials/nav-bottom.html | 0 src/mandr/templates/partials/nav-mid.html | 17 ------- src/mandr/templates/partials/nav-top.html | 36 ------------- src/mandr/templates/partials/views.html | 24 --------- src/mandr/templates/sketchpad.html | 46 ----------------- 9 files changed, 239 deletions(-) delete mode 100644 src/mandr/templates/page.html delete mode 100644 src/mandr/templates/partials/artifacts.html delete mode 100644 src/mandr/templates/partials/info.html delete mode 100644 src/mandr/templates/partials/logs.html delete mode 100644 src/mandr/templates/partials/nav-bottom.html delete mode 100644 src/mandr/templates/partials/nav-mid.html delete mode 100644 src/mandr/templates/partials/nav-top.html delete mode 100644 src/mandr/templates/partials/views.html delete mode 100644 src/mandr/templates/sketchpad.html diff --git a/src/mandr/templates/page.html b/src/mandr/templates/page.html deleted file mode 100644 index 3d5693a2..00000000 --- a/src/mandr/templates/page.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - My Website - - - - - - - - - -
-
- {{body}} -
-
- - diff --git a/src/mandr/templates/partials/artifacts.html b/src/mandr/templates/partials/artifacts.html deleted file mode 100644 index 1686687d..00000000 --- a/src/mandr/templates/partials/artifacts.html +++ /dev/null @@ -1,17 +0,0 @@ -{% if artifacts | length == 0 %} -

This path has no artifacts attached.

-{% endif %} - -{% if artifacts | length > 0 %} -
- -
-{% endif %} diff --git a/src/mandr/templates/partials/info.html b/src/mandr/templates/partials/info.html deleted file mode 100644 index ff3c79b8..00000000 --- a/src/mandr/templates/partials/info.html +++ /dev/null @@ -1,53 +0,0 @@ -
-
- -
-
- - -
-
-
- -
-
-
-
- -
diff --git a/src/mandr/templates/partials/logs.html b/src/mandr/templates/partials/logs.html deleted file mode 100644 index 9e94c56e..00000000 --- a/src/mandr/templates/partials/logs.html +++ /dev/null @@ -1,24 +0,0 @@ -{% if logs | length == 0 %} -

This path has no rendered logs attached.

-{% endif %} - -{% if logs | length > 0 %} -
- -
- {% for name, html in logs %} -
-
{{html}}
-
- {% endfor %} -
-
-{% endif %} diff --git a/src/mandr/templates/partials/nav-bottom.html b/src/mandr/templates/partials/nav-bottom.html deleted file mode 100644 index e69de29b..00000000 diff --git a/src/mandr/templates/partials/nav-mid.html b/src/mandr/templates/partials/nav-mid.html deleted file mode 100644 index e8626edb..00000000 --- a/src/mandr/templates/partials/nav-mid.html +++ /dev/null @@ -1,17 +0,0 @@ -
-
-
- -
-
-
-
- -
- -
diff --git a/src/mandr/templates/partials/nav-top.html b/src/mandr/templates/partials/nav-top.html deleted file mode 100644 index 0016fe6f..00000000 --- a/src/mandr/templates/partials/nav-top.html +++ /dev/null @@ -1,36 +0,0 @@ -
-
- - -
-
diff --git a/src/mandr/templates/partials/views.html b/src/mandr/templates/partials/views.html deleted file mode 100644 index 06795772..00000000 --- a/src/mandr/templates/partials/views.html +++ /dev/null @@ -1,24 +0,0 @@ -{% if views | length == 0 %} -

This path has no rendered views attached.

-{% endif %} - -{% if views | length > 0 %} -
- -
- {% for name, html in views %} -
- {{html|safe}} -
- {% endfor %} -
-
-{% endif %} diff --git a/src/mandr/templates/sketchpad.html b/src/mandr/templates/sketchpad.html deleted file mode 100644 index 7c79706d..00000000 --- a/src/mandr/templates/sketchpad.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - Template Sketchpad - - - - - - - - - - -
-
-

Template Sketchpad

- The template can be edited on the right and will be live updated. -
-
-
- {% for child in children %}
- {{child}} - {% endfor %} -

Template

- -
- -
-
-

Rendered output

-
-
-
-
-

-
-
-
-
-
- -