Spyder compatibility
This is a start at making the project more compatible with the spyder IDE and windows in general. Not ideal yet, but a starting point.
environment setup
I used the "git-bash-environment" to set up ssl configuration, then installed miniconda unchecking the "make default" option (maybe this isn't needed), then added conda to the path by adding the following to (windows home) .bashrc
export PATH="${PATH}:${HOME}/Miniconda3/Scripts"
Create a custom conda environment for this project.
# use conda for difficult-to-install-on-windows dependencies
conda create --name spyder python=3.10 fiona poetry spyder
source activate spyder
# use poetry export to generate requirements.txt file
poetry export -o requirements.txt
# install flowalert dependencies
pip install -r requirements.txt
starting spyder
# activate conda environment
source activate spyder
# open current folder as project
spyder -p .
run cli in ipython
# flowalert uses the "src" folder layout
import os
os.chdir("src")
# now "import flowalert" works
# run module with any arguments after "--"
run -d -m flowalert.cli.flowalert -- process_data
You can set code breakpoints, etc and use these debugger controls after the the "run -d" starts the process:
/cc @hschovanec
Edited by Jeremy M Fee