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

docs: Python Tutorial: Dependencies, PyPI, Order, Grammar #1313

Merged
merged 4 commits into from
May 2, 2024

Conversation

JesperDramsch
Copy link
Contributor

I was searching the documentation for a way to install optional dependencies from PyPI using pixi and got helped on the Discord.

I figured the Python tutorial is the most straightforward place to add this, while the functionality is still being developed.

I have taken this chance to slightly adjust the flow of the tutorial and used Grammarly Premium to work through the grammar and sprinkle in some commas.

I was searching the documentation for a way to install optional dependencies from PyPI using pixi and got helped on the Discord.

I figured the Python tutorial is the most straightforward place to add this, while the functionality is still being developed.

I have taken this chance to slightly adjust the flow of the tutorial and used Grammarly Premium to work through the grammar and sprinkle in some commas.

## pixi.toml and pyproject.toml
We support two manifests formats, `pyproject.toml` and `pixi.toml`. In this tutorial we will use the `pyproject.toml` format. Because it is the most common format for python projects.
Pixi builds upon the conda ecosystem, which allows you to create a Python environment with all the dependencies you need. This is especially useful when you are working with multiple Python interpreters and bindings to C and C++ libraries. Let's give it a go! For example, GDAL from PyPI does not have binary C dependencies, but the condom package does. However, some packages are only available through PyPI, which is why we can explicitly add those as a fallback to be solved together by pixi.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What package does? 😨

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite a few honestly.

My employer for example almost exclusively publishes them on PyPI so far. The framework my website uses (Nikola) only has a "community package on conda" last updated over a year ago and the recommended install is pip. In my world most people try to use pip first before conda and because of some clunkiness around conda itself (despite mamba) steered away from using conda.

But I'm definitely not an expert on this. Just my limited experience.

Copy link
Contributor

@tdejager tdejager May 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed from this comment that it say "condom" package, I think it should be "conda" 😃

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh lord. That's embarrassing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JesperDramsch, yeah I got the sentence as it is the hard truth we have to concur with pixi. I was indeed joking on the name 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ruben-arts heh, I'm too autistic to catch that sorry 😅

docs: reformat and extend python tutorial
@ruben-arts
Copy link
Contributor

He @JesperDramsch, Thanks for helping us improve the tutorial. I gave it another pass. The amount of line changes in my commit have to do with that I like the "single sentence per line" principle. Which wasn't used in the tutorial yet.

@JesperDramsch
Copy link
Contributor Author

Thanks for the follow up @ruben-arts those single-line changes make absolute sense to me. I wasn't sure if I should change them all, as that would've been an artificially huge PR from a newcomer, so glad you took those on.

@tdejager
Copy link
Contributor

tdejager commented May 2, 2024

LGTM and @ruben-arts will merge!

@tdejager tdejager enabled auto-merge (squash) May 2, 2024 07:39
@ruben-arts ruben-arts disabled auto-merge May 2, 2024 07:45
@ruben-arts ruben-arts merged commit 4212e3e into prefix-dev:main May 2, 2024
5 checks passed
@JesperDramsch JesperDramsch deleted the patch-1 branch May 2, 2024 14:35
@JesperDramsch
Copy link
Contributor Author

Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants