Pushing Recipe's to pollination

So I am almost at the stage where I would like to push a recipe and see how it works, and get an idea and feel for what can be improved, before moving to more complicated connected workflows.

This post has the section deployment which is what I am reading and talking about here.

I will say up front I am new to git and gitlab, and it sounds like a similarity can be drawn between it and pushing to pollination, but bear with me if I am not understanding the content correctly.

pollination dsl push pollination-daylight-factor -e https://api.pollination.cloud -src 
https://api.pollination.cloud/registries --push-dependencies

When we push ‘pollination-daylight-factor’ what am I referencing here? I don’t see a file or function with that name, so maybe its what we are naming it when pushing? and how do I do this process? CD to the working directory and perform the command there?

Thanks in advance,
Darren

The post lacks enough information about how the deployment really works! Let me try to make up for it here and we can copy some of this text to the wiki post later.

As I explained in the post pollination-dsl is allowing you to interact with Queenbee using Python. We do that both for writing the plugins and recipes as well as deploying the packages. That means that we use pip to package Pollination recipes and plugins as Python packages.

In the case of daylight-factor recipe the recipe is installed as a Python package in the Python environment using pip install - the pollination dsl push command uses the recipe name (i.e. pollination-daylight-factor) to find it in the local Python environment. If it can’t find it there, it tries to pull it down from PyPI - this will only work for public recipes - and finally if it can’t find it in any of the two resources it throws an error.

Now in your case, after you develop the recipe you need to install the package locally using pip install . from inside the folder where setup.py is.

After that you should be able to see the package info using pip show <package-name>. If this command finds your package it means that pollination dsl can also find your package and push it to Pollination.

Hope it helps! I understand this needs a bit of understanding of the Python packaging system and I will be happy to help you with the first one. Once you do it for the first time it should be easier to do it for the next recipe.

1 Like

Ah, ok that makes sense to me now, thank you again @Mostapha !

A post was split to a new topic: Is there a recipe for Annual Loads Simulation