Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/actions/pkg-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inputs:
description: "additional pip install flags"
required: false
default: "-f https://download.pytorch.org/whl/cpu/torch_stable.html"
custom-import:
custom-import-code:
description: "additional import statement, need to be full python code"
required: false
default: ""
Expand Down Expand Up @@ -49,11 +49,16 @@ runs:
pip list
shell: bash

- name: package check
- name: package check / import
if: ${{ inputs.import-name != '' }}
run: |
set -ex
python -c "import ${{ inputs.import-name }} as pkg; print(f'version: {pkg.__version__}')"
python -c '${{ inputs.custom-import }}'
shell: bash

- name: package check / custom import
if: ${{ inputs.custom-import-code != '' }}
run: |
python -c '${{ inputs.custom-import-code }}'
shell: bash

- name: Uninstall all
Expand All @@ -76,5 +81,5 @@ runs:
run: |
set -ex
python -c "import ${{ inputs.import-name }} as pkg; print(f'version: {pkg.__version__}')"
python -c '${{ inputs.custom-import }}'
python -c '${{ inputs.custom-import-code }}'
shell: bash
5 changes: 3 additions & 2 deletions .github/workflows/check-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
description: "Import name to test with after installation"
required: true
type: string
custom-import:
custom-import-code:
description: "additional import statement, need to be full python code"
type: string
required: false
Expand Down Expand Up @@ -91,6 +91,7 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0 # checkout entire history for all branches (required when using scm-based versioning)
submodules: recursive
- name: Set up Python 🐍
uses: actions/setup-python@v5
Expand Down Expand Up @@ -142,7 +143,7 @@ jobs:
pkg-extras: ${{ inputs.install-extras }}
pip-flags: ${{ inputs.install-flags }}
import-name: ${{ inputs.import-name }}
custom-import: ${{ inputs.custom-import }}
custom-import-code: ${{ inputs.custom-import-code }}

# TODO: add run doctests

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-use-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
install-extras: "[cli]"
# todo: when we have a module with depence on extra, replace it
# tried to import `lightning_utilities.cli.__main__` but told me it does not exits
custom-import: "import fire"
custom-import-code: "import fire"
testing-matrix: |
{
"os": ["ubuntu-22.04", "macos-13", "windows-2022"],
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

---

## [Unreleased] - 2024-MM-DD

### Changed

- CI: split and rename `custom-import` to `custom-import-code` ([#325](https://github.com/Lightning-AI/utilities/pull/325))


## [0.11.8] - 2024-10-15

### Changed
Expand Down
Loading