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.
Files changed (69) hide show
  1. saiph-2.0.12/.github/workflows/prepare-release.yml +73 -0
  2. {saiph-2.0.11 → saiph-2.0.12}/.github/workflows/saiph-ci.yml +4 -2
  3. {saiph-2.0.11 → saiph-2.0.12}/PKG-INFO +1 -1
  4. {saiph-2.0.11 → saiph-2.0.12}/justfile +4 -0
  5. {saiph-2.0.11 → saiph-2.0.12}/pyproject.toml +1 -1
  6. {saiph-2.0.11 → saiph-2.0.12}/release.py +14 -9
  7. {saiph-2.0.11 → saiph-2.0.12}/saiph/__init__.py +1 -1
  8. {saiph-2.0.11 → saiph-2.0.12}/uv.lock +1 -1
  9. {saiph-2.0.11 → saiph-2.0.12}/.github/dependabot.yml +0 -0
  10. {saiph-2.0.11 → saiph-2.0.12}/.github/workflows/pr-title.yml +0 -0
  11. {saiph-2.0.11 → saiph-2.0.12}/.github/workflows/release.yml +0 -0
  12. {saiph-2.0.11 → saiph-2.0.12}/.gitignore +0 -0
  13. {saiph-2.0.11 → saiph-2.0.12}/.pre-commit-config.yaml +0 -0
  14. {saiph-2.0.11 → saiph-2.0.12}/.readthedocs.yaml +0 -0
  15. {saiph-2.0.11 → saiph-2.0.12}/.tool-versions +0 -0
  16. {saiph-2.0.11 → saiph-2.0.12}/CONTRIBUTING.md +0 -0
  17. {saiph-2.0.11 → saiph-2.0.12}/LICENSE +0 -0
  18. {saiph-2.0.11 → saiph-2.0.12}/README.md +0 -0
  19. {saiph-2.0.11 → saiph-2.0.12}/bin/create_csv.py +0 -0
  20. {saiph-2.0.11 → saiph-2.0.12}/docs/conf.py +0 -0
  21. {saiph-2.0.11 → saiph-2.0.12}/docs/index.rst +0 -0
  22. {saiph-2.0.11 → saiph-2.0.12}/docs/requirements.txt +0 -0
  23. {saiph-2.0.11 → saiph-2.0.12}/docs/source/example/README.rst +0 -0
  24. {saiph-2.0.11 → saiph-2.0.12}/docs/source/example/plot_example.py +0 -0
  25. {saiph-2.0.11 → saiph-2.0.12}/docs/source/reference.rst +0 -0
  26. {saiph-2.0.11 → saiph-2.0.12}/fixtures/iris.csv +0 -0
  27. {saiph-2.0.11 → saiph-2.0.12}/fixtures/wbcd.csv +0 -0
  28. {saiph-2.0.11 → saiph-2.0.12}/ruff.toml +0 -0
  29. {saiph-2.0.11 → saiph-2.0.12}/saiph/conftest.py +0 -0
  30. {saiph-2.0.11 → saiph-2.0.12}/saiph/contribution.py +0 -0
  31. {saiph-2.0.11 → saiph-2.0.12}/saiph/contribution_test.py +0 -0
  32. {saiph-2.0.11 → saiph-2.0.12}/saiph/exception.py +0 -0
  33. {saiph-2.0.11 → saiph-2.0.12}/saiph/inverse_transform.py +0 -0
  34. {saiph-2.0.11 → saiph-2.0.12}/saiph/inverse_transform_test.py +0 -0
  35. {saiph-2.0.11 → saiph-2.0.12}/saiph/lib/size.py +0 -0
  36. {saiph-2.0.11 → saiph-2.0.12}/saiph/models.py +0 -0
  37. {saiph-2.0.11 → saiph-2.0.12}/saiph/projection.py +0 -0
  38. {saiph-2.0.11 → saiph-2.0.12}/saiph/projection_test.py +0 -0
  39. {saiph-2.0.11 → saiph-2.0.12}/saiph/py.typed +0 -0
  40. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/__init__.py +0 -0
  41. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/famd.py +0 -0
  42. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/famd_sparse.py +0 -0
  43. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/famd_sparse_test.py +0 -0
  44. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/famd_test.py +0 -0
  45. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/mca.py +0 -0
  46. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/mca_test.py +0 -0
  47. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/pca.py +0 -0
  48. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/pca_test.py +0 -0
  49. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/utils/__init__.py +0 -0
  50. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/utils/common.py +0 -0
  51. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/utils/common_test.py +0 -0
  52. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/utils/svd.py +0 -0
  53. {saiph-2.0.11 → saiph-2.0.12}/saiph/reduction/utils/svd_test.py +0 -0
  54. {saiph-2.0.11 → saiph-2.0.12}/saiph/serializer.py +0 -0
  55. {saiph-2.0.11 → saiph-2.0.12}/saiph/serializer_test.py +0 -0
  56. {saiph-2.0.11 → saiph-2.0.12}/saiph/tests/__init_.py +0 -0
  57. {saiph-2.0.11 → saiph-2.0.12}/saiph/tests/benchmark_test.py +0 -0
  58. {saiph-2.0.11 → saiph-2.0.12}/saiph/tests/profile_cpu.py +0 -0
  59. {saiph-2.0.11 → saiph-2.0.12}/saiph/tests/profile_memory.py +0 -0
  60. {saiph-2.0.11 → saiph-2.0.12}/saiph/visualization.py +0 -0
  61. {saiph-2.0.11 → saiph-2.0.12}/setup.cfg +0 -0
  62. {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/breast_cancer_wisconsin.csv +0 -0
  63. {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/breast_cancer_wisconsin_supplemental.csv +0 -0
  64. {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/iris.csv +0 -0
  65. {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/iris_factomineR_contributions.csv +0 -0
  66. {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/iris_factomineR_cos2.csv +0 -0
  67. {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/wbcd_supplemental_coordinates_famd.csv +0 -0
  68. {saiph-2.0.11 → saiph-2.0.12}/tests/fixtures/wbcd_supplemental_coordinates_mca.csv +0 -0
  69. {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: pull_request
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: uv sync --extra matplotlib --group dev --group doc
34
+ run: just install-packages
33
35
 
34
36
  - name: Typecheck
35
37
  run: just typecheck
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: saiph
3
- Version: 2.0.11
3
+ Version: 2.0.12
4
4
  Summary: A projection package
5
5
  Author-email: Octopize <help@octopize.io>
6
6
  License: Apache-2.0
@@ -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
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "saiph"
3
3
  # Also modify in saiph/__init__.py
4
- version = "2.0.11"
4
+ version = "2.0.12"
5
5
  description = "A projection package"
6
6
  authors = [
7
7
  {name = "Octopize", email = "help@octopize.io"}
@@ -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
- should_bump = typer.confirm(
104
- f"Upgrade version from {current_version} to {next_version}?"
105
- )
106
- if not should_bump:
107
- raise typer.Abort()
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()
@@ -2,7 +2,7 @@ from .inverse_transform import inverse_transform
2
2
  from .projection import fit, fit_transform, stats, transform
3
3
 
4
4
  # Also modify in pyproject.toml
5
- __version__ = "2.0.11"
5
+ __version__ = "2.0.12"
6
6
 
7
7
  __all__ = [
8
8
  "__version__",
@@ -2168,7 +2168,7 @@ wheels = [
2168
2168
 
2169
2169
  [[package]]
2170
2170
  name = "saiph"
2171
- version = "2.0.11"
2171
+ version = "2.0.12"
2172
2172
  source = { editable = "." }
2173
2173
  dependencies = [
2174
2174
  { name = "matplotlib" },
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