Skip to content

Commit c973ff4

Browse files
committed
Try to simplify none string logic
1 parent b09a5d5 commit c973ff4

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

.github/actions/install-deps/action.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Install package dependencies using uv
33

44
inputs:
55
options:
6-
description: 'Package options to install (space-separated, e.g., "full"). "none is an alias for empty string.'
6+
description: 'Package options to install (space-separated, e.g., "full").'
77
required: false
88
default: 'full'
99
groups:
@@ -17,18 +17,12 @@ runs:
1717
- name: Install dependencies (options=[${{ inputs.options }}], groups=[${{ inputs.groups }}])
1818
shell: bash
1919
run: |
20-
# Handle "none" as alias for empty string
21-
options_input="${{ inputs.options }}"
22-
if [ "$options_input" = "none" ]; then
23-
options_input=""
24-
fi
25-
2620
# Build the install command
2721
cmd="uv pip install -e"
2822
2923
# Convert space-separated options to comma-separated for brackets
3024
# E.g. "abc def" => '.[abc,def]'
31-
options=$(echo "$options_input" | tr ' ' ',')
25+
options=$(echo "${{ inputs.options }}" | tr ' ' ',')
3226
cmd="$cmd '.[$options]'"
3327
3428
# Add groups

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
tests:
1414
# Default config: py3.14, ubuntu-latest, float32, full options.
1515
# The idea is to make each of those params vary one by one, to limit the number of tests to run.
16-
name: Run tests (py${{ matrix.python-version || '3.14' }}, ${{ matrix.os || 'ubuntu-latest' }}, ${{ matrix.dtype || 'float32' }}, ${{ matrix.options || 'full' }})
16+
name: Run tests (py${{ matrix.python-version || '3.14' }}, ${{ matrix.os || 'ubuntu-latest' }}, ${{ matrix.dtype || 'float32' }}, ${{ matrix.options == null && 'full' || matrix.options }})
1717
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
1818
strategy:
1919
fail-fast: false
@@ -31,7 +31,7 @@ jobs:
3131
# dtype variations
3232
- dtype: float64
3333
# Installation options variations
34-
- options: 'none'
34+
- options: ''
3535

3636
steps:
3737
- name: Checkout repository
@@ -44,7 +44,7 @@ jobs:
4444

4545
- uses: ./.github/actions/install-deps
4646
with:
47-
options: ${{ matrix.options || 'full' }}
47+
options: ${{ matrix.options == null && 'full' || matrix.options }}
4848
groups: test
4949

5050
- name: Run tests

0 commit comments

Comments
 (0)