From 9fb2bb26915d229f1bbfb69cc86d187475b6bbf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20Luginb=C3=BChl?= Date: Fri, 3 May 2024 14:41:05 +0200 Subject: [PATCH] consolidate requirements.txt --- README.md | 45 ++++++++++++++++++++++++++++++--------------- requirements.txt | Bin 496 -> 52 bytes 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index ae8e27e..f911980 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,36 @@ > This project is in a very early development stage. While it will be used by me in a smart mirror project, > it is also my learning ground for Python. +# How to run +## Virtual Environment +### On Windows: +```shell +venv\bin\activate` +``` +### On MacOS / Linux: +```shell +source venv/bin/activate` +``` + +### General +```shell +pip install -e . +``` + +## Testing +While in the root of this repo, simply type `pytest` to run all the tests. Alternatively, if that does not work, +try `pytest-3`. + +## Development mode Windows +To run, either start directly from your preferred editor, or, if you have Flask installed, type +```shell +flask --app happyMirror run --debug +``` + +## Production mode +Make sure, waitress is installed. On Linux, you can do so by typing `sudo apt install python3-waitress` +Then run `waitress-serve --call 'HappyMirror:create_app'` + # Developing widgets There a few sample widgets already included. On each page reload, each widgets `render()` method is called and a dictionary of type`RenderResult` is expected. Structure your module like so: @@ -30,19 +60,4 @@ class Renderer(BaseRenderer): If your widget uses custom routes, eg. to display an image, you can do so by implementing `render.BaseRenderer.register_custom_routes` An example of how to do that can be found in the example widget 'simple_image'. -# How to run -## Testing -While in the root of this repo, simply type `pytest` to run all the tests. Alternatively, if that does not work, -try `pytest-3`. - -## Development mode Windows -Get all you need by typing `pip install -e .`, then run the application directly from VSCode. -To run, either start directly from your preferred editor, or, if you have Flask installed, type -```shell -flask --app happyMirror run --debug -``` - -## Production mode -Make sure, waitress is installed. On Linux, you can do so by typing `sudo apt install python3-waitress` -Then run `waitress-serve --call 'HappyMirror:create_app'` diff --git a/requirements.txt b/requirements.txt index 01e9268737805a07db24a990d51f954c213953ac..b6c4f3a4dfd546776ba7e0d4d5c120fd145e7ae1 100644 GIT binary patch literal 52 zcmZ?ENi5E`wKdi=&@<)=N-Zo+EiNgxwKdW+HqFT$95ATgq{Sx*XP>idRc0( zN=NOqR-;!wg@&5)MtathR$f2j+3-wHC`n@+$zQm>mFYj>K5GE4=GTFm(f@jONr%1k z&o*^MwsB|FBRhySy++B-F~CwMnuA{a%Q_ry3O6R;$Z^&)+qj$b