Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,22 @@ on:
- cron: '0 0 * * 1'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- name: Install hatch
run: pip install hatch
- name: Lint
run: hatch run lint

build:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -24,8 +39,6 @@ jobs:
cache: "pip"
- name: Install hatch
run: pip install hatch
- name: Lint
run: hatch run lint
- name: Type check
run: hatch run types:check
- name: Test
Expand Down
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
rev: v0.6.9
hooks:
- id: ruff
args: [--fix]
args: [--fix, "--target-version=py310"]
exclude: ^examples/
- id: ruff-format
args: ["--target-version=py310"]
exclude: ^examples/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ exclude_lines = [
[tool.ruff]
line-length = 120
indent-width = 4
target-version = "py313"
target-version = "py310"

[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM", "N", "TID"]
Expand Down
1 change: 1 addition & 0 deletions tests/test_arrow_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import unittest

import pyarrow as pa

from iceberg_loader.arrow_utils import (
convert_column_type,
convert_table_types,
Expand Down
3 changes: 2 additions & 1 deletion tests/test_iceberg_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
from unittest.mock import MagicMock, patch

import pyarrow as pa
from pyiceberg.exceptions import NoSuchTableError

from iceberg_loader.iceberg_loader import IcebergLoader, load_data_to_iceberg
from iceberg_loader.settings import TABLE_PROPERTIES
from pyiceberg.exceptions import NoSuchTableError


class TestIcebergLoader(unittest.TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_partitioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from unittest.mock import MagicMock

import pyarrow as pa
from iceberg_loader.schema import SchemaManager
from pyiceberg.partitioning import PartitionSpec
from pyiceberg.transforms import (
BucketTransform,
Expand All @@ -13,6 +12,8 @@
YearTransform,
)

from iceberg_loader.schema import SchemaManager


class TestSchemaManagerPartitioning(unittest.TestCase):
def setUp(self):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
from unittest.mock import MagicMock

import pyarrow as pa
from iceberg_loader import IcebergLoader
from pyiceberg.exceptions import NoSuchTableError

from iceberg_loader import IcebergLoader


class TestStreaming(unittest.TestCase):
def test_load_ipc_stream(self):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_type_mappings.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import unittest

import pyarrow as pa
from iceberg_loader.type_mappings import get_arrow_type, get_iceberg_type, register_custom_mapping
from pyiceberg.types import IntegerType, LongType, StringType, TimestampType, TimestamptzType

from iceberg_loader.type_mappings import get_arrow_type, get_iceberg_type, register_custom_mapping


class TestTypeMappings(unittest.TestCase):
def test_arrow_to_iceberg_basic(self):
Expand Down