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

What is the best workflow for developing python packages and publishing via Conda? #5058

Closed
2 tasks done
jacksonwb opened this issue Nov 7, 2023 · 2 comments
Closed
2 tasks done
Labels
locked [bot] locked due to inactivity source::community catch-all for issues filed by community members stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::support neither a bug nor feature, is really just a user having questions or difficulty somewhere

Comments

@jacksonwb
Copy link

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

I'm trying to understand the most ergonomic way to develop a python package for the conda ecosystem and wanted to get a better understanding of the workflows that people use.

Having done plenty of development in the pypi / pip ecosystem, the pattern I am familiar with is:

  • define a pyproject.toml package definition
  • install the package in development mode
  • build the package

This flow allows a single place where dependencies are defined, and makes development easy as builds are not needed when only editing python files in the source tree to test in an env.

What is the equivalent flow when packaging with conda. As best I can tell there are no natural ways to do this. conda develop doesn't seem like a viable option and a number of other tools in this area seem to fragile. The only similar flow I can think of is:

  • Define a pyproject.toml and follow the above flow for development
  • Then create a meta.yaml conda package and manually find the conda equivalent of the deps
  • Build the package

Is this how people are developing with conda? Are there tools to automate the dep mapping / duplication?
Are there better patterns I am missing?

Apologies if this is the wrong place for this discourse. Happy to post elsewhere.

Why is this needed?

I am sure that there are others with similar confusion and this discourse will help the community.

What should happen?

No response

Additional Context

No response

@jacksonwb jacksonwb added the type::feature request for a new feature or capability label Nov 7, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Nov 7, 2023
@travishathaway travishathaway added type::support neither a bug nor feature, is really just a user having questions or difficulty somewhere source::community catch-all for issues filed by community members and removed type::feature request for a new feature or capability labels Nov 7, 2023
@travishathaway
Copy link
Contributor

Hi @jacksonwb,

Thanks for asking this question. Just FYI, we also have a Discourse server that you could post such topics too, but this is also an appropriate place for it as it is related to the conda build project.

The workflow you define is more or less the correct way to develop a Python package for the conda ecosystem. We do have a tool available for automatically generating recipes from PyPI projects. It's called Grayskull. From my own personal experience, Grayskull gets you about 95% of the way there when dealing with a pure Python dependency (i.e. Python packages that have no C, C++, etc. dependencies).

If you want to see a wide variety of community contributed packages, I would recommend checking out conda-forge. Conda-forge also has a nice guide for contributing packages where you can learn more: https://conda-forge.org/docs/maintainer/adding_pkgs.html

Some of the things mentioned in the conda-forge documentation is specific to their package host architecture, but there are also many things mentioned there that apply to all conda packages.

With that being said, there are currently those in the community who are aiming to provide a workflow that only requires a single file. That is being done in the Pixi project. While support for this feature doesn't currently exist, I do know that it is on their roadmap, so keep an eye on that project too.

Hope this was helpful.

Copy link

github-actions bot commented Feb 6, 2024

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Feb 6, 2024
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Feb 27, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2024
@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in 🧭 Planning Feb 27, 2024
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Aug 25, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity source::community catch-all for issues filed by community members stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::support neither a bug nor feature, is really just a user having questions or difficulty somewhere
Projects
Archived in project
Development

No branches or pull requests

2 participants