Skip to content

Commit

Permalink
apacheGH-40216: [CI][Packaging][Python] Upload pyarrow nightly wheels…
Browse files Browse the repository at this point in the history
… to scientific python channel on Anaconda (apache#43862)

### Rationale for this change

As discussed on the main issue is interesting for discoverability to have the wheels uploaded to the nightly channel.

### What changes are included in this PR?

Added macro to upload wheel to scientific python channel

### Are these changes tested?

Via archery

### Are there any user-facing changes?

No but nightly wheels will be available on scientific python channel
* GitHub Issue: apache#40216

Authored-by: Raúl Cumplido <[email protected]>
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
  • Loading branch information
raulcd authored and mapleFU committed Sep 3, 2024
1 parent 1b08573 commit c4845d0
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dev/tasks/macros.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,18 @@ env:
{% endif %}
{% endmacro %}

{%- macro github_upload_wheel_scientific_python(pattern) -%}
{%- if arrow.is_default_branch() -%}
- name: Upload wheel to Anaconda scientific-python
shell: bash
run: |
python3 -m pip install git+https://github.com/Anaconda-Platform/[email protected]
anaconda -t ${CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN} upload --force -u scientific-python-nightly-wheels --label dev {{ pattern }}
env:
CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN: {{ '${{ secrets.CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN }}' }}
{% endif %}
{% endmacro %}

{%- macro azure_checkout_arrow() -%}
- script: |
git clone --no-checkout --branch {{ arrow.branch }} {{ arrow.remote }} arrow
Expand Down
1 change: 1 addition & 0 deletions dev/tasks/python-sdist/github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ jobs:

{{ macros.github_upload_releases("arrow/python/dist/*.tar.gz")|indent }}
{{ macros.github_upload_gemfury("arrow/python/dist/*.tar.gz")|indent }}
{{ macros.github_upload_wheel_scientific_python("arrow/python/dist/*.tar.gz")|indent }}
1 change: 1 addition & 0 deletions dev/tasks/python-wheels/github.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
{{ macros.github_upload_releases("arrow/python/repaired_wheels/*.whl")|indent }}
{{ macros.github_upload_gemfury("arrow/python/repaired_wheels/*.whl")|indent }}
{{ macros.github_upload_wheel_scientific_python("arrow/python/repaired_wheels/*.whl")|indent }}

{% if arrow.is_default_branch() %}
- name: Push Docker Image
Expand Down
1 change: 1 addition & 0 deletions dev/tasks/python-wheels/github.osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,4 @@ jobs:
{{ macros.github_upload_releases("arrow/python/repaired_wheels/*.whl")|indent }}
{{ macros.github_upload_gemfury("arrow/python/repaired_wheels/*.whl")|indent }}
{{ macros.github_upload_wheel_scientific_python("arrow/python/repaired_wheels/*.whl")|indent }}
1 change: 1 addition & 0 deletions dev/tasks/python-wheels/github.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
{{ macros.github_upload_releases("arrow/python/dist/*.whl")|indent }}
{{ macros.github_upload_gemfury("arrow/python/dist/*.whl")|indent }}
{{ macros.github_upload_wheel_scientific_python("arrow/python/dist/*.whl")|indent }}

{% if arrow.is_default_branch() %}
- name: Push Docker Image
Expand Down
1 change: 1 addition & 0 deletions dev/tasks/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ groups:

wheel:
- wheel-*
- python-sdist

linux:
- almalinux-*
Expand Down

0 comments on commit c4845d0

Please sign in to comment.