saiph 2.0.11__tar.gz → 2.0.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- saiph-2.0.12/.github/workflows/prepare-release.yml +73 -0
- {saiph-2.0.11 → saiph-2.0.12}/.github/workflows/saiph-ci.yml +4 -2
- {saiph-2.0.11 → saiph-2.0.12}/PKG-INFO +1 -1
- {saiph-2.0.11 → saiph-2.0.12}/justfile +4 -0
- {saiph-2.0.11 → saiph-2.0.12}/pyproject.toml +1 -1
- {saiph-2.0.11 → saiph-2.0.12}/release.py +14 -9
- {saiph-2.0.11 → saiph-2.0.12}/saiph/__init__.py +1 -1
- {saiph-2.0.11 → saiph-2.0.12}/uv.lock +1 -1
- {saiph-2.0.11 → saiph-2.0.12}/.github/dependabot.yml +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/.github/workflows/pr-title.yml +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/.github/workflows/release.yml +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/.gitignore +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/.pre-commit-config.yaml +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/.readthedocs.yaml +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/.tool-versions +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/CONTRIBUTING.md +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/LICENSE +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/README.md +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/bin/create_csv.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/docs/conf.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/docs/index.rst +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/docs/requirements.txt +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/docs/source/example/README.rst +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/docs/source/example/plot_example.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/docs/source/reference.rst +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/fixtures/iris.csv +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/fixtures/wbcd.csv +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/ruff.toml +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/conftest.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/contribution.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/contribution_test.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/exception.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/inverse_transform.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/inverse_transform_test.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/lib/size.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/models.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/projection.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/projection_test.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/py.typed +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/__init__.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/famd.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/famd_sparse.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/famd_sparse_test.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/famd_test.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/mca.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/mca_test.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/pca.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/pca_test.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/utils/__init__.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/utils/common.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/utils/common_test.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/utils/svd.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/utils/svd_test.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/serializer.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/serializer_test.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/tests/__init_.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/tests/benchmark_test.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/tests/profile_cpu.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/tests/profile_memory.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/saiph/visualization.py +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/setup.cfg +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/breast_cancer_wisconsin.csv +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/breast_cancer_wisconsin_supplemental.csv +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/iris.csv +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/iris_factomineR_contributions.csv +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/iris_factomineR_cos2.csv +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/wbcd_supplemental_coordinates_famd.csv +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/wbcd_supplemental_coordinates_mca.csv +0 -0
- {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/wbcd_supplemental_coordinates_pca.csv +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
name: "Prepare Release"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
bump_type:
|
|
7
|
+
description: "Version bump type"
|
|
8
|
+
type: choice
|
|
9
|
+
options: [patch, minor, major]
|
|
10
|
+
default: patch
|
|
11
|
+
run_tests:
|
|
12
|
+
description: "Run CI tests before releasing"
|
|
13
|
+
type: boolean
|
|
14
|
+
default: true
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
18
|
+
cancel-in-progress: false
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
run-saiph-ci:
|
|
22
|
+
name: Run Saiph CI
|
|
23
|
+
if: inputs.run_tests
|
|
24
|
+
uses: ./.github/workflows/saiph-ci.yml
|
|
25
|
+
secrets: inherit
|
|
26
|
+
|
|
27
|
+
prepare-release:
|
|
28
|
+
name: Prepare Release
|
|
29
|
+
needs: [run-saiph-ci]
|
|
30
|
+
if: ${{ !failure() && !cancelled() }}
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
permissions:
|
|
33
|
+
contents: write
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
- name: Checkout code
|
|
37
|
+
uses: actions/checkout@v6
|
|
38
|
+
with:
|
|
39
|
+
ssh-key: ${{ secrets.OCTOBOT_SSH_PRIVATE_KEY }}
|
|
40
|
+
fetch-depth: 0
|
|
41
|
+
ref: refs/heads/main
|
|
42
|
+
|
|
43
|
+
- name: Set up Python
|
|
44
|
+
uses: actions/setup-python@v6
|
|
45
|
+
with:
|
|
46
|
+
python-version: "3.13"
|
|
47
|
+
|
|
48
|
+
- name: Install uv
|
|
49
|
+
uses: astral-sh/setup-uv@v7
|
|
50
|
+
with:
|
|
51
|
+
enable-cache: true
|
|
52
|
+
|
|
53
|
+
- name: Install just
|
|
54
|
+
uses: extractions/setup-just@v4
|
|
55
|
+
|
|
56
|
+
- name: Install dependencies
|
|
57
|
+
run: just install-packages
|
|
58
|
+
|
|
59
|
+
- name: Configure git user
|
|
60
|
+
run: |
|
|
61
|
+
git config --global user.email 'octobot@octopize.io'
|
|
62
|
+
git config --global user.name 'octopize-bot'
|
|
63
|
+
|
|
64
|
+
- name: Import GPG key
|
|
65
|
+
id: import-gpg
|
|
66
|
+
uses: crazy-max/ghaction-import-gpg@v7
|
|
67
|
+
with:
|
|
68
|
+
gpg_private_key: ${{ secrets.OCTOBOT_GPG_PRIVATE_KEY }}
|
|
69
|
+
git_user_signingkey: true
|
|
70
|
+
git_commit_gpgsign: true
|
|
71
|
+
|
|
72
|
+
- name: Prepare release
|
|
73
|
+
run: uv run python release.py --bump-type ${{ inputs.bump_type }} --yes
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
name: "Check PR ci"
|
|
2
2
|
|
|
3
|
-
on:
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
workflow_call:
|
|
4
6
|
|
|
5
7
|
jobs:
|
|
6
8
|
saiph-ci:
|
|
@@ -29,7 +31,7 @@ jobs:
|
|
|
29
31
|
uses: extractions/setup-just@v4
|
|
30
32
|
|
|
31
33
|
- name: Install dependencies
|
|
32
|
-
run:
|
|
34
|
+
run: just install-packages
|
|
33
35
|
|
|
34
36
|
- name: Typecheck
|
|
35
37
|
run: just typecheck
|
|
@@ -7,6 +7,10 @@ default:
|
|
|
7
7
|
# Install the stack
|
|
8
8
|
install:
|
|
9
9
|
uvx pre-commit install --hook-type commit-msg
|
|
10
|
+
just install-packages
|
|
11
|
+
|
|
12
|
+
# Install packages only (without pre-commit hooks, for CI use)
|
|
13
|
+
install-packages:
|
|
10
14
|
uv sync --extra matplotlib --group dev --group doc
|
|
11
15
|
|
|
12
16
|
# Prepare a new release of saiph
|
|
@@ -90,7 +90,7 @@ def get_version_from_file(filename: Path) -> Optional[Match]: # type: ignore[ty
|
|
|
90
90
|
return get_version_match(file.read(), KEY_MAPPING[filename])
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
def bump_version(bump_type: BumpType) -> None:
|
|
93
|
+
def bump_version(bump_type: BumpType, yes: bool = False) -> None:
|
|
94
94
|
version = get_version_from_file(PYPROJECT_TOML)
|
|
95
95
|
|
|
96
96
|
if not version:
|
|
@@ -100,11 +100,12 @@ def bump_version(bump_type: BumpType) -> None:
|
|
|
100
100
|
|
|
101
101
|
next_version = bump(version, bump_type)
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
if not yes:
|
|
104
|
+
should_bump = typer.confirm(
|
|
105
|
+
f"Upgrade version from {current_version} to {next_version}?"
|
|
106
|
+
)
|
|
107
|
+
if not should_bump:
|
|
108
|
+
raise typer.Abort()
|
|
108
109
|
|
|
109
110
|
bump_version_in_file(PYPROJECT_TOML, key="version", bump_type=bump_type)
|
|
110
111
|
bump_version_in_file(INIT_PY, key="__version__", bump_type=bump_type)
|
|
@@ -186,7 +187,10 @@ def push() -> None:
|
|
|
186
187
|
raise typer.Exit(result)
|
|
187
188
|
|
|
188
189
|
|
|
189
|
-
def check_preconditions() -> None:
|
|
190
|
+
def check_preconditions(yes: bool = False) -> None:
|
|
191
|
+
if yes:
|
|
192
|
+
return
|
|
193
|
+
|
|
190
194
|
preconditions = [
|
|
191
195
|
"Have you run 'make lci'?",
|
|
192
196
|
]
|
|
@@ -200,6 +204,7 @@ def check_preconditions() -> None:
|
|
|
200
204
|
@app.command()
|
|
201
205
|
def release(
|
|
202
206
|
bump_type: BumpType = typer.Option(default=BumpType.PATCH.value),
|
|
207
|
+
yes: bool = typer.Option(False, "--yes", "-y", help="Skip all confirmations (for CI use)"),
|
|
203
208
|
) -> Any:
|
|
204
209
|
proc = subprocess.Popen(
|
|
205
210
|
args=("git", "branch", "--show-current"), stdout=PIPE, text=True
|
|
@@ -212,8 +217,8 @@ def release(
|
|
|
212
217
|
)
|
|
213
218
|
raise typer.Exit(1)
|
|
214
219
|
|
|
215
|
-
check_preconditions()
|
|
216
|
-
bump_version(bump_type)
|
|
220
|
+
check_preconditions(yes)
|
|
221
|
+
bump_version(bump_type, yes)
|
|
217
222
|
run_uv_lock()
|
|
218
223
|
commit_and_tag()
|
|
219
224
|
push()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|