Skip to content

Commit 4e19244

Browse files
chore(skore-mlflow-project): Move from package to python sub-module (#2897)
Co-authored-by: Guillaume Lemaitre <guillaume@probabl.ai>
1 parent 0a367bd commit 4e19244

52 files changed

Lines changed: 2644 additions & 5029 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pr-display-code-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
package: ["skore", "skore-mlflow-project"]
21+
package: ["skore"]
2222
permissions:
2323
actions: read
2424
contents: read

.github/workflows/pytest.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ defaults:
3939
shell: bash
4040

4141
env:
42-
PACKAGES: '["skore","skore-mlflow-project"]'
42+
PACKAGES: '["skore"]'
4343

4444
jobs:
4545
pytest-changes:
@@ -114,10 +114,10 @@ jobs:
114114
(echo "${changes}" | (! grep -qE "ci/requirements/${{ matrix.package }}/.*/test-requirements.txt"))
115115
then
116116
curl -LsSf https://astral.sh/uv/0.6.16/install.sh | sh
117-
bash ci/pip-compile.sh --test-requirements ${{ matrix.package }}
117+
bash ci/pip-compile.sh --test-requirements
118118
119119
if (git diff --name-only | grep -qE "ci/requirements/${{ matrix.package }}/.*/test-requirements.txt"); then
120-
echo '::error title=${{ matrix.package }}-test-lockfiles::Lockfiles obsolete, please execute `$ bash ci/pip-compile.sh --test-requirements ${{ matrix.package }}`'
120+
echo '::error title=${{ matrix.package }}-test-lockfiles::Lockfiles obsolete, please execute `$ bash ci/pip-compile.sh --test-requirements`'
121121
exit 1
122122
fi
123123
fi
@@ -256,13 +256,13 @@ jobs:
256256

257257
- name: Test without coverage
258258
if: ${{ ! matrix.coverage }}
259-
timeout-minutes: 15
259+
timeout-minutes: 20
260260
working-directory: ${{ matrix.package }}/
261261
run: python -m pytest src/ tests/ --no-cov
262262

263263
- name: Test with coverage
264264
if: ${{ matrix.coverage }}
265-
timeout-minutes: 15
265+
timeout-minutes: 20
266266
working-directory: ${{ matrix.package }}/
267267
run: |
268268
mkdir coverage

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
version="${GITHUB_REF_NAME#*/}"
3333
3434
[[ "${package}" == "${version}" ]] && { >&2 echo "Invalid tag: no package"; exit 1; }
35-
[[ "${package}" =~ ^(skore|skore-mlflow-project)$ ]] || { >&2 echo "Invalid tag: invalid package"; exit 1; }
35+
[[ "${package}" =~ ^skore$ ]] || { >&2 echo "Invalid tag: invalid package"; exit 1; }
3636
[[ "${version}" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-rc\.(1|[1-9][0-9]*))?$ ]] || { >&2 echo "Invalid tag: invalid version"; exit 1; }
3737
3838
echo "::group::Details"

.github/workflows/sphinx.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ jobs:
239239
- name: Install all packages from local branch
240240
run: |
241241
python -m pip install --force-reinstall --no-deps skore/
242-
python -m pip install --force-reinstall --no-deps skore-mlflow-project/
243242
244243
- name: Build documentation
245244
working-directory: sphinx

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ examples/integrations/mlruns/
197197

198198
# Exclude hatch artifacts
199199
skore/LICENSE
200-
skore-mlflow-project/LICENSE
201200
.aider*
202201

203202
# uv

.pre-commit-config.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,18 @@ repos:
2020
hooks:
2121

2222
- id: ruff-check
23-
files: ^((skore|skore-mlflow-project)/(hatch|src|tests))|(examples)/
23+
files: ^(skore/(hatch|src|tests))|(examples)/
2424
args: [--fix, --extend-select, I]
2525

2626
- id: ruff-format
27-
files: ^((skore|skore-mlflow-project)/(hatch|src|tests))|(examples)/
27+
files: ^(skore/(hatch|src|tests))|(examples)/
2828

2929
- repo: https://github.com/pre-commit/mirrors-mypy
3030
rev: v1.20.2
3131
hooks:
3232

3333
- id: mypy
3434
pass_filenames: false
35-
alias: mypy-skore
36-
name: mypy skore/
3735
files: ^skore/
3836
args: [--config-file=skore/pyproject.toml, skore]
3937
additional_dependencies:
@@ -61,11 +59,5 @@ repos:
6159
- httpx
6260
- orjson
6361
- pydantic
64-
65-
- id: mypy
66-
pass_filenames: false
67-
alias: mypy-skore-mlflow-project
68-
name: mypy skore-mlflow-project/
69-
files: ^skore-mlflow-project/
70-
args: [--config-file=skore-mlflow-project/pyproject.toml, skore-mlflow-project]
71-
additional_dependencies: [skore, mlflow]
62+
# from mlflow dependencies
63+
- mlflow

ci/pip-compile.sh

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
#
77
# You can pass any `uv pip compile` parameter:
88
#
9-
# $ bash pip-compile.sh --test-requirements <skore|skore-mlflow-project> --upgrade
9+
# $ bash pip-compile.sh --test-requirements --upgrade
1010
# $ bash pip-compile.sh --sphinx-requirements --upgrade
1111
#
1212

1313
usage () {
1414
>&2 echo "Usage:"
15-
>&2 echo " $ bash pip-compile.sh --test-requirements <all|skore|skore-mlflow-project> [option...]"
15+
>&2 echo " $ bash pip-compile.sh --test-requirements [option...]"
1616
>&2 echo " $ bash pip-compile.sh --sphinx-requirements [option...]"
1717
}
1818

@@ -26,40 +26,19 @@ trap 'rm -rf ${TMPDIR}' 0
2626
# Construct `COMBINATIONS` based on arguments
2727
case $1 in
2828
"--test-requirements")
29-
PACKAGES=()
30-
31-
case $2 in
32-
"all")
33-
PACKAGES+=("skore")
34-
PACKAGES+=("skore-mlflow-project")
35-
;;
36-
"skore"|"skore-mlflow-project")
37-
PACKAGES+=($2)
38-
;;
39-
*)
40-
>&2 echo -e "Error: Unknown PACKAGE \033[0;41m$2\033[0m"
41-
usage
42-
exit 1
43-
;;
44-
esac
45-
46-
for PACKAGE in "${PACKAGES[@]}"; do
47-
while IFS= read -r combination; do
48-
python=$(jq -rc '.python' <<< "${combination}")
49-
dependencies=$(jq -rc '.dependencies' <<< "${combination}")
50-
51-
COMBINATIONS+=("${PACKAGE}|test|${python}|${dependencies}")
52-
done < <(
53-
jq 'unique_by([.python, .dependencies]) | .[]' "${CWD}/../${PACKAGE}/supported-versions.json" -c
54-
)
55-
done
29+
while IFS= read -r combination; do
30+
python=$(jq -rc '.python' <<< "${combination}")
31+
dependencies=$(jq -rc '.dependencies' <<< "${combination}")
32+
33+
COMBINATIONS+=("skore|test|${python}|${dependencies}")
34+
done < <(
35+
jq 'unique_by([.python, .dependencies]) | .[]' "${CWD}/../skore/supported-versions.json" -c
36+
)
5637

5738
unset combination
5839
unset python
5940
unset dependencies
60-
unset PACKAGES
61-
unset PACKAGE
62-
shift 2
41+
shift
6342
;;
6443
"--sphinx-requirements")
6544
COMBINATIONS+=('skore|sphinx|3.14|["scikit-learn==1.8.*"]')

ci/requirements/skore-mlflow-project/python-3.11/.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)