-
Notifications
You must be signed in to change notification settings - Fork 0
Testing Local MacOS Pipeline
First, we need to install python locally. Open up python V 3.10.12 and download the correct installer executable. Run it and finish the install.
We now need to verify pip was installed with your python download. Use the where pip command to verify that Python can find pip in its program files. This should return a local filepath if successful.
Now, we need to install poetry. We can use pip to do this:
- Enter
pip install poetryin your command line. Make sure this is successful. - Next, install the poetry dependencies by entering
poetry install
Now, we need to download the codebase from github and store it locally.
- Go to the precision feedback pipeline repo, then hit the green code menu (looks like
<> Code v) and download the whole repo as a zip file. - Extract the zip file's contents in a place you can remember (or copy/paste somewhere). !! Know where you are dropping it, you will need that filepath going forward !!
This checklist will help you run a local copy of the pipeline on your machine.
In command line where pfp_api codebase is, type the command - poetry run uvicorn main:app --reload. This will run the startup process on the pipeline on your machine, and does so with auto-redeploy on so you can make changes to the pipeline python scripts and the pipeline will update to reflect these changes once the files get saved.
Check out the Postman Workflow setup wiki here if this is your first time working with Postman. It will save you a lot of time and walk you through how to use the program. If not, make sure you have the pipeline running locally, open your postman, and start sending post requests!
-
Send a POST request to the ip address
127.0.0.1:8000/createprecisionfeedback/with details present in input_message.json using the postman app -
If you are running the pipeline locally and want to see intermediate files have the debug="yes" in the post body.
-
If you want to set export variable for the causal pathways in the pipeline, you can do so by using the command:
poetry export PATHWAYS=https://github.com/Display-Lab/knowledge-base/tree/main/causal_pathways
poetry export measures=https://raw.githubusercontent.com/Display-Lab/knowledge-base/main/measures.json
poetry export templates=https://github.com/Display-Lab/knowledge-base/tree/main/message_templatesOr you can use:
export PATHWAYS=/Users/username/knowledge-base/causal_pathways
export templates=/Users/username/knowledge-base/templates
export measures='file:///Users/username/knowledge-base/measures.json'There is an option in the current main.py that looks for a defined "debug" value in the postman request. As of 7/18/23, this means you need to go into the postman request and define a variable as debug, and set a value to "yes" or "no".