Hi @compdesigner-nz,
There are two ways. In both cases you will need an inputs.json file so let’s start with that. When you run a recipe (here annual-daylight
) through GH you will see in the folder that there is a JSON file. The JSON file stores all the inputs to the recipe. For annual-daylight
you can see the possible inputs here. Not all inputs are required, e.g., you can see that I don’t have any input for the schedule. For annual-daylight
the required inputs are model and wea.
Method 1: queenbee local run
If you type queenbee local run --help
in the cmd you get this:
To run the recipe I would execute the following command:
queenbee local run "C:\Program Files\ladybug_tools\python\Lib\site-packages\lbt_recipes\annual_daylight" . -i annual_daylight_inputs.json -w 6 -n queenbee_annual_daylight
Notice that I use a period for the project_folder argument because I am already in the folder with the input files. I now have a new folder (queenbee_annual_daylight). This folder is similar to the annual_daylight folder that was generated when I ran the recipe in GH.
You may have to run the following command first:
pip install queenbee-local -U
Method 2: pollination dsl run (I prefer this)
First you have to set an environment variable QB_POLLINATION_TOKEN
. You do this by generating an API Key on https://app.pollination.cloud/. Under settings on your profile you can generate a key.
Save the key as an environment variable called
QB_POLLINATION_TOKEN
. Check
this if you are not sure what to do. In the link the variable is called
POLLINATION_API_KEY
, but you should call it
QB_POLLINATION_TOKEN
. Once you have done this you can continue.
If you type pollination dsl run --help
in the cmd you get this:
To run the recipe I would execute the following command:
pollination dsl run annual-daylight . -i annual_daylight_inputs.json -w 6 -n pollination_annual_daylight
Notice that I left out “pollination” from the recipe name, e.g., annual-daylight
instead of pollination-annual-daylight
. Either of them works.
Once again I now have a new folder called pollination_annual_daylight
.
You may have to run the following command first:
pip install pollination-dsl -U
pip install pollination-annual-daylight -U