This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-cookbook.git
The following commit(s) were added to refs/heads/main by this push:
new 9212d2a [Python] Add Python build against Arrow Nightlies version
(#264)
9212d2a is described below
commit 9212d2aeb0b425f3cff420cf29611e9eaee52e2d
Author: Raúl Cumplido <[email protected]>
AuthorDate: Tue Oct 4 15:29:43 2022 +0200
[Python] Add Python build against Arrow Nightlies version (#264)
---
.github/workflows/test_python_cookbook.yml | 20 ++++++++++++++++++--
Makefile | 4 ++++
python/CONTRIBUTING.rst | 11 +++++++++++
python/source/conf.py | 4 ++++
python/source/index.rst | 2 +-
5 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/test_python_cookbook.yml
b/.github/workflows/test_python_cookbook.yml
index 6aa0d67..a28daae 100644
--- a/.github/workflows/test_python_cookbook.yml
+++ b/.github/workflows/test_python_cookbook.yml
@@ -30,8 +30,8 @@ concurrency:
cancel-in-progress: true
jobs:
- test_py:
- name: "Test Python Cookbook"
+ test_py_stable:
+ name: "Test Python Cookbook on Arrow stable"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
@@ -43,3 +43,19 @@ jobs:
run: make pytest
- name: Build cookbook
run: make py
+
+ test_py_dev:
+ name: "Test Python Cookbook on Arrow Nightlies"
+ runs-on: ubuntu-latest
+ env:
+ ARROW_NIGHTLY: 1
+ steps:
+ - uses: actions/checkout@v1
+ - name: Install dependencies
+ run: |
+ sudo apt update
+ sudo apt install libcurl4-openssl-dev libssl-dev python3-pip
+ - name: Run tests
+ run: make pytest
+ - name: Build cookbook
+ run: make py
diff --git a/Makefile b/Makefile
index 246a4b5..5ee8797 100644
--- a/Makefile
+++ b/Makefile
@@ -36,6 +36,10 @@ help:
pydeps:
@echo ">>> Installing Python Dependencies <<<\n"
cd python && pip install -r requirements.txt
+ifeq ($(ARROW_NIGHTLY), 1)
+ pip install --upgrade --extra-index-url
https://pypi.fury.io/arrow-nightlies/ --prefer-binary --pre pyarrow
+endif
+
javadeps:
@echo ">>> Installing Java Dependencies <<<\n"
diff --git a/python/CONTRIBUTING.rst b/python/CONTRIBUTING.rst
index eee2503..52ea176 100644
--- a/python/CONTRIBUTING.rst
+++ b/python/CONTRIBUTING.rst
@@ -36,6 +36,17 @@ Running ``make pytest`` from the cookbook root directory
will verify that the code for all the recipes runs correctly
and provides the expected output.
+If the environment variable ``ARROW_NIGHTLY`` is set to ``1``
+the cookbooks will be run against the latest development version of
+Arrow published by the `Nightly jobs.
<https://arrow.apache.org/docs/python/install.html#installing-nightly-packages>`_
+
+Example to run the cookbooks using the nightly jobs:
+
+```
+$ ARROW_NIGHTLY=1
+$ make pytest
+```
+
Adding Python Recipes
=====================
diff --git a/python/source/conf.py b/python/source/conf.py
index 59d6b08..635a112 100644
--- a/python/source/conf.py
+++ b/python/source/conf.py
@@ -38,6 +38,10 @@ copyright = "2022, Apache Software Foundation"
author = "The Apache Software Foundation"
+import pyarrow
+version = pyarrow.__version__
+print(f"Running with Arrow version: {version}")
+
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
diff --git a/python/source/index.rst b/python/source/index.rst
index 933f829..06aa495 100644
--- a/python/source/index.rst
+++ b/python/source/index.rst
@@ -28,7 +28,7 @@ how to solve many common tasks that users might need to
perform
when working with arrow data. The examples in this cookbook will also
serve as robust and well performing solutions to those tasks.
-This cookbook is tested with **pyarrow 9.0.0**.
+This cookbook is tested with pyarrow |version|.
.. toctree::
:maxdepth: 2