Skip to content
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

Adopt UV in GHA #629

Merged
merged 16 commits into from
Mar 23, 2024
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request-template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Feature Request Template
name: New Feature Request
about: This is a template for a Feature Request
title: "[FEATURE]"
labels: enhancement
Expand Down
11 changes: 6 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
Before working on a large PR, please check with @koaning or @MBrouns that they agree with the direction of the PR. This discussion should take place in a Github issue before working on the PR, unless it's a minor change like spelling in the docs.
Before working on a large PR, please check with @FBruzzesi or @koaning to confirm that they agree with the direction of the PR. This discussion should take place in a [Github issue](https://github.com/koaning/scikit-lego/issues/new/choose) before working on the PR, unless it's a minor change like spelling in the docs.

# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)
Fixes #(issue)

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)


# Checklist:
## Checklist:

- [ ] My code follows the style guidelines (flake8)
- [ ] My code follows the style guidelines (ruff)
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation (also to the readme.md)
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added tests to check whether the new feature adheres to the sklearn convention
- [ ] New and existing unit tests pass locally with my changes

If you feel your PR is ready for a review, ping @koaning or @mbrouns.
If you feel your PR is ready for a review, ping @FBruzzesi or @koaning.
13 changes: 7 additions & 6 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,34 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install pytest
uv pip install pytest setuptools wheel --system
- name: Run Base Install
run: |
python -m pip install -e .
uv pip install -e . --system
- name: Run Checks
run: |
python tests/scripts/check_pip.py missing cvxpy
python tests/scripts/check_pip.py installed scikit-learn
python tests/scripts/import_all.py
- name: Install cvxpy
run: |
python -m pip install -e ".[cvxpy]"
uv pip install -e ".[cvxpy]" --system
- name: Run Checks
run: |
python tests/scripts/check_pip.py installed cvxpy scikit-learn
python tests/scripts/import_all.py
- name: Install All
run: |
python -m pip install -e ".[all]"
uv pip install -e ".[all]" --system
- name: Run Checks
run: |
python tests/scripts/check_pip.py installed cvxpy formulaic scikit-learn umap-learn
- name: Docs can Build
run: |
sudo apt-get update && sudo apt-get install pandoc
python -m pip install -e ".[docs]"
uv pip install -e ".[docs]" --system
mkdocs build
17 changes: 12 additions & 5 deletions .github/workflows/schedule-dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Cron Test Dependencies

on:
workflow_dispatch:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is highly unnecessary, but maybe come useful for testing --pre on a specific branch before merging.
We I don't have another way of running it

schedule:
- cron: "0 0 * * *"


jobs:
cron:
Expand All @@ -15,17 +17,22 @@ jobs:
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install uv (Unix)
if: runner.os != 'Windows'
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install uv (Windows)
if: runner.os == 'Windows'
run: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel
pip install ${{ matrix.pre-release-dependencies }} scikit-lego
pip freeze
uv pip install wheel --system
uv pip install ${{ matrix.pre-release-dependencies }} scikit-lego --system
uv pip freeze
- name: Test with pytest
run: |
pip install -e ".[test]"
uv pip install -e ".[test]" --system
make test
13 changes: 8 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ jobs:
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install uv (Unix)
if: runner.os != 'Windows'
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install uv (Windows)
if: runner.os == 'Windows'
run: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip --no-cache-dir
python -m pip install -e ".[test]"
run: uv pip install -e ".[test]" --system
- name: Test with pytest
run: |
make test
run: make test