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

chore: prepare for release 0.1.4 #107

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

mesejo
Copy link
Collaborator

@mesejo mesejo commented Jun 26, 2024

Letsql use maturin as the build-backend. To handle our dependencies, we use poetry. Currently and in the future, maturin does not recognize the dependencies specified by poetry. See this issue:

PyO3/maturin#632

It also does not provide an alternative way to support dynamic dependencies. The following issue is still open.

PyO3/maturin#1537

On the other side, poetry will support PEP-621 project style dependencies in version 2.0

python-poetry/poetry#3332

Therefore, one simple solution is to duplicate the dependencies section, as in the package:

https://github.com/tmtenbrink/rustfrc/blob/main/pyproject.toml

To do so, a semi-automated approach is used to generate the dependencies using poetry export.

poetry export -f requirements.txt --without="test,dev,docs" --all-extras --without-hashes --output requirements.txt

Then, update the dependencies section in the pyproject.toml file.

For more details on how to express poetry optional dependencies as PEP-621 optional dependencies, see the following resources:

https://astarvienna.github.io/howtotoml.html#extras https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#dependencies-and-requirements https://python-poetry.org/docs/pyproject/#extras

Additionally, this commit solves a few inconsistencies regarding packages listed as optional (duckdb, ibis), but it raises an ImportError when running the code.

See the penguins_example.py for code that was raising ImportError

Letsql uses maturin as the build-backend. To handle our dependencies
we use poetry. As of now, and in the future, maturin does not recognize
the dependencies specified by poetry see this issue:

PyO3/maturin#632

It also does not provide an alternative way to support dynamic dependencies
The following issue is still open

PyO3/maturin#1537

On the other side poetry will support PEP-621 project style dependencies
in the version 2.0

python-poetry/poetry#3332

Therefore one simple solution is to duplicate the dependencies section, as in
the package:

https://github.com/tmtenbrink/rustfrc/blob/main/pyproject.toml

To do so, a semi-automated approach is to generate the dependencies using poetry
export

poetry export -f requirements.txt --without="test,dev,docs" /
--all-extras --without-hashes --output requirements.txt

And then update the dependencies section in the pyproject.toml file.

For more details on how to express poetry optional dependencies as PEP-621 optional
dependencies, see the following resources:

https://astarvienna.github.io/howtotoml.html#extras
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#dependencies-and-requirements
https://python-poetry.org/docs/pyproject/#extras

Additionally this commit solves a few inconsistencies regarding packages
listed as optional (duckdb, ibis), but when running the code it raises ImportError.

See the penguins_example.py for code that was raising ImportError
@mesejo mesejo self-assigned this Jun 26, 2024
@mesejo mesejo marked this pull request as ready for review July 2, 2024 18:45
@mesejo mesejo requested a review from dlovell July 2, 2024 18:46
@mesejo mesejo merged commit 1bce170 into xorq-labs:main Jul 2, 2024
7 checks passed
@mesejo mesejo deleted the chore/install-dependencies branch July 17, 2024 09:40
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.

1 participant