Skip to content

Commit

Permalink
Merge pull request #18 from JasperHG90/feat/lzy
Browse files Browse the repository at this point in the history
Refactor: add lazy Polars and Daft IO managers without dependency on Arrow
  • Loading branch information
JasperHG90 authored Nov 16, 2024
2 parents c47a01d + b3b303b commit 1ddd800
Show file tree
Hide file tree
Showing 68 changed files with 1,116 additions and 1,921 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
python_version: "3.11"
pre_commit_version: "4.0.1"
directory: "."
directory: "src"
- name: 'Pyright type checks'
uses: ./.github/workflows/templates/pyright_type_checks
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
with:
python_version: '3.11'
uv_version: '0.4.27'
path_to_packages: './packages'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/templates/release/build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ inputs:
description: 'uv version to use'
required: true
default: 'latest'
path_to_packages:
description: 'Path to python packages'
required: true
default: 'packages'

runs:
using: 'composite'
Expand All @@ -40,10 +36,10 @@ runs:
uses: ./.github/workflows/templates/release/utils/bump_version
with:
version: ${{ steps.version.outputs.version }}
root: ${{ inputs.path_to_packages }}
glob: '**/src/**/version.py,**/pyproject.toml'
root: '.'
glob: 'src/**/version.py,**/pyproject.toml'
- name: 'Build python packages'
id: build
run: |
uv build --all
uv build
shell: bash
2 changes: 1 addition & 1 deletion .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ alias d := docs

# Install python dependencies
install:
uv sync
uv sync --all-extras

# Install pre-commit hooks
pre_commit_setup:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
rev: "1.7.0"
hooks:
- id: interrogate
args: [-vv, --fail-under=0, ./packages]
args: [-vv, --fail-under=0, ./src]

- repo: https://github.com/ambv/black
rev: 24.1.1
Expand Down
3 changes: 2 additions & 1 deletion docs/snippets/io_manager_pandas.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pandas as pd
from dagster import Definitions, asset
from dagster_pyiceberg import IcebergSqlCatalogConfig
from dagster_pyiceberg_pandas import IcebergPandasIOManager

from dagster_pyiceberg import IcebergSqlCatalogConfig

CATALOG_URI = "sqlite:////home/vscode/workspace/.tmp/examples/select_columns/catalog.db"
CATALOG_WAREHOUSE = (
"file:///home/vscode/workspace/.tmp/examples/select_columns/warehouse"
Expand Down
3 changes: 2 additions & 1 deletion docs/snippets/io_manager_polars.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import pandas as pd
import polars as pl
from dagster import Definitions, asset
from dagster_pyiceberg import IcebergSqlCatalogConfig
from dagster_pyiceberg_polars import IcebergPolarsIOManager

from dagster_pyiceberg import IcebergSqlCatalogConfig

CATALOG_URI = "sqlite:////home/vscode/workspace/.tmp/examples/select_columns/catalog.db"
CATALOG_WAREHOUSE = (
"file:///home/vscode/workspace/.tmp/examples/select_columns/warehouse"
Expand Down
1 change: 1 addition & 0 deletions docs/snippets/io_manager_pyarrow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pandas as pd
import pyarrow as pa
from dagster import Definitions, asset

from dagster_pyiceberg import IcebergPyarrowIOManager, IcebergSqlCatalogConfig

CATALOG_URI = "sqlite:////home/vscode/workspace/.tmp/examples/select_columns/catalog.db"
Expand Down
3 changes: 2 additions & 1 deletion docs/snippets/multiple_io_managers.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pandas as pd
from dagster import Definitions, FilesystemIOManager, asset
from dagster_pyiceberg import IcebergSqlCatalogConfig
from dagster_pyiceberg_pandas import IcebergPandasIOManager

from dagster_pyiceberg import IcebergSqlCatalogConfig

CATALOG_URI = "sqlite:////home/vscode/workspace/.tmp/examples/catalog.db"
CATALOG_WAREHOUSE = "file:///home/vscode/workspace/.tmp/examples/warehouse"
FS_BASE_DIR = "/home/vscode/workspace/.tmp/examples/images"
Expand Down
3 changes: 2 additions & 1 deletion docs/snippets/multiple_schemas.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pandas as pd
from dagster import Definitions, asset
from dagster_pyiceberg import IcebergSqlCatalogConfig
from dagster_pyiceberg_pandas import IcebergPandasIOManager

from dagster_pyiceberg import IcebergSqlCatalogConfig

CATALOG_URI = "sqlite:////home/vscode/workspace/.tmp/examples/catalog.db"
CATALOG_WAREHOUSE = "file:///home/vscode/workspace/.tmp/examples/warehouse"

Expand Down
3 changes: 2 additions & 1 deletion docs/snippets/partitions_multiple.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
StaticPartitionDefinition,
asset,
)
from dagster_pyiceberg import IcebergSqlCatalogConfig
from dagster_pyiceberg_pandas import IcebergPandasIOManager

from dagster_pyiceberg import IcebergSqlCatalogConfig

CATALOG_URI = "sqlite:////home/vscode/workspace/.tmp/examples/catalog.db"
CATALOG_WAREHOUSE = "file:///home/vscode/workspace/.tmp/examples/warehouse"

Expand Down
3 changes: 2 additions & 1 deletion docs/snippets/partitions_static.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pandas as pd
from dagster import Definitions, StaticPartitionsDefinition, asset
from dagster_pyiceberg import IcebergSqlCatalogConfig
from dagster_pyiceberg_pandas import IcebergPandasIOManager

from dagster_pyiceberg import IcebergSqlCatalogConfig

CATALOG_URI = "sqlite:////home/vscode/workspace/.tmp/examples/catalog.db"
CATALOG_WAREHOUSE = "file:///home/vscode/workspace/.tmp/examples/warehouse"

Expand Down
3 changes: 2 additions & 1 deletion docs/snippets/partitions_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

import pandas as pd
from dagster import DailyPartitionsDefinition, Definitions, asset
from dagster_pyiceberg import IcebergSqlCatalogConfig
from dagster_pyiceberg_pandas import IcebergPandasIOManager

from dagster_pyiceberg import IcebergSqlCatalogConfig

CATALOG_URI = "sqlite:////home/vscode/workspace/.tmp/examples/catalog.db"
CATALOG_WAREHOUSE = "file:///home/vscode/workspace/.tmp/examples/warehouse"

Expand Down
1 change: 1 addition & 0 deletions docs/snippets/pyiceberg_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import pandas as pd
from dagster import Definitions, asset

from dagster_pyiceberg import IcebergSqlCatalogConfig, IcebergTableResource

CATALOG_URI = "sqlite:////home/vscode/workspace/.tmp/examples/catalog.db"
Expand Down
3 changes: 2 additions & 1 deletion docs/snippets/select_columns.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pandas as pd
from dagster import AssetIn, Definitions, asset
from dagster_pyiceberg import IcebergSqlCatalogConfig
from dagster_pyiceberg_pandas import IcebergPandasIOManager

from dagster_pyiceberg import IcebergSqlCatalogConfig

CATALOG_URI = "sqlite:////home/vscode/workspace/.tmp/examples/select_columns/catalog.db"
CATALOG_WAREHOUSE = (
"file:///home/vscode/workspace/.tmp/examples/select_columns/warehouse"
Expand Down
3 changes: 2 additions & 1 deletion docs/snippets/table_properties.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pandas as pd
from dagster import Definitions, asset
from dagster_pyiceberg import IcebergSqlCatalogConfig
from dagster_pyiceberg_pandas import IcebergPandasIOManager

from dagster_pyiceberg import IcebergSqlCatalogConfig

CATALOG_URI = "sqlite:////home/vscode/workspace/.tmp/examples/select_columns/catalog.db"
CATALOG_WAREHOUSE = (
"file:///home/vscode/workspace/.tmp/examples/select_columns/warehouse"
Expand Down
201 changes: 0 additions & 201 deletions packages/dagster_pyiceberg/LICENSE.txt

This file was deleted.

5 changes: 0 additions & 5 deletions packages/dagster_pyiceberg/README.md

This file was deleted.

Loading

0 comments on commit 1ddd800

Please sign in to comment.