-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replaced pip-compile with uv.lock Signed-off-by: Ali Abbas Jaffri <[email protected]> * Removed requirements files Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated uv dependencies Signed-off-by: Ali Abbas Jaffri <[email protected]> * Added uv lock Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated uv in actions Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated ci Signed-off-by: Ali Abbas Jaffri <[email protected]> * Update Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated pre-commit ci Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated release notes Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated workflows Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated lock file Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated ci Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated ci Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated ci Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated ci Signed-off-by: Ali Abbas Jaffri <[email protected]> * Updated project dependencies Signed-off-by: Ali Abbas Jaffri <[email protected]> --------- Signed-off-by: Ali Abbas Jaffri <[email protected]>
- Loading branch information
1 parent
c7a2fa5
commit 39407d0
Showing
10 changed files
with
1,170 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,22 @@ | ||
name: Install Python dependencies | ||
description: Install all core and optional Python dependencies | ||
inputs: | ||
pythonVersion: | ||
description: Python version to set up (see actions/setup-python@v4) | ||
required: true | ||
dependencyType: | ||
description: The type of dependencies to install (dev or docs) | ||
required: true | ||
default: "dev" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v4 | ||
with: | ||
# Install a specific version of uv. | ||
version: "0.4.30" | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.pythonVersion }} | ||
python-version-file: ".python-version" | ||
cache: "pip" | ||
cache-dependency-path: | | ||
requirements-dev.txt | ||
requirements-docs.txt | ||
pyproject.toml | ||
- name: Install uv | ||
run: | | ||
pip install uv && uv venv venv && source venv/bin/activate | ||
shell: bash | ||
- run: echo "VIRTUAL_ENV=venv" >> $GITHUB_ENV | ||
uv.lock | ||
- run: echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Install dependencies | ||
run: | | ||
uv pip install --upgrade --system pip && uv pip install --system pip-tools | ||
if [[ "${{ inputs.dependencyType }}" == "dev" ]]; then | ||
uv pip install --system -r requirements-dev.txt | ||
elif [[ "${{ inputs.dependencyType }}" == "docs" ]]; then | ||
uv pip install --system -r requirements-docs.txt | ||
fi | ||
uv pip install --system -e . --no-deps | ||
- name: Install the project | ||
run: uv sync --all-extras | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,19 +24,16 @@ jobs: | |
fetch-depth: 0 # for documentation builds | ||
- name: Set up Python and dependencies | ||
uses: ./.github/actions/setup-python | ||
with: | ||
pythonVersion: "3.11" | ||
dependencyType: "dev" | ||
- name: Cache pre-commit tools | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
${{ env.MYPY_CACHE_DIR }} | ||
${{ env.RUFF_CACHE_DIR }} | ||
${{ env.PRE_COMMIT_HOME }} | ||
key: ${{ runner.os }}-${{ hashFiles('requirements-dev.txt', '.pre-commit-config.yaml') }}-linter-cache | ||
key: ${{ runner.os }}-${{ hashFiles('uv.lock', '.pre-commit-config.yaml') }}-linter-cache | ||
- name: Run pre-commit checks | ||
run: pre-commit run --all-files --verbose --show-diff-on-failure | ||
uses: pre-commit/[email protected] | ||
test: | ||
name: Test mlinfra on ubuntu-latest | ||
runs-on: ubuntu-latest | ||
|
@@ -46,13 +43,9 @@ jobs: | |
fetch-depth: 0 | ||
- name: Set up Python and dependencies | ||
uses: ./.github/actions/setup-python | ||
with: | ||
pythonVersion: "3.11" | ||
dependencyType: "dev" | ||
- name: Run Tests | ||
run: | | ||
pytest | ||
uv run pytest | ||
docs: | ||
name: Build documentation for mlinfra | ||
runs-on: ubuntu-latest | ||
|
@@ -62,9 +55,6 @@ jobs: | |
fetch-depth: 0 | ||
- name: Set up Python and dependencies | ||
uses: ./.github/actions/setup-python | ||
with: | ||
pythonVersion: "3.11" | ||
dependencyType: "docs" | ||
- name: Build documentation using mike | ||
uses: ./.github/actions/mike-docs | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,13 +23,8 @@ jobs: | |
fetch-depth: 0 # for documentation builds | ||
- name: Set up Python and dependencies | ||
uses: ./.github/actions/setup-python | ||
with: | ||
pythonVersion: "3.11" | ||
dependencyType: "dev" | ||
- name: Install build tools | ||
run: | | ||
pip install build | ||
python -m build | ||
run: uv build | ||
- name: Upload build artifacts | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -50,9 +45,6 @@ jobs: | |
ssh-key: ${{ secrets.DEPLOY_KEY }} | ||
- name: Set up Python and dependencies | ||
uses: ./.github/actions/setup-python | ||
with: | ||
pythonVersion: "3.11" | ||
dependencyType: "docs" | ||
- name: Append release notes to RELEASE_NOTES.md # automatically update release notes on new release | ||
run: | | ||
git config --local user.email "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.