-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to Pixi for development / CI and hatchling for build system #6182
Changes from 93 commits
79b3794
2ec0c05
a7933b2
d760350
ce6037b
726ed7e
0062cb1
6a52141
e15620e
93cec10
6917525
c5b93ce
a5b2172
d179b11
da8b2c0
f492143
fc62bd5
aba4511
bb0eeb0
cfee98e
46a9a9a
40dd844
7e6a1a3
7e4e437
87558f5
ebbc113
c32f63d
9e5a759
d4a214b
934ff5e
bd4ce48
4c2d194
ea8fa82
cb418b3
931aa01
94eb02d
ed4d4ab
dd2ca40
956bc95
1daccd3
93b7486
59c7693
5028622
6333061
ff09ac9
b6bf7c1
03c963c
d385355
4b3b881
f0acd4a
e9c99b1
6ddcfb5
5bd1177
322cd21
b347129
9a56b12
8b93da3
52d82a4
d104fd7
a51e993
401758a
7205333
df15a75
629ae8b
20175e5
38902ee
ac88724
2736057
a22a51c
821fd40
fc43b6c
bc6870f
e9f5974
a429d3c
ab8e6ea
c4f04c1
f8c84c0
a879fc6
ea77fe4
37ccc9b
3a7a6ac
308eb51
5a2145c
d2891e8
fb90b42
f4a18e4
f92a285
ad08c33
8c74dfe
7184033
788cf02
ab113a6
9867caf
8bd7937
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: nightly_lock | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
pixi_lock: | ||
name: Pixi lock | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: holoviz-dev/holoviz_tasks/pixi_lock@pixi | ||
|
||
# TODO: Upload the lock-file |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,17 +33,10 @@ defaults: | |
shell: bash -el {0} | ||
|
||
env: | ||
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" | ||
DISPLAY: ":99.0" | ||
PYTHONIOENCODING: "utf-8" | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OMP_NUM_THREADS: 1 | ||
OPENBLAS_NUM_THREADS: 1 | ||
MKL_NUM_THREADS: 1 | ||
VECLIB_MAXIMUM_THREADS: 1 | ||
NUMEXPR_NUM_THREADS: 1 | ||
NUMBA_NUM_THREADS: 1 | ||
PYDEVD_DISABLE_FILE_VALIDATION: 1 | ||
DASK_DATAFRAME__QUERY_PLANNING: false | ||
|
||
jobs: | ||
pre_commit: | ||
|
@@ -61,7 +54,7 @@ jobs: | |
code_change: ${{ steps.filter.outputs.code }} | ||
matrix: ${{ env.MATRIX }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
if: github.event_name != 'pull_request' | ||
- name: Check for code changes | ||
uses: dorny/paths-filter@v3 | ||
|
@@ -71,7 +64,7 @@ jobs: | |
code: | ||
- 'holoviews/**' | ||
- 'examples/**' | ||
- 'setup.py' | ||
- 'pixi.toml' | ||
- 'pyproject.toml' | ||
- '.github/workflows/test.yaml' | ||
- name: Set matrix option | ||
|
@@ -90,153 +83,111 @@ jobs: | |
if: env.MATRIX_OPTION == 'default' | ||
run: | | ||
MATRIX=$(jq -nsc '{ | ||
"os": ["ubuntu-latest", "macos-latest", "windows-latest"], | ||
"python-version": ["3.9", "3.12"] | ||
"os": ["ubuntu-latest", "macos-14", "windows-latest"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed to using Mac-arm64 as this is both faster and the newer architecture. |
||
"environment": ["test-39", "test-312"] | ||
}') | ||
echo "MATRIX=$MATRIX" >> $GITHUB_ENV | ||
- name: Set test matrix with 'full' option | ||
if: env.MATRIX_OPTION == 'full' | ||
run: | | ||
MATRIX=$(jq -nsc '{ | ||
"os": ["ubuntu-latest", "macos-latest", "windows-latest"], | ||
"python-version": ["3.9", "3.10", "3.11", "3.12"] | ||
"os": ["ubuntu-latest", "macos-14", "windows-latest"], | ||
"environment": ["test-39", "test-310", "test311", "test312"] | ||
}') | ||
echo "MATRIX=$MATRIX" >> $GITHUB_ENV | ||
- name: Set test matrix with 'downstream' option | ||
if: env.MATRIX_OPTION == 'downstream' | ||
run: | | ||
MATRIX=$(jq -nsc '{ | ||
"os": ["ubuntu-latest"], | ||
"python-version": ["3.11"] | ||
"environment": ["test-311"] | ||
}') | ||
echo "MATRIX=$MATRIX" >> $GITHUB_ENV | ||
|
||
pixi_lock: | ||
name: Pixi lock | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: holoviz-dev/holoviz_tasks/pixi_lock@pixi | ||
with: | ||
cache: ${{ github.event.inputs.cache == 'true' || github.event.inputs.cache == '' }} | ||
|
||
unit_test_suite: | ||
name: Unit tests on Python ${{ matrix.python-version }}, ${{ matrix.os }} | ||
needs: [pre_commit, setup] | ||
name: unit:${{ matrix.environment }}:${{ matrix.os }} | ||
needs: [pre_commit, setup, pixi_lock] | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.setup.outputs.matrix) }} | ||
timeout-minutes: 120 | ||
env: | ||
DESC: "Python ${{ matrix.python-version }}, ${{ matrix.os }} unit tests" | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
steps: | ||
- uses: holoviz-dev/holoviz_tasks/install@v0 | ||
- uses: holoviz-dev/holoviz_tasks/pixi_install@pixi | ||
if: needs.setup.outputs.code_change == 'true' | ||
with: | ||
name: unit_test_suite | ||
python-version: ${{ matrix.python-version }} | ||
channel-priority: flexible | ||
channels: pyviz/label/dev,conda-forge,nodefaults | ||
envs: "-o flakes -o tests -o examples_tests -o tests_ci" | ||
cache: ${{ github.event.inputs.cache || github.event.inputs.cache == '' }} | ||
conda-update: true | ||
id: install | ||
environments: ${{ matrix.environment }} | ||
- name: Check packages latest version | ||
if: needs.setup.outputs.code_change == 'true' | ||
run: | | ||
conda activate test-environment | ||
python scripts/check_latest_packages.py bokeh panel param datashader | ||
- name: Download data | ||
if: needs.setup.outputs.code_change == 'true' | ||
run: | | ||
conda activate test-environment | ||
bash scripts/download_data.sh | ||
- name: doit test_unit | ||
pixi run -e ${{ matrix.environment }} check-latest-packages bokeh panel param datashader | ||
- name: Test Unit | ||
if: needs.setup.outputs.code_change == 'true' | ||
run: | | ||
conda activate test-environment | ||
doit test_unit | ||
- name: test examples | ||
pixi run -e ${{ matrix.environment }} test-unit --cov=./holoviews --cov-report=xml | ||
- name: Test Examples | ||
if: needs.setup.outputs.code_change == 'true' | ||
run: | | ||
conda activate test-environment | ||
doit test_examples | ||
- name: codecov | ||
pixi run -e ${{ matrix.environment }} test-example | ||
- uses: codecov/codecov-action@v4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not strictly related to the Pixi, but I noticed that it was failing. So I updated it to use the official workflow. |
||
if: needs.setup.outputs.code_change == 'true' | ||
run: | | ||
conda activate test-environment | ||
codecov | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
ui_test_suite: | ||
name: UI tests on Python ${{ matrix.python-version }}, ${{ matrix.os }} | ||
needs: [pre_commit, setup] | ||
name: ui:${{ matrix.environment }}:${{ matrix.os }} | ||
needs: [pre_commit, setup, pixi_lock] | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["3.9"] | ||
environment: ["test-ui"] | ||
timeout-minutes: 60 | ||
env: | ||
DESC: "Python ${{ matrix.python-version }}, ${{ matrix.os }} UI tests" | ||
PANEL_LOG_LEVEL: info | ||
# Without this env var `doit env_create ...` uses by default | ||
# the `pyviz` channel, except that we don't want to configure | ||
# it as one of the sources. | ||
PYCTDEV_SELF_CHANNEL: "pyviz/label/dev" | ||
steps: | ||
- uses: holoviz-dev/holoviz_tasks/install@v0 | ||
- uses: holoviz-dev/holoviz_tasks/pixi_install@pixi | ||
if: needs.setup.outputs.code_change == 'true' | ||
with: | ||
name: ui_test_suite | ||
python-version: ${{ matrix.python-version }} | ||
channels: pyviz/label/dev,conda-forge,nodefaults | ||
envs: "-o recommended -o tests -o build -o tests_ci" | ||
cache: ${{ github.event.inputs.cache || github.event.inputs.cache == '' }} | ||
playwright: true | ||
id: install | ||
- name: doit test_ui | ||
environments: ${{ matrix.environment }} | ||
- name: Test UI | ||
if: needs.setup.outputs.code_change == 'true' | ||
run: | | ||
conda activate test-environment | ||
doit test_ui | ||
- name: Upload coverage to Codecov | ||
pixi run -e ${{ matrix.environment }} test-ui --cov=./holoviews --cov-report=xml | ||
- uses: codecov/codecov-action@v4 | ||
if: needs.setup.outputs.code_change == 'true' | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: ./coverage.xml | ||
flags: ui-tests | ||
fail_ci_if_error: false # optional (default = false) | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
core_test_suite: | ||
name: Core tests on Python ${{ matrix.python-version }}, ${{ matrix.os }} | ||
needs: [pre_commit, setup] | ||
name: core:${{ matrix.environment }}:${{ matrix.os }} | ||
needs: [pre_commit, setup, pixi_lock] | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
python-version: ["3.12"] | ||
environment: ["test-core"] | ||
timeout-minutes: 120 | ||
env: | ||
DESC: "Python ${{ matrix.python-version }}, ${{ matrix.os }} core tests" | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
steps: | ||
- uses: holoviz-dev/holoviz_tasks/install@v0 | ||
- uses: holoviz-dev/holoviz_tasks/pixi_install@pixi | ||
if: needs.setup.outputs.code_change == 'true' | ||
with: | ||
name: core_test_suite | ||
python-version: ${{ matrix.python-version }} | ||
# channel-priority: strict | ||
channels: pyviz/label/dev,conda-forge,nodefaults | ||
envs: "-o tests_core -o tests_ci" | ||
cache: ${{ github.event.inputs.cache || github.event.inputs.cache == '' }} | ||
id: install | ||
- name: Download data | ||
if: needs.setup.outputs.code_change == 'true' | ||
run: | | ||
conda activate test-environment | ||
bash scripts/download_data.sh | ||
environments: ${{ matrix.environment }} | ||
- name: Check packages latest version | ||
if: needs.setup.outputs.code_change == 'true' | ||
run: | | ||
conda activate test-environment | ||
python scripts/check_latest_packages.py numpy pandas bokeh panel param | ||
- name: doit test_unit | ||
pixi run -e ${{ matrix.environment }} check-latest-packages numpy pandas bokeh panel param | ||
- name: Test Unit | ||
if: needs.setup.outputs.code_change == 'true' | ||
run: | | ||
conda activate test-environment | ||
pytest holoviews | ||
pixi run -e ${{ matrix.environment }} test-unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have moved those to the install task.