diff --git a/.gitignore b/.gitignore index 5c52626..c80ac6a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ *.pyc old/ env/ - +# Generated by poetry +requirements.txt # For Pycharm .idea .envrc diff --git a/README.md b/README.md index 6345ac8..3970487 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,18 @@ If you want to run bulk queries for stock analysis, check out the [Rule 1 Stock This repository contains a script to iteratively issue a bulk fetch and populate a MySQL database with the results. It also includes some predefined SQL queries for convenience. +## Install dependencies + +### Poetry + +On windows: + +1. Install `pipx` with `py -m pip install --user pipx`. +2. Go to the path in "WARNING: The script pipx.exe is installed in `\AppData\Roaming\Python\Python3x\Scripts` which is not on "PATH". Once in this path execute: `.\pipx.exe ensurepath` +3. Install poetry with: `pipx install poetry` +4. In the repo path for IsThisStockGood, run `poetry install` +5. Install the `export` command addon: `poetry self add poetry-plugin-export` + ## Running the site locally. 1. Clone the repo. diff --git a/deploy.sh b/deploy.sh index 27b8489..27870ae 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,3 +1,4 @@ #!/bin/bash +poetry export --without-hashes -f requirements.txt -o requirements.txt gcloud app deploy app.yaml diff --git a/main.py b/main.py index b10e2d1..33f00ff 100644 --- a/main.py +++ b/main.py @@ -1,7 +1,8 @@ from isthisstockgood.DataFetcher import fetchDataForTickerSymbol from isthisstockgood.server import create_app +# Expose `app` object at the module level, as expected by App Engine +app = create_app(fetchDataForTickerSymbol) if __name__ == '__main__': - app = create_app(fetchDataForTickerSymbol) app.run(host='127.0.0.1', port=8080, debug=True)