holix-sdk 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.
- holix_sdk-0.1.0/.github/workflows/ci.yml +32 -0
- holix_sdk-0.1.0/.github/workflows/github-release.yml +71 -0
- holix_sdk-0.1.0/.github/workflows/publish-pypi.yml +145 -0
- holix_sdk-0.1.0/.gitignore +14 -0
- holix_sdk-0.1.0/LICENSE +21 -0
- holix_sdk-0.1.0/PKG-INFO +94 -0
- holix_sdk-0.1.0/README.md +69 -0
- holix_sdk-0.1.0/docs/PYPI.md +57 -0
- holix_sdk-0.1.0/docs/en/EXTENSIONS.md +394 -0
- holix_sdk-0.1.0/docs/ru/EXTENSIONS.md +390 -0
- holix_sdk-0.1.0/holix_sdk/__init__.py +26 -0
- holix_sdk-0.1.0/holix_sdk/agent.py +62 -0
- holix_sdk-0.1.0/holix_sdk/agent_runtime.py +39 -0
- holix_sdk-0.1.0/holix_sdk/commands.py +5 -0
- holix_sdk-0.1.0/holix_sdk/extension.py +90 -0
- holix_sdk-0.1.0/holix_sdk/host.py +32 -0
- holix_sdk-0.1.0/holix_sdk/i18n.py +5 -0
- holix_sdk-0.1.0/holix_sdk/models.py +25 -0
- holix_sdk-0.1.0/holix_sdk/paths.py +5 -0
- holix_sdk-0.1.0/holix_sdk/profile.py +5 -0
- holix_sdk-0.1.0/holix_sdk/security.py +27 -0
- holix_sdk-0.1.0/holix_sdk/version.py +4 -0
- holix_sdk-0.1.0/pyproject.toml +61 -0
- holix_sdk-0.1.0/tests/test_holix_sdk.py +30 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
python: ["3.12", "3.13", "3.14"]
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- uses: astral-sh/setup-uv@v5
|
|
21
|
+
with:
|
|
22
|
+
enable-cache: true
|
|
23
|
+
python-version: ${{ matrix.python }}
|
|
24
|
+
|
|
25
|
+
- name: Install
|
|
26
|
+
run: uv sync --group dev
|
|
27
|
+
|
|
28
|
+
- name: Ruff
|
|
29
|
+
run: uv run ruff check holix_sdk tests
|
|
30
|
+
|
|
31
|
+
- name: Pytest
|
|
32
|
+
run: uv run pytest -q
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Create a GitHub Release when a version tag is pushed.
|
|
2
|
+
#
|
|
3
|
+
# Tag must match pyproject.toml and holix_sdk/version.py (same rule as publish-pypi.yml).
|
|
4
|
+
#
|
|
5
|
+
# Typical flow:
|
|
6
|
+
# 1. Bump version in pyproject.toml + holix_sdk/version.py
|
|
7
|
+
# 2. git tag vX.Y.Z && git push origin vX.Y.Z
|
|
8
|
+
# 3. This workflow creates the GitHub Release
|
|
9
|
+
# 4. publish-pypi.yml publishes holix-sdk to PyPI
|
|
10
|
+
name: GitHub Release
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
push:
|
|
14
|
+
tags:
|
|
15
|
+
- v*
|
|
16
|
+
|
|
17
|
+
concurrency:
|
|
18
|
+
group: github-release-${{ github.ref }}
|
|
19
|
+
cancel-in-progress: false
|
|
20
|
+
|
|
21
|
+
permissions:
|
|
22
|
+
contents: write
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
release:
|
|
26
|
+
name: Create release
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- name: Resolve version from tag
|
|
32
|
+
id: ver
|
|
33
|
+
run: |
|
|
34
|
+
TAG="${GITHUB_REF#refs/tags/}"
|
|
35
|
+
VERSION="${TAG#v}"
|
|
36
|
+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
|
|
37
|
+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
38
|
+
|
|
39
|
+
- name: Verify tag matches package version
|
|
40
|
+
run: |
|
|
41
|
+
EXPECTED="${{ steps.ver.outputs.version }}"
|
|
42
|
+
ACTUAL=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
|
|
43
|
+
PY_VERSION=$(python -c "import pathlib; p=pathlib.Path('holix_sdk/version.py'); print([l.split('=')[1].strip().strip('\"') for l in p.read_text().splitlines() if l.strip().startswith('__version__')][0])")
|
|
44
|
+
if [ "$EXPECTED" != "$ACTUAL" ]; then
|
|
45
|
+
echo "::error::Git tag v$EXPECTED does not match pyproject.toml version $ACTUAL"
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
if [ "$EXPECTED" != "$PY_VERSION" ]; then
|
|
49
|
+
echo "::error::Git tag v$EXPECTED does not match holix_sdk/version.py $PY_VERSION"
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
echo "Version OK: $ACTUAL"
|
|
53
|
+
|
|
54
|
+
- name: Create GitHub Release
|
|
55
|
+
uses: softprops/action-gh-release@v2
|
|
56
|
+
with:
|
|
57
|
+
tag_name: ${{ steps.ver.outputs.tag }}
|
|
58
|
+
name: holix-sdk ${{ steps.ver.outputs.version }}
|
|
59
|
+
body: |
|
|
60
|
+
## holix-sdk ${{ steps.ver.outputs.version }}
|
|
61
|
+
|
|
62
|
+
Stable public API for Holix extension authors.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pip install holix-sdk==${{ steps.ver.outputs.version }}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Docs: [EXTENSIONS.md](https://github.com/javded-itres/holix-sdk/blob/${{ steps.ver.outputs.tag }}/docs/en/EXTENSIONS.md)
|
|
69
|
+
draft: false
|
|
70
|
+
prerelease: false
|
|
71
|
+
make_latest: true
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Publish holix-sdk to PyPI via GitHub Actions.
|
|
2
|
+
#
|
|
3
|
+
# Auth: PyPI Trusted Publishing (OIDC) — recommended, no token in secrets.
|
|
4
|
+
# Fallback: set PYPI_API_TOKEN / TEST_PYPI_API_TOKEN and choose "api-token" when running manually.
|
|
5
|
+
#
|
|
6
|
+
# One-time setup:
|
|
7
|
+
# 1. GitHub → Settings → Environments → create "pypi" (and "testpypi" for dry runs)
|
|
8
|
+
# 2. PyPI → project holix-sdk → Publishing → Add trusted publisher:
|
|
9
|
+
# Owner: javded-itres | Repository: holix-sdk
|
|
10
|
+
# Workflow filename: publish-pypi.yml | Environment name: pypi
|
|
11
|
+
# 3. (Optional) Repeat on https://test.pypi.org for environment "testpypi"
|
|
12
|
+
#
|
|
13
|
+
# Release by tag (recommended):
|
|
14
|
+
# git tag v0.1.0 && git push origin v0.1.0
|
|
15
|
+
#
|
|
16
|
+
# Manual run: Actions → Publish to PyPI → Run workflow
|
|
17
|
+
name: Publish to PyPI
|
|
18
|
+
|
|
19
|
+
on:
|
|
20
|
+
workflow_dispatch:
|
|
21
|
+
inputs:
|
|
22
|
+
testpypi:
|
|
23
|
+
description: Upload to TestPyPI instead of PyPI
|
|
24
|
+
required: false
|
|
25
|
+
default: false
|
|
26
|
+
type: boolean
|
|
27
|
+
auth:
|
|
28
|
+
description: Authentication (use api-token only if Trusted Publishing is not configured)
|
|
29
|
+
required: false
|
|
30
|
+
default: trusted-publishing
|
|
31
|
+
type: choice
|
|
32
|
+
options:
|
|
33
|
+
- trusted-publishing
|
|
34
|
+
- api-token
|
|
35
|
+
push:
|
|
36
|
+
tags:
|
|
37
|
+
- v*
|
|
38
|
+
|
|
39
|
+
concurrency:
|
|
40
|
+
group: publish-pypi-${{ github.ref }}
|
|
41
|
+
cancel-in-progress: false
|
|
42
|
+
|
|
43
|
+
permissions:
|
|
44
|
+
contents: read
|
|
45
|
+
|
|
46
|
+
jobs:
|
|
47
|
+
build:
|
|
48
|
+
name: Build and validate
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v4
|
|
52
|
+
|
|
53
|
+
- uses: astral-sh/setup-uv@v5
|
|
54
|
+
with:
|
|
55
|
+
enable-cache: true
|
|
56
|
+
python-version: "3.12"
|
|
57
|
+
|
|
58
|
+
- name: Install build tools
|
|
59
|
+
run: uv sync --group dev --no-install-project
|
|
60
|
+
|
|
61
|
+
- name: Verify tag matches package version
|
|
62
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
63
|
+
run: |
|
|
64
|
+
TAG="${GITHUB_REF#refs/tags/v}"
|
|
65
|
+
VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
|
|
66
|
+
PY_VERSION=$(python -c "import pathlib; p=pathlib.Path('holix_sdk/version.py'); print([l.split('=')[1].strip().strip('\"') for l in p.read_text().splitlines() if l.strip().startswith('__version__')][0])")
|
|
67
|
+
if [ "$TAG" != "$VERSION" ]; then
|
|
68
|
+
echo "::error::Git tag v$TAG does not match pyproject.toml version $VERSION"
|
|
69
|
+
exit 1
|
|
70
|
+
fi
|
|
71
|
+
if [ "$TAG" != "$PY_VERSION" ]; then
|
|
72
|
+
echo "::error::Git tag v$TAG does not match holix_sdk/version.py $PY_VERSION"
|
|
73
|
+
exit 1
|
|
74
|
+
fi
|
|
75
|
+
echo "Version OK: $VERSION"
|
|
76
|
+
|
|
77
|
+
- name: Build package
|
|
78
|
+
run: uv build
|
|
79
|
+
|
|
80
|
+
- name: Validate artifacts
|
|
81
|
+
run: uv run twine check dist/*
|
|
82
|
+
|
|
83
|
+
- name: Smoke install wheel
|
|
84
|
+
run: |
|
|
85
|
+
uv venv /tmp/holix-sdk-publish-smoke --python 3.12
|
|
86
|
+
uv pip install --python /tmp/holix-sdk-publish-smoke/bin/python dist/holix_sdk-*.whl
|
|
87
|
+
/tmp/holix-sdk-publish-smoke/bin/python -c "
|
|
88
|
+
import holix_sdk
|
|
89
|
+
from holix_sdk.agent import AgentExtensionBase, SlashCommandSpec
|
|
90
|
+
assert holix_sdk.__api_version__ == 1
|
|
91
|
+
assert holix_sdk.CAPABILITY_CLI == 'cli'
|
|
92
|
+
assert AgentExtensionBase is not None
|
|
93
|
+
assert SlashCommandSpec is not None
|
|
94
|
+
print('holix-sdk', holix_sdk.__version__, 'api', holix_sdk.__api_version__)
|
|
95
|
+
"
|
|
96
|
+
|
|
97
|
+
- name: Upload dist artifacts
|
|
98
|
+
uses: actions/upload-artifact@v4
|
|
99
|
+
with:
|
|
100
|
+
name: dist
|
|
101
|
+
path: dist/*
|
|
102
|
+
if-no-files-found: error
|
|
103
|
+
retention-days: 14
|
|
104
|
+
|
|
105
|
+
publish:
|
|
106
|
+
name: Publish
|
|
107
|
+
needs: build
|
|
108
|
+
runs-on: ubuntu-latest
|
|
109
|
+
environment: ${{ github.event_name == 'workflow_dispatch' && inputs.testpypi && 'testpypi' || 'pypi' }}
|
|
110
|
+
permissions:
|
|
111
|
+
id-token: write
|
|
112
|
+
contents: read
|
|
113
|
+
env:
|
|
114
|
+
TO_TESTPYPI: ${{ github.event_name == 'workflow_dispatch' && inputs.testpypi && 'true' || 'false' }}
|
|
115
|
+
USE_API_TOKEN: ${{ github.event_name == 'workflow_dispatch' && inputs.auth == 'api-token' && 'true' || 'false' }}
|
|
116
|
+
steps:
|
|
117
|
+
- uses: actions/download-artifact@v4
|
|
118
|
+
with:
|
|
119
|
+
name: dist
|
|
120
|
+
path: dist
|
|
121
|
+
|
|
122
|
+
- uses: astral-sh/setup-uv@v5
|
|
123
|
+
|
|
124
|
+
- name: List artifacts
|
|
125
|
+
run: ls -la dist/
|
|
126
|
+
|
|
127
|
+
- name: Publish to TestPyPI (Trusted Publishing)
|
|
128
|
+
if: env.TO_TESTPYPI == 'true' && env.USE_API_TOKEN != 'true'
|
|
129
|
+
run: uv publish --publish-url https://test.pypi.org/legacy/ dist/*
|
|
130
|
+
|
|
131
|
+
- name: Publish to TestPyPI (API token)
|
|
132
|
+
if: env.TO_TESTPYPI == 'true' && env.USE_API_TOKEN == 'true'
|
|
133
|
+
env:
|
|
134
|
+
UV_PUBLISH_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
135
|
+
run: uv publish --publish-url https://test.pypi.org/legacy/ dist/*
|
|
136
|
+
|
|
137
|
+
- name: Publish to PyPI (Trusted Publishing)
|
|
138
|
+
if: env.TO_TESTPYPI != 'true' && env.USE_API_TOKEN != 'true'
|
|
139
|
+
run: uv publish dist/*
|
|
140
|
+
|
|
141
|
+
- name: Publish to PyPI (API token)
|
|
142
|
+
if: env.TO_TESTPYPI != 'true' && env.USE_API_TOKEN == 'true'
|
|
143
|
+
env:
|
|
144
|
+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
145
|
+
run: uv publish dist/*
|
holix_sdk-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Holix Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
holix_sdk-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: holix-sdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Stable public API for Holix extensions and host integrations
|
|
5
|
+
Project-URL: Homepage, https://holix-agent.ru
|
|
6
|
+
Project-URL: Repository, https://github.com/javded-itres/holix-sdk
|
|
7
|
+
Project-URL: Documentation, https://github.com/javded-itres/holix-sdk/blob/main/docs/en/EXTENSIONS.md
|
|
8
|
+
Project-URL: Issues, https://github.com/javded-itres/holix-sdk/issues
|
|
9
|
+
Author: Pavel Lukyanov
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agent,extensions,holix,sdk
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
22
|
+
Requires-Python: >=3.12
|
|
23
|
+
Requires-Dist: holix>=0.1.21
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# holix-sdk
|
|
27
|
+
|
|
28
|
+
[](https://github.com/javded-itres/holix-sdk/actions/workflows/ci.yml)
|
|
29
|
+
|
|
30
|
+
**Separate installable package** — stable public API for [Holix](https://github.com/javded-itres/Holix) extension authors.
|
|
31
|
+
|
|
32
|
+
Holix core (`core.*`, `cli.*`) is internal. Extension packages import **only** `holix_sdk`.
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install holix-sdk Holix
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Requires [Holix](https://pypi.org/project/Holix/) `>=0.1.21` on PyPI.
|
|
41
|
+
|
|
42
|
+
## API version
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
from holix_sdk import __api_version__
|
|
46
|
+
# Currently: 1
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Breaking changes to the extension API happen only in major releases of `holix-sdk`.
|
|
50
|
+
|
|
51
|
+
## Quick example
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
from holix_sdk import ExtensionBase, CAPABILITY_CLI
|
|
55
|
+
from holix_sdk.agent import AgentExtensionBase, SlashCommandSpec
|
|
56
|
+
from holix_sdk.host import AgentCommands
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Documentation
|
|
60
|
+
|
|
61
|
+
| Language | Guide |
|
|
62
|
+
|----------|-------|
|
|
63
|
+
| English | [docs/en/EXTENSIONS.md](docs/en/EXTENSIONS.md) |
|
|
64
|
+
| Russian | [docs/ru/EXTENSIONS.md](docs/ru/EXTENSIONS.md) |
|
|
65
|
+
|
|
66
|
+
## Development
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
git clone git@github.com:javded-itres/holix-sdk.git
|
|
70
|
+
cd holix-sdk
|
|
71
|
+
uv sync --group dev
|
|
72
|
+
uv run pytest -q
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Publish
|
|
76
|
+
|
|
77
|
+
Automated via GitHub Actions on tag `v*` — see [docs/PYPI.md](docs/PYPI.md).
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# bump pyproject.toml + holix_sdk/version.py, then:
|
|
81
|
+
git tag v0.1.0 && git push origin v0.1.0
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Local check:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
uv build && uv run twine check dist/*
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
PyPI package name: `holix-sdk`.
|
|
91
|
+
|
|
92
|
+
## License
|
|
93
|
+
|
|
94
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# holix-sdk
|
|
2
|
+
|
|
3
|
+
[](https://github.com/javded-itres/holix-sdk/actions/workflows/ci.yml)
|
|
4
|
+
|
|
5
|
+
**Separate installable package** — stable public API for [Holix](https://github.com/javded-itres/Holix) extension authors.
|
|
6
|
+
|
|
7
|
+
Holix core (`core.*`, `cli.*`) is internal. Extension packages import **only** `holix_sdk`.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install holix-sdk Holix
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Requires [Holix](https://pypi.org/project/Holix/) `>=0.1.21` on PyPI.
|
|
16
|
+
|
|
17
|
+
## API version
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from holix_sdk import __api_version__
|
|
21
|
+
# Currently: 1
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Breaking changes to the extension API happen only in major releases of `holix-sdk`.
|
|
25
|
+
|
|
26
|
+
## Quick example
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
from holix_sdk import ExtensionBase, CAPABILITY_CLI
|
|
30
|
+
from holix_sdk.agent import AgentExtensionBase, SlashCommandSpec
|
|
31
|
+
from holix_sdk.host import AgentCommands
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Documentation
|
|
35
|
+
|
|
36
|
+
| Language | Guide |
|
|
37
|
+
|----------|-------|
|
|
38
|
+
| English | [docs/en/EXTENSIONS.md](docs/en/EXTENSIONS.md) |
|
|
39
|
+
| Russian | [docs/ru/EXTENSIONS.md](docs/ru/EXTENSIONS.md) |
|
|
40
|
+
|
|
41
|
+
## Development
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
git clone git@github.com:javded-itres/holix-sdk.git
|
|
45
|
+
cd holix-sdk
|
|
46
|
+
uv sync --group dev
|
|
47
|
+
uv run pytest -q
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Publish
|
|
51
|
+
|
|
52
|
+
Automated via GitHub Actions on tag `v*` — see [docs/PYPI.md](docs/PYPI.md).
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# bump pyproject.toml + holix_sdk/version.py, then:
|
|
56
|
+
git tag v0.1.0 && git push origin v0.1.0
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Local check:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
uv build && uv run twine check dist/*
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
PyPI package name: `holix-sdk`.
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Publishing holix-sdk to PyPI
|
|
2
|
+
|
|
3
|
+
Package name on PyPI: **`holix-sdk`**
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install holix-sdk
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Requires [Holix](https://pypi.org/project/Holix/) `>=0.1.21`.
|
|
10
|
+
|
|
11
|
+
## Automated release (GitHub Actions)
|
|
12
|
+
|
|
13
|
+
Workflow: [`.github/workflows/publish-pypi.yml`](../.github/workflows/publish-pypi.yml)
|
|
14
|
+
|
|
15
|
+
### One-time PyPI setup
|
|
16
|
+
|
|
17
|
+
1. Create PyPI project `holix-sdk` (or claim on first upload).
|
|
18
|
+
2. GitHub repo **holix-sdk** → Settings → Environments → create `pypi` (and `testpypi` for dry runs).
|
|
19
|
+
3. PyPI → **holix-sdk** → Publishing → **Add trusted publisher**:
|
|
20
|
+
- Owner: `javded-itres`
|
|
21
|
+
- Repository: `holix-sdk`
|
|
22
|
+
- Workflow: `publish-pypi.yml`
|
|
23
|
+
- Environment: `pypi`
|
|
24
|
+
4. (Optional) Same on [TestPyPI](https://test.pypi.org) for environment `testpypi`.
|
|
25
|
+
|
|
26
|
+
### Release steps
|
|
27
|
+
|
|
28
|
+
1. Bump version in **both** files:
|
|
29
|
+
- `pyproject.toml` → `[project].version`
|
|
30
|
+
- `holix_sdk/version.py` → `__version__`
|
|
31
|
+
2. Commit and push to `main`.
|
|
32
|
+
3. Tag and push:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
git tag v0.1.0
|
|
36
|
+
git push origin v0.1.0
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This triggers:
|
|
40
|
+
|
|
41
|
+
- **GitHub Release** (`github-release.yml`)
|
|
42
|
+
- **Publish to PyPI** (`publish-pypi.yml`)
|
|
43
|
+
|
|
44
|
+
### Manual publish
|
|
45
|
+
|
|
46
|
+
Actions → **Publish to PyPI** → Run workflow
|
|
47
|
+
|
|
48
|
+
- Enable **TestPyPI** for a dry run first.
|
|
49
|
+
- Use **api-token** only if Trusted Publishing is not configured (`PYPI_API_TOKEN` / `TEST_PYPI_API_TOKEN` secrets).
|
|
50
|
+
|
|
51
|
+
## Local build check
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
uv sync --group dev
|
|
55
|
+
uv build
|
|
56
|
+
uv run twine check dist/*
|
|
57
|
+
```
|