k-center 0.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.
k_center-0.1.0/.flake8 ADDED
@@ -0,0 +1,6 @@
1
+ [flake8]
2
+ extend-ignore = E203,E266,E501,W503
3
+ max-line-length = 88
4
+ max-complexity = 18
5
+ select = B,C,E,F,W,T4,B9
6
+ mypy_config = .mypy.ini
@@ -0,0 +1,41 @@
1
+ name: Trigger Gitlab Pipeline
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ paths:
7
+ - "python/k_center/**"
8
+ - "tests/**"
9
+ - "src/**"
10
+ - "Cargo.toml"
11
+ - "pyproject.toml"
12
+ - "uv.lock"
13
+ pull_request:
14
+ paths:
15
+ - "python/k_center/**"
16
+ - "tests/**"
17
+ - "src/**"
18
+ - "Cargo.toml"
19
+ - "pyproject.toml"
20
+ - "uv.lock"
21
+ # Allows you to run this workflow manually from the Actions tab
22
+ workflow_dispatch:
23
+
24
+ jobs:
25
+ build:
26
+ name: Trigger GitLab Pipeline
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - name: Trigger Job
30
+ uses: digital-blueprint/gitlab-pipeline-trigger-action@v1
31
+ with:
32
+ host: 'gitlab.cs.uni-duesseldorf.de'
33
+ trigger_token: ${{ secrets.DEPLOY_TRIGGER_TOKEN }}
34
+ access_token: ${{ secrets.DEPLOY_ACCESS_TOKEN }}
35
+ id: '3710'
36
+ ref: 'main'
37
+ variables: |
38
+ {
39
+ "PROJECT": "k-center",
40
+ "GIT_HASH": "${{ github.event.pull_request.head.sha || github.sha }}"
41
+ }
@@ -0,0 +1,60 @@
1
+ name: QA and Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - "python/k_center/**"
9
+ - "tests/**"
10
+ - "src/**"
11
+ - "Cargo.toml"
12
+ - "pyproject.toml"
13
+ - "uv.lock"
14
+ pull_request:
15
+ paths:
16
+ - "python/k_center/**"
17
+ - "tests/**"
18
+ - "src/**"
19
+ - "Cargo.toml"
20
+ - "pyproject.toml"
21
+ - "uv.lock"
22
+ # Allows you to run this workflow manually from the Actions tab
23
+ workflow_dispatch:
24
+
25
+ jobs:
26
+ build:
27
+ runs-on: ubuntu-latest
28
+ strategy:
29
+ matrix:
30
+ python-version: ["3.11", "3.12", "3.13"]
31
+ steps:
32
+ - uses: actions/checkout@v6
33
+
34
+ - name: Set up Rust
35
+ uses: dtolnay/rust-toolchain@stable
36
+
37
+ - name: Set up Python ${{ matrix.python-version }}
38
+ uses: actions/setup-python@v6
39
+ with:
40
+ python-version: ${{ matrix.python-version }}
41
+
42
+ - name: Set up uv
43
+ uses: astral-sh/setup-uv@v7
44
+
45
+ - name: Install dependencies
46
+ run: uv sync
47
+
48
+ - name: Run MyPy
49
+ run: uv run mypy --install-types --non-interactive python/k_center tests
50
+ env:
51
+ MYPYPATH: python
52
+
53
+ - name: Run Flake8
54
+ run: uv run flake8 python/k_center/ tests/
55
+
56
+ - name: Run Python Tests
57
+ run: uv run pytest tests/ -v
58
+
59
+ - name: Run Rust Tests
60
+ run: cargo test
@@ -0,0 +1,63 @@
1
+ name: Build and upload to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ build:
13
+ name: Build distribution
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - uses: actions/checkout@v7
18
+
19
+ - name: Build manylinux wheel
20
+ uses: PyO3/maturin-action@v1
21
+ with:
22
+ command: build
23
+ target: x86_64
24
+ manylinux: "2_28"
25
+ args: >-
26
+ --release
27
+ --locked
28
+ --out dist
29
+ --compatibility pypi
30
+
31
+ - name: Build source distribution
32
+ uses: PyO3/maturin-action@v1
33
+ with:
34
+ command: sdist
35
+ args: --out dist
36
+
37
+ - uses: actions/upload-artifact@v7
38
+ with:
39
+ name: distributions
40
+ path: |
41
+ dist/*.whl
42
+ dist/*.tar.gz
43
+ if-no-files-found: error
44
+
45
+ publish:
46
+ name: Publish to PyPI
47
+ if: github.event_name == 'release'
48
+ needs: build
49
+ runs-on: ubuntu-latest
50
+
51
+ steps:
52
+ - name: Download distributions
53
+ uses: actions/download-artifact@v8
54
+ with:
55
+ name: distributions
56
+ path: dist
57
+
58
+ - uses: astral-sh/setup-uv@v10.0.1
59
+
60
+ - name: Publish to PyPI
61
+ env:
62
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
63
+ run: uv publish dist/*
@@ -0,0 +1,72 @@
1
+ /target
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ .pytest_cache/
6
+ *.py[cod]
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ .venv/
14
+ env/
15
+ bin/
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ include/
26
+ man/
27
+ venv/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+
32
+ # Installer logs
33
+ pip-log.txt
34
+ pip-delete-this-directory.txt
35
+ pip-selfcheck.json
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .coverage
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+
45
+ # Translations
46
+ *.mo
47
+
48
+ # Mr Developer
49
+ .mr.developer.cfg
50
+ .project
51
+ .pydevproject
52
+
53
+ # Rope
54
+ .ropeproject
55
+
56
+ # Django stuff:
57
+ *.log
58
+ *.pot
59
+
60
+ .DS_Store
61
+
62
+ # Sphinx documentation
63
+ docs/_build/
64
+
65
+ # PyCharm
66
+ .idea/
67
+
68
+ # VSCode
69
+ .vscode/
70
+
71
+ # Pyenv
72
+ .python-version
@@ -0,0 +1,9 @@
1
+ [mypy]
2
+ disallow_untyped_defs = True
3
+ disallow_untyped_calls = True
4
+ ignore_missing_imports = True
5
+ warn_no_return = True
6
+ warn_return_any = True
7
+ warn_unreachable = True
8
+ warn_unused_configs = True
9
+ exclude = _external
@@ -0,0 +1,26 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.0.1
4
+ hooks:
5
+ - id: end-of-file-fixer
6
+ exclude: \\w+.pdf
7
+ - id: trailing-whitespace
8
+ exclude: \\w+.pdf
9
+ - repo: https://github.com/psf/black
10
+ rev: 22.3.0
11
+ hooks:
12
+ - id: black
13
+ - repo: https://github.com/pycqa/isort
14
+ rev: 5.12.0
15
+ hooks:
16
+ - id: isort
17
+ - repo: https://github.com/PyCQA/flake8
18
+ rev: 7.0.0
19
+ hooks:
20
+ - id: flake8
21
+ additional_dependencies: ["flake8-bugbear==21.4.3"]
22
+ - repo: https://github.com/pre-commit/mirrors-mypy
23
+ rev: v1.10.0
24
+ hooks:
25
+ - id: mypy
26
+ args: ["--install-types", "--non-interactive"]