farmOS.py available via conda / conda-forge?

Hi,

just searched and noticed, that the python API for farmOS is not available via conda-forge.
Would that be an option (additional to PyPi)?
It might help to increase the number of users, since conda is the preferred package manager on most of the windows machines.

Thanks,
Jo

2 Likes

Hey @jolau! Sounds like a good idea. I’m not familiar with conda nor Windows so I’m not 100% sure what all is involved… Looking at the “Add a recipe” docs it seems like the process involves creating a PR to the conda-forge/staged-recipes repo which will ultimately create a new repository to host a farmOS.py “feedstock” ?

…well, the PR really just consists of a meta.yaml file! This much was pretty simple so I’ve create a PR waiting for review: Add farmos package. by paul121 · Pull Request #14899 · conda-forge/staged-recipes · GitHub

This first attempt is only adding v0.2.0 of farmOS.py. Once the PR is approved I’ll try and also build the latest beta relase of farmOS.py 1.x which has initial support for the farmOS 2.x server. The automated tests seem to be working but would be great if you could test as well once it is done @jolau !!

1 Like

Is there an automated process for releasing updates? Or will this require manual work by the maintainers every time a new version is released?

I’m all for releasing on platforms beyond PyPi! But we always need to be cautious of the expectations we set in officially supporting them.

The PR was reviewed and we have a farmos-feedstock repo now!

Is there an automated process for releasing updates?

Yep things are mostly automated! Since farmOS.py is just a simple Python package, no special C compilations, dependencies, etc, it’s quite simple.

When we make new releases of farmOS.py we just need to update the version number and SHA265 hash of the release tarball from PyPi. And there’s actually a bot that should create PRs with this info when a new release is available on Pypi! (example from the fastapi-feedstock: fastapi v0.65.0 by regro-cf-autotick-bot · Pull Request #46 · conda-forge/fastapi-feedstock · GitHub)

The only gotcha is if our dependencies change, we need to change that in the meta.yaml file as well. This isn’t automated. But we only have two dependencies and relatively infrequent releases so shouldn’t be a big deal.

I just added a build for 1.0.0b1: Include build for 1.0.0b1 by paul121 · Pull Request #1 · conda-forge/farmos-feedstock · GitHub

@jolau when you get a chance, please report back how this is working!

2 Likes

Cool!

The only gotcha is if our dependencies change, we need to change that in the meta.yaml file as well. This isn’t automated.

Good to know - wonder if there’s a good place to document this… Maybe a comment in the relevant section of setup.py? So that if/when someone changes deps in the future they see the comment.

1 Like

@paul121 , awesome!!!
Just downloaded via conda and tested!
Thank you!

2 Likes