Skip to content

Commit

Permalink
ci: add a minimum dependencies test (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasdavis authored Oct 13, 2023
1 parent 3792526 commit 7258a09
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 4 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/minimum-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: minimum-dependencies

on:
push:
branches: ['main']
paths-ignore: ['**.md', 'docs/**']
pull_request:
paths-ignore: ['**.md', 'docs/**']
workflow_dispatch:

concurrency:
group: 'minimum-dependencies-${{ github.head_ref || github.run_id }}'
cancel-in-progress: true

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install
run: |
python3 -m pip install pip build wheel pytest -U
python3 -m pip install -e . -vv
- name: Run tests
run: |
python3 -m pytest
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Homepage = "https://github.com/dask-contrib/dask-awkward"

[project.optional-dependencies]
io = [
"aiohttp;python_version<\"3.12\"",
"pyarrow;python_version<\"3.12\"",
]
complete = [
Expand All @@ -60,17 +59,17 @@ docs = [
"dask-sphinx-theme >=3.0.2",
"sphinx-design",
"sphinx-codeautolink",
"requests >=2.27.1",
]
test = [
"aiohttp;python_version<\"3.12\"",
"dask-awkward[complete]",
"dask-histogram",
"distributed",
"hist",
"pandas",
"pytest >=6.0",
"pytest-cov >=3.0.0",
"requests >=2.27.1",
"requests",
"uproot >=5.1.0rc1",
]

Expand Down
1 change: 1 addition & 0 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,7 @@ def test_map_partitions_no_dask_collections_passed(caa):
@pytest.mark.parametrize("fn", [dak.count, dak.zeros_like, dak.ones_like])
def test_shape_only_ops(fn: Callable, tmp_path_factory: pytest.TempPathFactory) -> None:
pytest.importorskip("pyarrow")
pytest.importorskip("pandas")
a = ak.Array([{"a": 1, "b": 2}, {"a": 3, "b": 4}])
p = tmp_path_factory.mktemp("zeros-like-flat")
ak.to_parquet(a, str(p / "file.parquet"))
Expand Down
5 changes: 4 additions & 1 deletion tests/test_io_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
import dask_awkward as dak
from dask_awkward.lib.testutils import assert_eq

pytest.importorskip("pyarrow")
pytest.importorskip("requests")
pytest.importorskip("aiohttp")


def test_from_text() -> None:
pytest.importorskip("pyarrow")
f1 = "https://raw.githubusercontent.com/dask-contrib/dask-awkward/main/README.md"
f2 = "https://raw.githubusercontent.com/dask-contrib/dask-awkward/main/LICENSE"

Expand Down
2 changes: 2 additions & 0 deletions tests/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import pytest

pytest.importorskip("pyarrow")
pytest.importorskip("requests")
pytest.importorskip("aiohttp")

import awkward as ak
import fsspec
Expand Down

0 comments on commit 7258a09

Please sign in to comment.