Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically convert versioned dependencies from poetry.lock to Anaconda's meta.yaml #77

Closed
amotl opened this issue Dec 1, 2022 · 7 comments
Labels
question Further information is requested

Comments

@amotl
Copy link
Member

amotl commented Dec 1, 2022

Comment:

Hi there,

coming from a suggestion by @xylar at https://github.com/conda-forge/wetterdienst-feedstock/pull/76/files#r1034481764, I am wondering whether there is no utility program already, which assists in creating/updating the requirements section in recipe/meta.yaml, using the poetry.lock file as input.

Of course, it should adhere to the semantics outlined by @xylar in detail. Thank you very much!

Note that ^1.3 in a pyproject.toml is equivalent to >=1.3,<2.0 here in the meta.yaml (which doesn't know about ^). But versions starting with 0. are a special case so ^0.8 is the same as >=0.8,<0.9, for example.

With kind regards,
Andreas.

@amotl amotl added the question Further information is requested label Dec 1, 2022
@amotl amotl mentioned this issue Dec 1, 2022
4 tasks
@xylar
Copy link
Contributor

xylar commented Dec 1, 2022

There is a tool that does this from setup.py: https://github.com/conda-incubator/grayskull. Grayskull doesn't yet fully support pyproject.toml files, just setup.py but the PyPI version of wetterdienst has such a setup.py, it just doesn't look quite right.

I use grayskull to update the vast majority of the packages I maintain and I have a script for making that easy:
https://gist.github.com/xylar/13f003dc507f532bc065719d6e49be2f

I don't believe you would want to use poetry.lock. My understanding is that those dependencies are stricter than what is in the pyproject.toml and they wouldn't be appropriate for conda-forge.

@amotl
Copy link
Member Author

amotl commented Dec 3, 2022

Hi Xylar,

thanks for suggesting Grayskull 1, this looks excellent. Let me also add pip-tools 2, which fits into the same category of tools. Maybe both programs can be combined to create a pyproject.toml -> requirements.txt -> meta.yaml pipeline, or such?

With kind regards,
Andreas.

Footnotes

  1. https://github.com/conda-incubator/grayskull

  2. https://github.com/jazzband/pip-tools

@amotl
Copy link
Member Author

amotl commented Dec 3, 2022

Oh, here we go. -- python-poetry/poetry-plugin-export#159

@xylar
Copy link
Contributor

xylar commented Apr 27, 2023

Grayskull now fully supports pyproject.yaml. I think this problem is as solved as it can be on the conda-forge side. I don't see how poetry-plugin-export can help with conda-forge maintenance beyond what grayskull already does.

@amotl
Copy link
Member Author

amotl commented Apr 27, 2023

Excellent, thanks! Is it something we should add to an automated workflow now, or would it be a manual process to regularly convert pyproject.yml to the Conda specification file, using Grayskull?

@xylar
Copy link
Contributor

xylar commented Apr 27, 2023

I run a script with each update but I run it manually and I don't think we want to try to automate it because maintainer intervention is often required.

https://gist.github.com/xylar/13f003dc507f532bc065719d6e49be2f

@amotl
Copy link
Member Author

amotl commented Oct 6, 2023

Hi again,

I am closing this in favor of GH-103. Your support on this topic of Anaconda dependency management is true gold, @xylar. We hope you can irregularily keep up the spirit to continue supporting us here, like now where we are aiming to modernize a bit.

With kind regards,
Andreas.

@amotl amotl closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants