forked from letsql/letsql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
9 changed files
with
96 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import letsql as ls | ||
from letsql.common.caching import ParquetCacheStorage | ||
from pathlib import Path | ||
|
||
t = ls.examples.penguins.fetch() | ||
|
||
con = t.op().source | ||
|
||
t.filter([t.species == "Adelie"]).cache( | ||
storage=ParquetCacheStorage(source=con, path=Path.cwd()) | ||
).execute() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,27 @@ build-backend = "maturin" | |
[project] | ||
name = "letsql" | ||
dynamic = ["version"] | ||
dependencies = [ | ||
"ibis-framework==9.0.0 ; python_version >= '3.10' and python_version < '4.0'", | ||
"dask==2023.12.1 ; python_version >= '3.10' and python_version < '4.0'", | ||
"attrs==23.2.0 ; python_version >= '3.10' and python_version < '4.0'", | ||
"connectorx==0.3.2 ; python_version >= '3.10' and python_version < '4.0'", | ||
"psycopg2-binary==2.9.9 ; python_version >= '3.10' and python_version < '4.0'", | ||
"sqlalchemy==2.0.29 ; python_version >= '3.10' and python_version < '4.0'", | ||
"pyarrow==13.0.0 ; python_version >= '3.10' and python_version < '4.0'", | ||
"palmerpenguins==0.1.4 ; python_version >= '3.10' and python_version < '4.0'", | ||
"structlog==24.2.0 ; python_version >= '3.10' and python_version < '4.0'", | ||
"pytest-mock==3.14.0 ; python_version >= '3.10' and python_version < '4.0'", | ||
] | ||
requires-python = ">=3.7" | ||
authors = [ | ||
{ name = "Hussain Sultan", email = "[email protected]" }, | ||
] | ||
maintainers = [ | ||
{ email = "Dan Lovell <[email protected]>" }, | ||
{ email = "Daniel Mesejo <[email protected]>" }, | ||
] | ||
description = "Data processing library built on top of Ibis and DataFusion to write multi-engine data workflows." | ||
readme = "README.md" | ||
license = { file = "LICENSE" } | ||
classifiers = [ | ||
|
@@ -25,6 +45,18 @@ Repository = "https://github.com/letsql/letsql.git" | |
Issues = "https://github.com/letsql/letsql/issues" | ||
Changelog = "https://github.com/letsql/letsql/blob/main/CHANGELOG.md" | ||
|
||
[project.optional-dependencies] | ||
duckb = [ | ||
"duckdb==0.10.3 ; python_version >= '3.10' and python_version < '4.0'" | ||
] | ||
datafusion = [ | ||
"datafusion==34.0.0 ; python_version >= '3.10' and python_version < '4.0'" | ||
] | ||
snowflake = [ | ||
"snowflake-connector-python==3.10.1 ; python_version >= '3.10' and python_version < '4.0'" | ||
] | ||
|
||
|
||
[tool.maturin] | ||
module-name = "letsql._internal" | ||
python-source = "python" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters