Skip to content

Commit

Permalink
Merge branch 'main' into feature/save-pd-to-snowflaketable
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas <[email protected]>
  • Loading branch information
tdhooghe authored Oct 22, 2024
2 parents 0886454 + b1bae8d commit 25c28c4
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-tsc-vote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Required Reviews
on:
pull_request:
paths:
- 'kedro-datasets/kedro_datasets/*'
- 'kedro-datasets/kedro_datasets/**'
jobs:
required-reviews:
name: Required Reviews
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:
python -m pip install "uv==0.2.21"
- name: Install dependencies
run: |
cd ${{ inputs.plugin }}
uv pip install --system "kedro @ git+https://github.com/kedro-org/kedro@main"
uv pip install --system "${{inputs.plugin}}[test] @ ."
uv pip freeze --system
cd ${{ inputs.plugin }}
uv pip install --system "kedro @ git+https://github.com/kedro-org/kedro@main"
uv pip install --system "${{inputs.plugin}}[lint] @ ."
uv pip freeze --system
- name: Install pre-commit hooks
run: |
pre-commit install --install-hooks
pre-commit install --hook-type pre-push
pre-commit install --install-hooks
pre-commit install --hook-type pre-push
- name: Run linter
run: make plugin=${{ inputs.plugin }} lint
- name: Run mypy
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ secret-scan:
install-test-requirements:
cd $(plugin) && uv pip install ".[test]"

install-lint-requirements:
cd $(plugin) && uv pip install ".[lint]"

install-pre-commit:
pre-commit install --install-hooks

Expand Down
13 changes: 8 additions & 5 deletions kedro-airflow/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,23 @@ Tracker = "https://github.com/kedro-org/kedro-plugins/issues"
[project.optional-dependencies]
test = [
"apache-airflow<3.0",
"bandit",
"behave",
"black~=22.0",
"coverage>=7.2.0",
"kedro-datasets",
"mypy~=1.0",
"pre-commit>=2.9.2",
"pytest",
"pytest-cov",
"pytest-mock",
"pytest-xdist",
"wheel",
]

lint = [
"bandit",
"black~=22.0",
"mypy~=1.0",
"pre-commit>=2.9.2",
"trufflehog>=2.1.0, <3.0",
"ruff~=0.0.290",
"wheel",
# mypy requirements
"types-PyYAML",
"types-cachetools",
Expand Down
4 changes: 3 additions & 1 deletion kedro-datasets/kedro_datasets/polars/lazy_polars_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
logger = logging.getLogger(__name__)


class LazyPolarsDataset(AbstractVersionedDataset[pl.LazyFrame, PolarsFrame]):
class LazyPolarsDataset(
AbstractVersionedDataset[pl.LazyFrame, pl.LazyFrame | pl.DataFrame]
):
"""``LazyPolarsDataset`` loads/saves data from/to a data file using an
underlying filesystem (e.g.: local, S3, GCS). It uses Polars to handle
the type of read/write target. It uses lazy loading with Polars Lazy API, but it can
Expand Down
20 changes: 13 additions & 7 deletions kedro-datasets/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ docs = [
test = [
"accelerate<0.32", # Temporary pin
"adlfs~=2023.1",
"bandit>=1.6.2, <2.0",
"behave==1.2.6",
"biopython~=1.73",
"blacken-docs==1.9.2",
Expand All @@ -221,7 +220,6 @@ test = [
"hdfs>=2.5.8, <3.0",
"holoviews>=1.13.0",
"ibis-framework[duckdb,examples]",
"import-linter[toml]==1.2.6",
"ipython>=7.31.1, <8.0",
"Jinja2<3.2.0",
"joblib>=0.14",
Expand All @@ -231,7 +229,6 @@ test = [
"matplotlib>=3.5, <3.6",
"memory_profiler>=0.50.0, <1.0",
"moto==5.0.0",
"mypy~=1.0",
"networkx~=2.4",
"opencv-python~=4.5.5.64",
"openpyxl>=3.0.3, <4.0",
Expand All @@ -240,7 +237,6 @@ test = [
"Pillow~=10.0",
"plotly>=4.8.0, <6.0",
"polars[xlsx2csv, deltalake]~=0.18.0",
"pre-commit>=2.9.2",
"pyarrow>=1.0; python_version < '3.11'",
"pyarrow>=7.0; python_version >= '3.11'", # Adding to avoid numpy build errors
"pyodbc~=5.0",
Expand All @@ -253,7 +249,6 @@ test = [
"redis~=4.1",
"requests-mock~=1.6",
"requests~=2.20",
"ruff~=0.0.290",
"s3fs>=2021.04",
"snowflake-snowpark-python>=1.23; python_version < '3.12'",
"scikit-learn>=1.0.2,<2",
Expand All @@ -264,13 +259,24 @@ test = [
"tensorflow-macos~=2.0; platform_system == 'Darwin' and platform_machine == 'arm64'",
"tensorflow~=2.0; platform_system != 'Darwin' or platform_machine != 'arm64'",
"triad>=0.6.7, <1.0",
"trufflehog~=2.1",
"xarray>=2023.1.0",
"xlsxwriter~=1.0",
# huggingface
"datasets",
"huggingface_hub",
"transformers[torch]",
]

# Lint requirements
lint = [
"bandit>=1.6.2, <2.0",
"blacken-docs==1.9.2",
"black~=22.0",
"import-linter[toml]==1.2.6",
"mypy~=1.0",
"pre-commit>=2.9.2",
"ruff~=0.0.290",
"trufflehog~=2.1",
# mypy related dependencies
"types-cachetools",
"types-PyYAML",
Expand All @@ -296,7 +302,7 @@ experimental = [
]

# All requirements
all = ["kedro-datasets[test,docs]"]
all = ["kedro-datasets[test,docs,lint]"]

[project.urls]
Source = "https://github.com/kedro-org/kedro-plugins/tree/main/kedro-datasets"
Expand Down
15 changes: 9 additions & 6 deletions kedro-docker/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,25 @@ Tracker = "https://github.com/kedro-org/kedro-plugins/issues"

[project.optional-dependencies]
test = [
"bandit",
"behave",
"black~=22.0",
"coverage>=7.2.0",
"docker",
"mypy~=1.0",
"pre-commit>=2.9.2",
"psutil",
"pytest",
"pytest-cov",
"pytest-mock",
"pytest-xdist[psutil]~=2.2.1",
"PyYAML>=5.1, <7.0",
"trufflehog>=2.0.99, <3.0",
"wheel==0.32.2",
]

lint = [
"bandit",
"black~=22.0",
"mypy~=1.0",
"pre-commit>=2.9.2",
"trufflehog>=2.1.0, <3.0",
"ruff~=0.0.290",
"wheel==0.32.2"
]

[project.entry-points."kedro.project_commands"]
Expand Down
13 changes: 8 additions & 5 deletions kedro-telemetry/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,21 @@ Tracker = "https://github.com/kedro-org/kedro-plugins/issues"

[project.optional-dependencies]
test = [
"bandit>=1.6.2, <2.0",
"black~=22.0",
"mypy~=1.0",
"pre-commit>=2.9.2",
"pytest",
"pytest-cov",
"pytest-mock",
"pytest-xdist[psutil]~=2.2.1",
"PyYAML==5.3.1", # Temporary fix, to be removed
"wheel",
]

lint = [
"bandit>=1.6.2, <2.0",
"black~=22.0",
"mypy~=1.0",
"pre-commit>=2.9.2",
"trufflehog>=2.1.0, <3.0",
"ruff~=0.0.290",
"wheel",
# mypy requirements
"types-requests",
"types-PyYAML",
Expand Down

0 comments on commit 25c28c4

Please sign in to comment.