cupy-stubs 1.1.0__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 (43) hide show
  1. cupy_stubs-1.1.0/.cirun.yml +11 -0
  2. cupy_stubs-1.1.0/.cruft.json +44 -0
  3. cupy_stubs-1.1.0/.editorconfig +15 -0
  4. cupy_stubs-1.1.0/.gitattributes +1 -0
  5. cupy_stubs-1.1.0/.github/dependabot.yml +21 -0
  6. cupy_stubs-1.1.0/.github/workflows/autofix.yaml +29 -0
  7. cupy_stubs-1.1.0/.github/workflows/build.yaml +30 -0
  8. cupy_stubs-1.1.0/.github/workflows/release.yaml +33 -0
  9. cupy_stubs-1.1.0/.github/workflows/test.yaml +67 -0
  10. cupy_stubs-1.1.0/.gitignore +22 -0
  11. cupy_stubs-1.1.0/.pre-commit-config.yaml +60 -0
  12. cupy_stubs-1.1.0/.vscode/extensions.json +18 -0
  13. cupy_stubs-1.1.0/.vscode/launch.json +33 -0
  14. cupy_stubs-1.1.0/.vscode/settings.json +20 -0
  15. cupy_stubs-1.1.0/LICENSE +373 -0
  16. cupy_stubs-1.1.0/PKG-INFO +62 -0
  17. cupy_stubs-1.1.0/README.md +39 -0
  18. cupy_stubs-1.1.0/biome.jsonc +17 -0
  19. cupy_stubs-1.1.0/pyproject.toml +148 -0
  20. cupy_stubs-1.1.0/src/cupy-stubs/__init__.pyi +8 -0
  21. cupy_stubs-1.1.0/src/cupy-stubs/_core/__init__.pyi +3 -0
  22. cupy_stubs-1.1.0/src/cupy-stubs/_core/core.pyi +127 -0
  23. cupy_stubs-1.1.0/src/cupy-stubs/_core/flags.pyi +8 -0
  24. cupy_stubs-1.1.0/src/cupy-stubs/_creation/__init__.pyi +1 -0
  25. cupy_stubs-1.1.0/src/cupy-stubs/_creation/basic.pyi +14 -0
  26. cupy_stubs-1.1.0/src/cupy-stubs/_creation/from_data.pyi +28 -0
  27. cupy_stubs-1.1.0/src/cupy-stubs/_logic/__init__.pyi +1 -0
  28. cupy_stubs-1.1.0/src/cupy-stubs/_logic/comparison.pyi +6 -0
  29. cupy_stubs-1.1.0/src/cupy-stubs/_manipulation/__init__.pyi +1 -0
  30. cupy_stubs-1.1.0/src/cupy-stubs/_manipulation/dims.pyi +6 -0
  31. cupy_stubs-1.1.0/src/cupy-stubs/_manipulation/join.pyi +16 -0
  32. cupy_stubs-1.1.0/src/cupy-stubs/cuda.pyi +3 -0
  33. cupy_stubs-1.1.0/src/cupy-stubs/py.typed +1 -0
  34. cupy_stubs-1.1.0/src/cupyx-stubs/__init__.pyi +1 -0
  35. cupy_stubs-1.1.0/src/cupyx-stubs/py.typed +1 -0
  36. cupy_stubs-1.1.0/src/cupyx-stubs/scipy/__init__.pyi +1 -0
  37. cupy_stubs-1.1.0/src/cupyx-stubs/scipy/sparse/__init__.pyi +7 -0
  38. cupy_stubs-1.1.0/src/cupyx-stubs/scipy/sparse/_base.pyi +60 -0
  39. cupy_stubs-1.1.0/src/cupyx-stubs/scipy/sparse/_compressed.pyi +68 -0
  40. cupy_stubs-1.1.0/src/cupyx-stubs/scipy/sparse/_construct.pyi +18 -0
  41. cupy_stubs-1.1.0/src/cupyx-stubs/scipy/sparse/_coo.pyi +46 -0
  42. cupy_stubs-1.1.0/src/cupyx-stubs/scipy/sparse/_csc.pyi +30 -0
  43. cupy_stubs-1.1.0/src/cupyx-stubs/scipy/sparse/_csr.pyi +30 -0
@@ -0,0 +1,11 @@
1
+ runners:
2
+ - name: aws-gpu-runner
3
+ cloud: aws
4
+ instance_type: g4dn.xlarge
5
+ machine_image: ami-0756bd122da9b2618
6
+ region: eu-west-1
7
+ preemptible:
8
+ - true
9
+ - false
10
+ labels:
11
+ - cirun-aws-gpu
@@ -0,0 +1,44 @@
1
+ {
2
+ "template": "https://github.com/scverse/cookiecutter-scverse/",
3
+ "commit": "0bebb8fe6e96b2ae142e629a889a8ec8695412e0",
4
+ "checkout": null,
5
+ "context": {
6
+ "cookiecutter": {
7
+ "project_name": "cupy-stubs",
8
+ "package_name": "cupy-stubs",
9
+ "project_description": "Type stubs for CuPy",
10
+ "author_full_name": "Phil A.",
11
+ "author_email": "philipp.angerer@scverse.org",
12
+ "github_user": "scverse",
13
+ "github_repo": "cupy-stubs",
14
+ "license": "Mozilla Public License Version 2.0",
15
+ "ide_integration": true,
16
+ "issue_categorization": "issue types",
17
+ "_copy_without_render": [
18
+ ".github/workflows/build.yaml",
19
+ ".github/workflows/test.yaml",
20
+ "docs/_templates/autosummary/**.rst"
21
+ ],
22
+ "_exclude_on_template_update": [
23
+ "CHANGELOG.md",
24
+ "LICENSE",
25
+ "README.md",
26
+ "docs/api.md",
27
+ "docs/index.md",
28
+ "docs/notebooks/example.ipynb",
29
+ "docs/references.bib",
30
+ "docs/references.md",
31
+ "src/**",
32
+ "tests/**"
33
+ ],
34
+ "_render_devdocs": false,
35
+ "_jinja2_env_vars": {
36
+ "lstrip_blocks": true,
37
+ "trim_blocks": true
38
+ },
39
+ "_template": "https://github.com/scverse/cookiecutter-scverse/",
40
+ "_commit": "0bebb8fe6e96b2ae142e629a889a8ec8695412e0"
41
+ }
42
+ },
43
+ "directory": null
44
+ }
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 4
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [{*.{yml,yaml,toml},.cruft.json}]
12
+ indent_size = 2
13
+
14
+ [Makefile]
15
+ indent_style = tab
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -0,0 +1,21 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: pre-commit
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ cooldown:
8
+ default-days: 7
9
+ groups:
10
+ pre-commit:
11
+ patterns: ["*"]
12
+ - package-ecosystem: github-actions
13
+ directory: /
14
+ schedule:
15
+ interval: weekly
16
+ cooldown:
17
+ default-days: 7
18
+ groups:
19
+ actions-deps:
20
+ patterns:
21
+ - "*"
@@ -0,0 +1,29 @@
1
+ # The workflow name is mandated by autofix.ci.
2
+ # It needs to be a dedicated workflow, as autofix.ci times out on long runs.
3
+ name: autofix.ci
4
+
5
+ on:
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ lint:
14
+ name: Pre-commit checks
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
18
+ with:
19
+ fetch-depth: 0
20
+ filter: blob:none
21
+ persist-credentials: false
22
+ - uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
23
+ with:
24
+ enable-cache: true
25
+ - run: uv tool install hatch
26
+ - name: Run pre-commit hooks
27
+ run: uvx prek run --all-files --show-diff-on-failure --color=always
28
+ - uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a # v1.3.4
29
+ if: '!cancelled()'
@@ -0,0 +1,30 @@
1
+ name: Check Build
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ package:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
21
+ with:
22
+ filter: blob:none
23
+ fetch-depth: 0
24
+ persist-credentials: false
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
27
+ - name: Build package
28
+ run: uv build
29
+ - name: Check package
30
+ run: uvx twine check --strict dist/*.whl
@@ -0,0 +1,33 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ # Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/
8
+ permissions: {}
9
+
10
+ jobs:
11
+ release:
12
+ name: Upload release to PyPI
13
+ runs-on: ubuntu-latest
14
+ environment:
15
+ name: pypi
16
+ url: https://pypi.org/p/cupy-stubs
17
+ permissions:
18
+ contents: read
19
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
20
+ steps:
21
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22
+ with:
23
+ filter: blob:none
24
+ fetch-depth: 0
25
+ persist-credentials: false
26
+ - name: Install uv
27
+ uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
28
+ with:
29
+ enable-cache: false
30
+ - name: Build package
31
+ run: uv build
32
+ - name: Publish package distributions to PyPI
33
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
@@ -0,0 +1,67 @@
1
+ name: Test
2
+
3
+ # Runs on a GPU runner provisioned by Cirun (see `.cirun.yml`).
4
+ # To save costs, PRs only run when they have the `run-gpu-ci` label.
5
+ on:
6
+ push:
7
+ branches: [main]
8
+ pull_request:
9
+ types:
10
+ - labeled
11
+ - opened
12
+ - synchronize
13
+
14
+ concurrency:
15
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16
+ cancel-in-progress: true
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ env:
22
+ PYTEST_ADDOPTS: "-v --color=yes"
23
+ FORCE_COLOR: "1"
24
+ UV_HTTP_TIMEOUT: 120
25
+
26
+ jobs:
27
+ check-label:
28
+ name: Check Label
29
+ runs-on: ubuntu-slim
30
+ steps:
31
+ - uses: flying-sheep/check@e10bb11109d1434ab16729bd988d78d65d47e163 # v1.0.5
32
+ with:
33
+ success: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'run-gpu-ci') }}
34
+
35
+ test:
36
+ name: GPU Tests
37
+ needs: check-label
38
+ runs-on: "cirun-aws-gpu--${{ github.run_id }}"
39
+ timeout-minutes: 30
40
+ steps:
41
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
42
+ with:
43
+ filter: blob:none
44
+ fetch-depth: 0
45
+ persist-credentials: false
46
+ - name: Check NVIDIA SMI
47
+ run: nvidia-smi
48
+ - uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
49
+ with:
50
+ enable-cache: true # "auto" is `false` on non-GitHub runners
51
+ - name: Run tests in all hatch environments
52
+ run: uvx hatch test --all # `ci/install-cupy.py` picks `cupy-cuda13x` here
53
+
54
+ # so the next push to the PR doesn’t trigger another expensive run
55
+ remove-label:
56
+ name: Remove “run-gpu-ci” Label
57
+ needs: test
58
+ if: always() && github.event_name == 'pull_request'
59
+ runs-on: ubuntu-latest
60
+ permissions:
61
+ pull-requests: write
62
+ steps:
63
+ - run: gh pr edit "$PR" --repo "$REPO" --remove-label run-gpu-ci
64
+ env:
65
+ GH_TOKEN: ${{ github.token }}
66
+ PR: ${{ github.event.pull_request.number }}
67
+ REPO: ${{ github.repository }}
@@ -0,0 +1,22 @@
1
+ # Temp files
2
+ .DS_Store
3
+ *~
4
+ buck-out/
5
+
6
+ # Compiled files
7
+ .venv/
8
+ uv.lock
9
+ __pycache__/
10
+ .*cache/
11
+
12
+ # Distribution / packaging
13
+ /dist/
14
+
15
+ # Tests and coverage
16
+ /data/
17
+ /node_modules/
18
+ /.coverage*
19
+
20
+ # docs
21
+ /docs/generated/
22
+ /docs/_build/
@@ -0,0 +1,60 @@
1
+ fail_fast: false
2
+ default_language_version:
3
+ python: python3
4
+ default_stages:
5
+ - pre-commit
6
+ - pre-push
7
+ minimum_pre_commit_version: 2.16.0
8
+ repos:
9
+ - repo: https://github.com/biomejs/pre-commit
10
+ rev: v2.6.2
11
+ hooks:
12
+ - id: biome-format
13
+ exclude: ^\.cruft\.json$ # inconsistent indentation with cruft - file never to be modified manually.
14
+ groups: [format]
15
+ - repo: https://github.com/tox-dev/pyproject-fmt
16
+ rev: v2.30.3
17
+ hooks:
18
+ - id: pyproject-fmt
19
+ groups: [format]
20
+ - repo: https://github.com/astral-sh/ruff-pre-commit
21
+ rev: v0.17.1
22
+ hooks:
23
+ - id: ruff-check
24
+ args: [--fix, --exit-non-zero-on-fix]
25
+ - id: ruff-format
26
+ groups: [format]
27
+ - repo: local
28
+ hooks:
29
+ - id: mypy
30
+ name: mypy
31
+ entry: hatch check types
32
+ language: system
33
+ types: [python]
34
+ files: ^(ci|src|tests)/
35
+ require_serial: true
36
+ pass_filenames: false
37
+ groups: [typecheck]
38
+ - repo: https://github.com/pre-commit/pre-commit-hooks
39
+ rev: v6.0.0
40
+ hooks:
41
+ - id: detect-private-key
42
+ - id: check-ast
43
+ - id: end-of-file-fixer
44
+ groups: [format]
45
+ - id: mixed-line-ending
46
+ exclude: ^\.cruft\.json$ # inconsistent file endings on windows - file never to be modified manually.
47
+ args: [--fix=lf]
48
+ groups: [format]
49
+ - id: trailing-whitespace
50
+ groups: [format]
51
+ - id: check-case-conflict
52
+ # Check that there are no merge conflicts (could be generated by template sync)
53
+ - id: check-merge-conflict
54
+ args: [--assume-in-merge]
55
+
56
+ - repo: https://github.com/zizmorcore/zizmor-pre-commit
57
+ rev: v1.31.1
58
+ hooks:
59
+ - id: zizmor
60
+ args: [--no-progress, --fix]
@@ -0,0 +1,18 @@
1
+ {
2
+ "recommendations": [
3
+ // GitHub integration
4
+ "github.vscode-github-actions",
5
+ "github.vscode-pull-request-github",
6
+ // Language support
7
+ "ms-python.python",
8
+ "ms-python.vscode-pylance",
9
+ "ms-toolsai.jupyter",
10
+ "tamasfe.even-better-toml",
11
+ // Dependency management
12
+ "ninoseki.vscode-mogami",
13
+ // Linting and formatting
14
+ "editorconfig.editorconfig",
15
+ "charliermarsh.ruff",
16
+ "biomejs.biome",
17
+ ],
18
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "name": "Python: Build Documentation",
9
+ "type": "debugpy",
10
+ "request": "launch",
11
+ "module": "sphinx",
12
+ "args": ["-M", "html", ".", "_build"],
13
+ "cwd": "${workspaceFolder}/docs",
14
+ "console": "internalConsole",
15
+ "justMyCode": false,
16
+ },
17
+ {
18
+ "name": "Python: Debug Test",
19
+ "type": "debugpy",
20
+ "request": "launch",
21
+ "program": "${file}",
22
+ "purpose": ["debug-test"],
23
+ "console": "internalConsole",
24
+ "justMyCode": false,
25
+ "env": {
26
+ "PYTEST_ADDOPTS": "--color=yes",
27
+ },
28
+ "presentation": {
29
+ "hidden": true,
30
+ },
31
+ },
32
+ ],
33
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "[python][json][jsonc]": {
3
+ "editor.formatOnSave": true,
4
+ },
5
+ "[python]": {
6
+ "editor.defaultFormatter": "charliermarsh.ruff",
7
+ "editor.codeActionsOnSave": {
8
+ "source.fixAll": "always",
9
+ "source.organizeImports": "always",
10
+ },
11
+ },
12
+ "[json][jsonc]": {
13
+ "editor.defaultFormatter": "biomejs.biome",
14
+ },
15
+ "python.analysis.typeCheckingMode": "basic",
16
+ "python.testing.pytestEnabled": true,
17
+ "python.testing.pytestArgs": ["-vv", "--color=yes"],
18
+ "python-envs.defaultEnvManager": "pypa.hatch:hatch",
19
+ "python-envs.defaultPackageManager": "pypa.hatch:hatch",
20
+ }