Skip to content
Merged
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
48 changes: 38 additions & 10 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Create venv
run: |
uv venv --no-project --no-config --no-managed-python rpy2-arrow-env
- name: Lint with flake8
run: |
pip install flake8
source rpy2-arrow-env/bin/activate
uv pip install flake8
flake8 rpy2_arrow --count --max-complexity=10 --max-line-length=127 --statistics
build:
runs-on: ${{ matrix.os }}
Expand All @@ -34,6 +40,9 @@ jobs:
SYSTEM_DEPS: sudo apt-get install -y libcurl4-gnutls-dev
- os: macOS-latest
SYSTEM_DEPS: brew install curl
exclude:
- python-version: "3.12"
os: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -59,9 +68,19 @@ jobs:
curl -LO https://mac.r-project.org/bin/darwin20/arm64/"${name}"
sudo tar xJf "${name}" -C /
done
- name: Install R dependencies
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
extra-packages: |
any::assertthat
any::cpp11
any::tidyselect
any::vctrs
any::R6
any::purrr
any::bit64
- name: Install R arrow package
run: |
install.packages(c("assertthat", "cpp11", "tidyselect", "vctrs", "R6", "purrr", "bit64"))
Sys.setenv("NOT_CRAN" = "true")
install.packages("arrow")
shell: Rscript {0}
Expand All @@ -78,21 +97,30 @@ jobs:
Sys.setenv(NOT_CRAN = "true")
install.packages("polars", repos = "https://community.r-multiverse.org")
shell: Rscript {0}
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Create venv
run: |
uv venv --no-project --no-config --no-managed-python rpy2-arrow-env
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install git+https://github.com/rpy2/rpy2-r6
source rpy2-arrow-env/bin/activate
uv pip install --upgrade pip
uv pip install -r requirements.txt
uv pip install git+https://github.com/rpy2/rpy2-r6
- name: Build package
run: |
pip install build
source rpy2-arrow-env/bin/activate
uv pip install build
python -m build
- name: Install package
run: |
pip install $(ls -t1 dist/*.whl | tail -1)'[all]'
source rpy2-arrow-env/bin/activate
uv pip install $(ls -t1 dist/*.whl | tail -1)'[all]'
- name: Test with pytest
run: |
source rpy2-arrow-env/bin/activate
export LD_LIBRARY_PATH=$(python -m rpy2.situation LD_LIBRARY_PATH)
pip install pytest codecov pytest-cov
pip install pandas
uv pip install pytest codecov pytest-cov
uv pip install pandas
pytest --cov rpy2_arrow.pyarrow_rarrow --cov rpy2_arrow.r6b --cov rpy2_arrow.polars rpy2_arrow/tests*.py
Loading