scitex-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.
@@ -0,0 +1,146 @@
1
+ name: release
2
+
3
+ # Tag-driven release pipeline — GITHUB-HOSTED (ubuntu-latest), copied from
4
+ # scitex-app's release contract and trimmed of the scitex-app-specific
5
+ # "verify skills docs are in the wheel" block (scitex-sdk ships no _skills).
6
+ #
7
+ # Operator flow: git tag v0.1.0 && git push origin v0.1.0
8
+ # 1. test — pytest (the facade identity tests). Must pass or nothing publishes.
9
+ # 2. build — wheel + sdist.
10
+ # 3. publish — PyPI via trusted publishing (pypa/gh-action-pypi-publish).
11
+ # 4. release — GitHub Release with CHANGELOG notes.
12
+ #
13
+ # TRUSTED PUBLISHING matches on (repository, workflow FILENAME, environment).
14
+ # This file must keep its name (pypi-p...-tag.yml) and the publish job must keep
15
+ # `environment: pypi`, or the PyPI trust config for scitex-sdk will not match.
16
+ # The operator registers the PyPI project + trusted publisher for
17
+ # (scitex-ai/scitex-sdk, pypi-p...-tag.yml, pypi) BEFORE the first tag is pushed.
18
+
19
+ on:
20
+ push:
21
+ tags: ['v*']
22
+ workflow_dispatch:
23
+ inputs:
24
+ version:
25
+ description: 'Tag to publish (e.g. v0.1.0) — must already exist on the repo'
26
+ required: true
27
+ type: string
28
+
29
+ jobs:
30
+ test:
31
+ runs-on: ubuntu-latest
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ python-version: ["3.11", "3.12", "3.13"]
36
+ steps:
37
+ - name: Resolve version
38
+ id: ver
39
+ run: |
40
+ if [ "${{ github.event_name }}" = "push" ]; then
41
+ v="${GITHUB_REF#refs/tags/}"
42
+ else
43
+ v="${{ inputs.version }}"
44
+ fi
45
+ echo "version=$v" >> "$GITHUB_OUTPUT"
46
+ - uses: actions/checkout@v4
47
+ with:
48
+ ref: ${{ steps.ver.outputs.version }}
49
+ fetch-depth: 0
50
+ - name: Set up Python ${{ matrix.python-version }}
51
+ uses: actions/setup-python@v5
52
+ with:
53
+ python-version: ${{ matrix.python-version }}
54
+ - name: Install dependencies
55
+ run: |
56
+ python -m pip install --upgrade pip
57
+ # The facade installs both halves (scitex-app, scitex-ui) as
58
+ # dependencies, plus pytest. There is no [all] extra / dev group in
59
+ # this thin package, so a plain pip install is correct here.
60
+ pip install -e . pytest
61
+ - name: Run tests
62
+ run: pytest tests/
63
+
64
+ build:
65
+ needs: test
66
+ runs-on: ubuntu-latest
67
+ outputs:
68
+ version: ${{ steps.ver.outputs.version }}
69
+ steps:
70
+ - name: Resolve version
71
+ id: ver
72
+ run: |
73
+ if [ "${{ github.event_name }}" = "push" ]; then
74
+ v="${GITHUB_REF#refs/tags/}"
75
+ else
76
+ v="${{ inputs.version }}"
77
+ fi
78
+ echo "version=$v" >> "$GITHUB_OUTPUT"
79
+ - uses: actions/checkout@v4
80
+ with:
81
+ ref: ${{ steps.ver.outputs.version }}
82
+ fetch-depth: 0
83
+ - name: Set up Python
84
+ uses: actions/setup-python@v5
85
+ with:
86
+ python-version: "3.12"
87
+ - name: Build wheel + sdist
88
+ run: |
89
+ python -m pip install --upgrade pip build
90
+ python -m build
91
+ # fail-loud: an empty dist/ must stop the pipeline here.
92
+ ls -1 dist/*.whl dist/*.tar.gz >/dev/null
93
+ - uses: actions/upload-artifact@v4
94
+ with:
95
+ name: dist
96
+ path: dist/
97
+
98
+ publish:
99
+ needs: build
100
+ runs-on: ubuntu-latest
101
+ environment:
102
+ name: pypi
103
+ url: https://pypi.org/p/scitex-sdk
104
+ permissions:
105
+ id-token: write
106
+ steps:
107
+ - uses: actions/download-artifact@v4
108
+ with:
109
+ name: dist
110
+ path: dist
111
+ - name: Publish to PyPI (trusted publishing)
112
+ uses: pypa/gh-action-pypi-publish@release/v1
113
+
114
+ release:
115
+ needs: [build, publish]
116
+ runs-on: ubuntu-latest
117
+ permissions:
118
+ contents: write
119
+ steps:
120
+ - uses: actions/checkout@v4
121
+ with:
122
+ ref: ${{ needs.build.outputs.version }}
123
+ - uses: actions/download-artifact@v4
124
+ with:
125
+ name: dist
126
+ path: dist
127
+ - name: Extract release notes from CHANGELOG.md
128
+ run: |
129
+ VERSION="${{ needs.build.outputs.version }}"
130
+ VERSION="${VERSION#v}"
131
+ awk -v v="$VERSION" '
132
+ $0 ~ "^## \\\[" v "\\\\]" {p=1; next}
133
+ p && /^## \[/ {exit}
134
+ p
135
+ ' CHANGELOG.md > release-notes.md || true
136
+ if [ ! -s release-notes.md ]; then
137
+ echo "Release v${VERSION}. See CHANGELOG.md for details." > release-notes.md
138
+ fi
139
+ - name: Create GitHub Release
140
+ env:
141
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142
+ run: |
143
+ gh release create "${{ needs.build.outputs.version }}" \
144
+ --title "${{ needs.build.outputs.version }}" \
145
+ --notes-file release-notes.md \
146
+ dist/*
@@ -0,0 +1,28 @@
1
+ # Changelog
2
+
3
+ All notable changes to `scitex-sdk`.
4
+
5
+ The versioning here is the **umbrella** release (the facade + the gradually
6
+ moving implementation). Each half keeps its own version through the migration
7
+ window: `scitex_app.__version__` (scitex-app) and `scitex_ui.__version__`
8
+ (scitex-ui). See ADR 0001 (scitex-app) and ADR 0003 (scitex-ui).
9
+
10
+ ## [0.1.0] — 2026-09-14
11
+
12
+ ### Added
13
+ - `scitex_sdk.app` — facade re-exporting `scitex_app`'s documented public
14
+ surface (18 names) **by identity** (`scitex_sdk.app.X is scitex_app.X`).
15
+ - `scitex_sdk.ui` — facade re-exporting `scitex_ui`'s documented public
16
+ surface (5 names) by identity.
17
+ - `tests/test_facade_identity.py` — asserts every re-export is the identical
18
+ object as the original (the bar that makes the consumer import rewrite
19
+ mechanical + behavior-neutral).
20
+
21
+ ### Notes
22
+ - The facade `depends on` `scitex-app>=0.24.0` + `scitex-ui>=0.20.3` (the
23
+ published floors); it does not vendor them yet.
24
+ - No consumer-visible behavior change: `scitex-sdk` is additive. The original
25
+ `scitex-app` / `scitex-ui` distributions are untouched at this step; they
26
+ become thin compat shims only in a later step.
27
+ - Facade-first decision + the app/ui boundary-kept-inside-the-SDK rule: ADR
28
+ 0001 (scitex-app), ADR 0003 (scitex-ui).
@@ -0,0 +1,48 @@
1
+ Metadata-Version: 2.5
2
+ Name: scitex-sdk
3
+ Version: 0.1.0
4
+ Summary: SciTeX SDK — one project for the app contract (scitex_sdk.app) + UI shell (scitex_sdk.ui). Step 1: thin facade re-exporting scitex-app + scitex-ui; implementation consolidates gradually.
5
+ Requires-Python: >=3.10
6
+ Requires-Dist: scitex-app>=0.24.0
7
+ Requires-Dist: scitex-ui>=0.20.3
8
+ Description-Content-Type: text/markdown
9
+
10
+ # scitex-sdk
11
+
12
+ One project for the SciTeX **app contract** + **UI shell** — so the two are
13
+ named, versioned, and released as a single unit.
14
+
15
+ ```
16
+ scitex_sdk.app -> the app contract (from scitex-app)
17
+ scitex_sdk.ui -> the UI shell (from scitex-ui)
18
+ ```
19
+
20
+ ## Step 1: thin facade
21
+
22
+ `scitex_sdk.app` re-exports `scitex_app`'s documented public surface **by
23
+ identity** (the same objects), and `scitex_sdk.ui` re-exports `scitex_ui`'s.
24
+ That makes a consumer's import rewrite mechanical and behavior-neutral:
25
+
26
+ ```python
27
+ # before
28
+ from scitex_app import get_files
29
+ # after
30
+ from scitex_sdk.app import get_files # identical object
31
+ ```
32
+
33
+ `tests/test_facade_identity.py` asserts every re-export is the *same object*
34
+ as the original — a copy or reimplementation fails the suite.
35
+
36
+ ## Roadmap
37
+
38
+ 1. **Facade (this)** — re-export, identity tests, release. Consumers can start
39
+ rewriting imports against it.
40
+ 2. **Gradual implementation move** — code moves from `scitex_app` /
41
+ `scitex_ui` into `scitex_sdk.app` / `scitex_sdk.ui`; the original
42
+ distributions stay as thin compat shims until every consumer has migrated.
43
+ 3. **Shim removal** — only after all consumers (hub, figrecipe, writer,
44
+ scholar, cards, agent-container GUI) are on `scitex_sdk`.
45
+
46
+ The static/TS/CSS assets live in `scitex_ui` today (Django's
47
+ AppDirectoriesFinder resolves them by the `scitex_ui` app label); they move
48
+ with the implementation step, not the facade.
@@ -0,0 +1,39 @@
1
+ # scitex-sdk
2
+
3
+ One project for the SciTeX **app contract** + **UI shell** — so the two are
4
+ named, versioned, and released as a single unit.
5
+
6
+ ```
7
+ scitex_sdk.app -> the app contract (from scitex-app)
8
+ scitex_sdk.ui -> the UI shell (from scitex-ui)
9
+ ```
10
+
11
+ ## Step 1: thin facade
12
+
13
+ `scitex_sdk.app` re-exports `scitex_app`'s documented public surface **by
14
+ identity** (the same objects), and `scitex_sdk.ui` re-exports `scitex_ui`'s.
15
+ That makes a consumer's import rewrite mechanical and behavior-neutral:
16
+
17
+ ```python
18
+ # before
19
+ from scitex_app import get_files
20
+ # after
21
+ from scitex_sdk.app import get_files # identical object
22
+ ```
23
+
24
+ `tests/test_facade_identity.py` asserts every re-export is the *same object*
25
+ as the original — a copy or reimplementation fails the suite.
26
+
27
+ ## Roadmap
28
+
29
+ 1. **Facade (this)** — re-export, identity tests, release. Consumers can start
30
+ rewriting imports against it.
31
+ 2. **Gradual implementation move** — code moves from `scitex_app` /
32
+ `scitex_ui` into `scitex_sdk.app` / `scitex_sdk.ui`; the original
33
+ distributions stay as thin compat shims until every consumer has migrated.
34
+ 3. **Shim removal** — only after all consumers (hub, figrecipe, writer,
35
+ scholar, cards, agent-container GUI) are on `scitex_sdk`.
36
+
37
+ The static/TS/CSS assets live in `scitex_ui` today (Django's
38
+ AppDirectoriesFinder resolves them by the `scitex_ui` app label); they move
39
+ with the implementation step, not the facade.
@@ -0,0 +1,20 @@
1
+ [project]
2
+ name = "scitex-sdk"
3
+ version = "0.1.0"
4
+ description = "SciTeX SDK — one project for the app contract (scitex_sdk.app) + UI shell (scitex_sdk.ui). Step 1: thin facade re-exporting scitex-app + scitex-ui; implementation consolidates gradually."
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ dependencies = [
8
+ "scitex-app>=0.24.0",
9
+ "scitex-ui>=0.20.3",
10
+ ]
11
+
12
+ [build-system]
13
+ requires = ["hatchling"]
14
+ build-backend = "hatchling.build"
15
+
16
+ [tool.hatch.build.targets.wheel]
17
+ packages = ["src/scitex_sdk"]
18
+
19
+ [tool.pytest.ini_options]
20
+ testpaths = ["tests"]
@@ -0,0 +1,17 @@
1
+ """scitex-sdk — one project for the app contract + the UI shell.
2
+
3
+ Step 1 (thin facade):
4
+ - ``scitex_sdk.app`` re-exports ``scitex_app`` (the app contract).
5
+ - ``scitex_sdk.ui`` re-exports ``scitex_ui`` (the UI shell + assets).
6
+
7
+ Re-exports are the SAME objects as the originals (identity, not copies) —
8
+ verified by ``tests/test_facade_identity.py`` — so consumers can switch
9
+ ``scitex_app`` -> ``scitex_sdk.app`` (and ``scitex_ui`` -> ``scitex_sdk.ui``)
10
+ mechanically with zero behavior change. The implementation moves INTO
11
+ scitex-sdk gradually after this facade releases; the original distributions
12
+ stay as thin compat shims until every consumer has migrated.
13
+ """
14
+
15
+ from scitex_sdk import app, ui # noqa: F401
16
+
17
+ __all__ = ["app", "ui"]
@@ -0,0 +1,54 @@
1
+ """scitex_sdk.app — the app contract (facade over ``scitex_app``).
2
+
3
+ Step 1 re-exports the documented public surface of ``scitex_app`` by IDENTITY
4
+ (the same function/class/submodule objects), so ``from scitex_sdk.app import
5
+ get_files`` is the same object as ``from scitex_app import get_files``. The
6
+ implementation moves here gradually after the facade releases.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ from scitex_app import (
12
+ FilesBackend,
13
+ build_tree,
14
+ chat,
15
+ copy_file,
16
+ delete_file,
17
+ embed,
18
+ file_exists,
19
+ get_files,
20
+ hosts_to_allow,
21
+ list_files,
22
+ paths,
23
+ read_file,
24
+ register_backend,
25
+ rename_file,
26
+ scaffold,
27
+ validate,
28
+ validator,
29
+ write_file,
30
+ )
31
+
32
+ __version__ = "0.1.0" # facade version; the app contract's own version is scitex_app.__version__
33
+
34
+ __all__ = [
35
+ "FilesBackend",
36
+ "build_tree",
37
+ "chat",
38
+ "copy_file",
39
+ "delete_file",
40
+ "embed",
41
+ "file_exists",
42
+ "get_files",
43
+ "hosts_to_allow",
44
+ "list_files",
45
+ "paths",
46
+ "read_file",
47
+ "register_backend",
48
+ "rename_file",
49
+ "scaffold",
50
+ "validate",
51
+ "validator",
52
+ "write_file",
53
+ "__version__",
54
+ ]
@@ -0,0 +1,30 @@
1
+ """scitex_sdk.ui — the UI shell + assets (facade over ``scitex_ui``).
2
+
3
+ Step 1 re-exports the documented public surface of ``scitex_ui`` by IDENTITY,
4
+ so ``from scitex_sdk.ui import get_component`` is the same object as
5
+ ``from scitex_ui import get_component``. The implementation moves here
6
+ gradually after the facade releases; the static/TS/CSS assets stay in
7
+ scitex_ui until that move (Django's AppDirectoriesFinder resolves them by the
8
+ ``scitex_ui`` app label, which the facade does not change).
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ from scitex_ui import (
14
+ get_component,
15
+ get_docs_path,
16
+ get_static_dir,
17
+ list_components,
18
+ register_component,
19
+ )
20
+
21
+ __version__ = "0.1.0" # facade version; the shell's own version is scitex_ui.__version__
22
+
23
+ __all__ = [
24
+ "get_component",
25
+ "get_docs_path",
26
+ "get_static_dir",
27
+ "list_components",
28
+ "register_component",
29
+ "__version__",
30
+ ]
@@ -0,0 +1,71 @@
1
+ """Facade identity tests — the contract that makes the import rewrite safe.
2
+
3
+ Every name re-exported by ``scitex_sdk.app`` / ``scitex_sdk.ui`` must be the
4
+ SAME object (identity) as the corresponding name in ``scitex_app`` /
5
+ ``scitex_ui``. That is what lets a consumer rewrite
6
+ ``from scitex_app import X`` -> ``from scitex_sdk.app import X`` mechanically
7
+ with zero behavior change. A copy or a reimplementation would break this.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ import scitex_app
13
+ import scitex_ui
14
+ from scitex_sdk import app, ui
15
+
16
+
17
+ def _assert_identity(facade_module, source_module, name):
18
+ assert getattr(facade_module, name) is getattr(source_module, name), (
19
+ f"scitex_sdk facade re-export {name!r} is not identical to "
20
+ f"{source_module.__name__}.{name}"
21
+ )
22
+
23
+
24
+ # The names the facade re-exports. Kept in sync with scitex_sdk/app.py and
25
+ # scitex_sdk/ui.py __all__ (minus the facade's own __version__).
26
+ _APP_NAMES = [
27
+ "FilesBackend",
28
+ "build_tree",
29
+ "chat",
30
+ "copy_file",
31
+ "delete_file",
32
+ "embed",
33
+ "file_exists",
34
+ "get_files",
35
+ "hosts_to_allow",
36
+ "list_files",
37
+ "paths",
38
+ "read_file",
39
+ "register_backend",
40
+ "rename_file",
41
+ "scaffold",
42
+ "validate",
43
+ "validator",
44
+ "write_file",
45
+ ]
46
+ _UI_NAMES = [
47
+ "get_component",
48
+ "get_docs_path",
49
+ "get_static_dir",
50
+ "list_components",
51
+ "register_component",
52
+ ]
53
+
54
+
55
+ def test_app_facade_reexports_by_identity():
56
+ for name in _APP_NAMES:
57
+ _assert_identity(app, scitex_app, name)
58
+
59
+
60
+ def test_ui_facade_reexports_by_identity():
61
+ for name in _UI_NAMES:
62
+ _assert_identity(ui, scitex_ui, name)
63
+
64
+
65
+ def test_facade_modules_are_distinct_from_each_other():
66
+ assert app is not ui
67
+
68
+
69
+ def test_facade_carries_its_own_version_string():
70
+ # The facade declares its own version; it must be a real version string.
71
+ assert app.__version__ == ui.__version__ == "0.1.0"