-
Notifications
You must be signed in to change notification settings - Fork 56
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
MNT moving to pixi for better CI reprodocibility #451
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
763e020
move to pyproject.toml build system
adrinjalali cc8578e
remove setup.cfg
adrinjalali 75dc0af
config and workflow
adrinjalali 92dc3a7
wanna see all runs
adrinjalali 00d71d9
only run new ones
adrinjalali b28b7e0
contributing docs
adrinjalali 6d768b8
pixi versoin
adrinjalali 4b0b7dd
mypy
adrinjalali 802ee98
...
adrinjalali 71533c3
...
adrinjalali 14f8dfd
...
adrinjalali 6a1b4fa
trigger CI
adrinjalali 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
pytest: | ||
|
@@ -15,25 +15,17 @@ jobs: | |
strategy: | ||
fail-fast: false # need to see which ones fail | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python: ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
# this is to make the CI run on different sklearn versions | ||
include: | ||
- python: "3.9" | ||
sklearn_version: ">=1.1,<1.2" | ||
numpy_version: "numpy<2" | ||
- python: "3.10" | ||
sklearn_version: ">=1.2,<1.3" | ||
numpy_version: "numpy" | ||
- python: "3.11" | ||
sklearn_version: ">=1.4,<1.5" | ||
numpy_version: "numpy" | ||
- python: "3.12" | ||
sklearn_version: ">=1.5,<1.6" | ||
numpy_version: "numpy" | ||
- python: "3.13" | ||
sklearn_version: "nightly" | ||
numpy_version: "numpy" | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
environment: [ | ||
# ci-min-deps, | ||
# ci-sklearn11, | ||
# ci-sklearn12, | ||
# ci-sklearn13, | ||
# ci-sklearn14, | ||
ci-sklearn15, | ||
ci-sklearn16, | ||
ci-sklearn17 | ||
] | ||
|
||
# Timeout: https://stackoverflow.com/a/59076067/4521646 | ||
timeout-minutes: 15 | ||
|
@@ -52,55 +44,19 @@ jobs: | |
echo PR_COMMIT_MESSAGE=$(git log -1 --pretty=format:\"%s\") >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v5 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
python-version: ${{ matrix.python }} | ||
pixi-version: v0.39.0 | ||
environments: ${{ matrix.environment }} | ||
# we can freeze the environment and manually bump the dependencies to the | ||
# latest version time to time. | ||
frozen: true | ||
|
||
- name: Install dependencies | ||
run: | | ||
set -x | ||
python -m pip install -U pip | ||
if [ "${{ matrix.os }}" == "macos-latest" ]; then | ||
brew install libomp | ||
fi | ||
pip install "pytest<8" | ||
pip install "${{ matrix.numpy_version }}" | ||
if [ ${{ matrix.sklearn_version }} == "nightly" ]; then | ||
pip install --pre --extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scikit-learn | ||
pip install .[docs,tests] | ||
else | ||
pip install .[docs,tests] "scikit-learn${{ matrix.sklearn_version }}" | ||
fi | ||
pip install black=="23.9.1" ruff=="0.0.292" mypy=="1.6.0" | ||
if [ ${{ matrix.os }} == "ubuntu-latest" ]; then | ||
sudo apt install pandoc && pandoc --version; | ||
fi | ||
python --version | ||
pip --version | ||
pip list | ||
shell: bash | ||
|
||
- name: Check black | ||
run: black --check --diff . | ||
|
||
- name: Check ruff | ||
run: ruff check --diff . | ||
|
||
- name: Tests | ||
env: | ||
SUPER_SECRET: ${{ secrets.HF_HUB_TOKEN }} | ||
PYTHONIOENCODING: "utf-8" | ||
run: | | ||
python -m pytest -s -v --cov-report=xml -m "not inference" skops/ | ||
|
||
- name: Mypy | ||
run: mypy --config-file pyproject.toml skops | ||
- name: Linters | ||
run: pixi run -e lint lint | ||
|
||
- name: Inference tests (conditional) | ||
if: contains(env.PR_COMMIT_MESSAGE, '[CI inference]') | ||
run: | | ||
python -l -m pytest -s -v -m "inference" skops/ | ||
- name: Run tests | ||
run: pixi run -e ${{ matrix.environment }} tests | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v5 | ||
|
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[concurrency] | ||
downloads = 20 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
-e .[docs] | ||
matplotlib>=3.3 | ||
pandas>=1 | ||
fairlearn>=0.7.0 | ||
sphinx>=3.2.0 | ||
sphinx-gallery>=0.7.0 | ||
sphinx-rtd-theme>=1 | ||
numpydoc>=1.0.0 | ||
sphinx-prompt>=1.3.0 | ||
sphinx-issues>=1.2.0 | ||
-e .[rich] |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
In a next iterations, you can add something like this actions: https://github.com/skrub-data/
It allows to run the
pixi update
via an Actions and open a pull-request