diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36cefc9..610f644 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,10 +11,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.10', '3.11'] + python-version: ['3.9', '3.10', '3.11', '3.12'] arrow-version: [''] include: - - python-version: '3.12' + - python-version: 3.x arrow-version: '--pre ' steps: - uses: actions/checkout@v4 @@ -43,7 +43,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: 3.x - run: pip install -r docs/requirements.in - run: npm install - run: make html diff --git a/CHANGELOG.md b/CHANGELOG.md index 402131d..a6c8a62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## Unreleased ### Changed +* Pyarrow >=14 required * Python >=3.9 required * `group` optimized for memory diff --git a/README.md b/README.md index 612f54b..b1044e8 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ If index columns are detected in the schema metadata, then an initial `filter` w ``` ## Dependencies -* pyarrow >=13 +* pyarrow * strawberry-graphql[asgi,cli] * uvicorn (or other [ASGI server](https://asgi.readthedocs.io/en/latest/implementations.html)) diff --git a/graphique/interface.py b/graphique/interface.py index 67c5c3e..278529f 100644 --- a/graphique/interface.py +++ b/graphique/interface.py @@ -382,13 +382,14 @@ def apply_list(table: Batch, list_: ListFunction) -> Batch: def apply( self, info: Info, - cumulative_sum: doc_argument(list[Cumulative], func=pc.cumulative_sum) = [], - cumulative_prod: doc_argument(list[Cumulative], func=pc.cumulative_prod) = [], - cumulative_min: doc_argument(list[Cumulative], func=pc.cumulative_min) = [], cumulative_max: doc_argument(list[Cumulative], func=pc.cumulative_max) = [], - pairwise_diff: doc_argument(list[Pairwise], func=pc.pairwise_diff) = [], + cumulative_mean: doc_argument(list[Cumulative], func=pc.cumulative_mean) = [], + cumulative_min: doc_argument(list[Cumulative], func=pc.cumulative_min) = [], + cumulative_prod: doc_argument(list[Cumulative], func=pc.cumulative_prod) = [], + cumulative_sum: doc_argument(list[Cumulative], func=pc.cumulative_sum) = [], fill_null_backward: doc_argument(list[Field], func=pc.fill_null_backward) = [], fill_null_forward: doc_argument(list[Field], func=pc.fill_null_forward) = [], + pairwise_diff: doc_argument(list[Pairwise], func=pc.pairwise_diff) = [], rank: doc_argument(list[Rank], func=pc.rank) = [], list_: Annotated[ ListFunction, @@ -403,8 +404,9 @@ def apply( table = T.map_batch(self.scanner(info), self.apply_list, list_) self.add_metric(info, table, mode='batch') columns = {} - funcs = pc.cumulative_sum, C.fill_null_backward, C.fill_null_forward, pc.rank - funcs += pc.cumulative_prod, pc.cumulative_min, pc.cumulative_max, C.pairwise_diff + funcs = pc.cumulative_max, pc.cumulative_mean, pc.cumulative_min, pc.cumulative_prod + funcs += pc.cumulative_sum, C.fill_null_backward, C.fill_null_forward, C.pairwise_diff + funcs += (pc.rank,) for func in funcs: for field in locals()[func.__name__]: callable = func diff --git a/pyproject.toml b/pyproject.toml index 7b2f8e1..48c8cb3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", ] -dependencies = ["pyarrow>=13", "strawberry-graphql[asgi,cli]>=0.198"] +dependencies = ["pyarrow>=14", "strawberry-graphql[asgi,cli]>=0.198"] [project.urls] Homepage = "https://github.com/coady/graphique" diff --git a/requirements.in b/requirements.in index 72bc364..123b6df 100644 --- a/requirements.in +++ b/requirements.in @@ -1,2 +1,2 @@ -pyarrow>=13 +pyarrow>=14 strawberry-graphql[asgi,cli]>=0.198