Class-Widgets-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.
Files changed (32) hide show
  1. class_widgets_sdk-0.1.0/.git-cliff.toml +83 -0
  2. class_widgets_sdk-0.1.0/.github/workflows/python-publish.yml +70 -0
  3. class_widgets_sdk-0.1.0/.github/workflows/release.yml +97 -0
  4. class_widgets_sdk-0.1.0/.gitignore +207 -0
  5. class_widgets_sdk-0.1.0/.idea/.gitignore +8 -0
  6. class_widgets_sdk-0.1.0/.idea/class-widgets-sdk.iml +10 -0
  7. class_widgets_sdk-0.1.0/.idea/inspectionProfiles/profiles_settings.xml +6 -0
  8. class_widgets_sdk-0.1.0/.idea/misc.xml +7 -0
  9. class_widgets_sdk-0.1.0/.idea/modules.xml +8 -0
  10. class_widgets_sdk-0.1.0/.idea/vcs.xml +7 -0
  11. class_widgets_sdk-0.1.0/.idea/workspace.xml +208 -0
  12. class_widgets_sdk-0.1.0/.python-version +1 -0
  13. class_widgets_sdk-0.1.0/ClassWidgets/SDK/__init__.py +31 -0
  14. class_widgets_sdk-0.1.0/ClassWidgets/SDK/__init__.pyi +21 -0
  15. class_widgets_sdk-0.1.0/ClassWidgets/SDK/api.pyi +172 -0
  16. class_widgets_sdk-0.1.0/ClassWidgets/SDK/assets/default_icon.png +0 -0
  17. class_widgets_sdk-0.1.0/ClassWidgets/SDK/com.lintu.tools_1.0.0.zip +0 -0
  18. class_widgets_sdk-0.1.0/ClassWidgets/SDK/config.pyi +164 -0
  19. class_widgets_sdk-0.1.0/ClassWidgets/SDK/plugin_base.pyi +51 -0
  20. class_widgets_sdk-0.1.0/ClassWidgets/SDK/py.typed +0 -0
  21. class_widgets_sdk-0.1.0/ClassWidgets/SDK/tools/__init__.py +16 -0
  22. class_widgets_sdk-0.1.0/ClassWidgets/SDK/tools/manifest.py +88 -0
  23. class_widgets_sdk-0.1.0/ClassWidgets/SDK/tools/packager.py +293 -0
  24. class_widgets_sdk-0.1.0/ClassWidgets/SDK/tools/scaffold.py +338 -0
  25. class_widgets_sdk-0.1.0/ClassWidgets/__init__.py +0 -0
  26. class_widgets_sdk-0.1.0/LICENSE +21 -0
  27. class_widgets_sdk-0.1.0/PKG-INFO +166 -0
  28. class_widgets_sdk-0.1.0/README.md +150 -0
  29. class_widgets_sdk-0.1.0/docs/logo.png +0 -0
  30. class_widgets_sdk-0.1.0/example.py +20 -0
  31. class_widgets_sdk-0.1.0/pyproject.toml +40 -0
  32. class_widgets_sdk-0.1.0/uv.lock +129 -0
@@ -0,0 +1,83 @@
1
+ [changelog]
2
+ body = """
3
+
4
+ <img src="https://raw.githubusercontent.com/rinlit-233-shiroko/class-widgets-2/main/docs/assets/release_banner.png" width="100%" />
5
+
6
+ > [!WARNING]
7
+ > 目前 Class Widgets 2 仍然处于开发阶段,可能不适用于生产环境。
8
+ > 欢迎反馈意见和建议谢谢喵
9
+
10
+ > [!WARNING]
11
+ > macOS 版本只能在搭载 Apple M 芯片的 Mac 上使用。
12
+ > 使用搭载了 Intel 处理器的 Mac 的用户,请等待后续适配。
13
+ > 点按左上角的苹果图标 -> 关于本机,可查看这台电脑的处理器。
14
+
15
+ ## Class Widgets 2 更新速递
16
+ > [!NOTE]
17
+ > 当前版本:`{% if version %}({{ version }}){%- endif -%}`
18
+
19
+ {% for group, commits in commits | group_by(attribute="group") %}
20
+
21
+ {% if group != "✨ 新亮点" %}
22
+ <details>
23
+ <summary><h3>{{ group | upper_first }}</h3></summary>
24
+ {% for commit in commits | unique(attribute="message") %}
25
+ - {% if commit.scope %}{{ commit.scope }}: {%- endif -%}{{ commit.message | upper_first }}\
26
+ {% if commit.remote.username %} 作者: @{{ commit.remote.username }}{%- endif -%}
27
+ {% if commit.remote.pr_number %} 在 \
28
+ [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \
29
+ {%- endif %}
30
+ {% endfor %}
31
+ </details>
32
+ {% else %}
33
+ ### {{ group | upper_first }}
34
+ {% for commit in commits | unique(attribute="message") %}
35
+ - {% if commit.scope %}{{ commit.scope }}: {%- endif -%}{{ commit.message | upper_first }}\
36
+ {% if commit.remote.username %} 作者: @{{ commit.remote.username }}{%- endif -%}
37
+ {% if commit.remote.pr_number %} 在 \
38
+ [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \
39
+ {%- endif %}
40
+ {% endfor %}
41
+ {% endif %}
42
+
43
+ {% endfor -%}
44
+
45
+ {% if version %}
46
+ {% if previous.version %}
47
+ **完整 Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}
48
+ {% endif %}
49
+ {% else -%}
50
+ {% raw %}\n{% endraw %}
51
+ {% endif %}
52
+
53
+ {%- macro remote_url() -%}
54
+ https://github.com/rinlit-233-shiroko/class-widgets-2
55
+ {%- endmacro -%}
56
+
57
+ > [!TIP]
58
+ > 对于不方便使用 GitHub 的用户,欢迎使用 123 网盘和 OneDrive 来下载测试版本
59
+ > [123 网盘下载](https://www.123912.com/s/DCyBTd-3iWxH) (无密码,以后的测试版也会持续同步至本链)
60
+ > [OneDrive 下载](https://dl.gemen.pp.ua)
61
+
62
+ """
63
+ trim = true
64
+ footer = "<!-- generated by git-cliff -->"
65
+ output = "CHANGELOG.md"
66
+
67
+
68
+ [git]
69
+ conventional_commits = true
70
+ filter_unconventional = true
71
+ split_commits = false
72
+ commit_parsers = [
73
+ { message = "^feat", group = "✨ 新亮点"},
74
+ { message = "^fix", group = "🛠️ 修复的问题"},
75
+ { message = "^refactor", group = "🔃 功能重构"},
76
+ { message = "^docs", group = "📄 文档更新"},
77
+ { message = "^style", group = "🏞️ 样式优化"},
78
+ ]
79
+ protect_breaking_commits = false
80
+ filter_commits = true
81
+ topo_order = false
82
+ sort_commits = "oldest"
83
+ link_parsers = []
@@ -0,0 +1,70 @@
1
+ # This workflow will upload a Python Package to PyPI when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Upload Python Package
10
+
11
+ on:
12
+ release:
13
+ types: [published]
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ release-build:
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - uses: actions/setup-python@v5
26
+ with:
27
+ python-version: "3.x"
28
+
29
+ - name: Build release distributions
30
+ run: |
31
+ # NOTE: put your own distribution build steps here.
32
+ python -m pip install build
33
+ python -m build
34
+
35
+ - name: Upload distributions
36
+ uses: actions/upload-artifact@v4
37
+ with:
38
+ name: release-dists
39
+ path: dist/
40
+
41
+ pypi-publish:
42
+ runs-on: ubuntu-latest
43
+ needs:
44
+ - release-build
45
+ permissions:
46
+ # IMPORTANT: this permission is mandatory for trusted publishing
47
+ id-token: write
48
+
49
+ # Dedicated environments with protections for publishing are strongly recommended.
50
+ # For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
51
+ environment:
52
+ name: pypi
53
+ # OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
54
+ url: https://pypi.org/project/class-widgets-sdk/
55
+ #
56
+ # ALTERNATIVE: if your GitHub Release name is the PyPI project version string
57
+ # ALTERNATIVE: exactly, uncomment the following line instead:
58
+ # url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
59
+
60
+ steps:
61
+ - name: Retrieve release distributions
62
+ uses: actions/download-artifact@v4
63
+ with:
64
+ name: release-dists
65
+ path: dist/
66
+
67
+ - name: Publish release distributions to PyPI
68
+ uses: pypa/gh-action-pypi-publish@release/v1
69
+ with:
70
+ packages-dir: dist/
@@ -0,0 +1,97 @@
1
+ # .github/workflows/create-release.yml
2
+ name: Create Release
3
+
4
+ on:
5
+ push:
6
+ tags:
7
+ - 'v*' # 匹配 v 开头的标签,如 v1.0.0, v2.1.3
8
+
9
+ permissions:
10
+ contents: write # 需要写权限来创建 release
11
+
12
+ jobs:
13
+ create-release:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+ with:
20
+ fetch-depth: 0 # 获取所有历史,用于生成 changelog
21
+
22
+ - name: Extract version from tag
23
+ id: get_version
24
+ run: |
25
+ # 移除标签前的 'v' 前缀
26
+ VERSION="${GITHUB_REF#refs/tags/v}"
27
+ echo "version=${VERSION}" >> $GITHUB_OUTPUT
28
+ echo "tag=v${VERSION}" >> $GITHUB_OUTPUT
29
+
30
+ # 获取上一个标签(用于生成 changelog)
31
+ PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
32
+ echo "previous_tag=${PREVIOUS_TAG}" >> $GITHUB_OUTPUT
33
+
34
+ - name: Generate changelog
35
+ id: changelog
36
+ run: |
37
+ if [ -n "${{ steps.get_version.outputs.previous_tag }}" ]; then
38
+ # 获取两个标签之间的提交信息
39
+ CHANGELOG=$(git log --pretty=format:"- %s (%h)" ${{ steps.get_version.outputs.previous_tag }}..HEAD)
40
+ else
41
+ # 第一个发布,获取所有提交
42
+ CHANGELOG=$(git log --pretty=format:"- %s (%h)" HEAD)
43
+ fi
44
+
45
+ # 转义换行符,以便在输出中使用
46
+ CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
47
+ echo "changelog=${CHANGELOG}" >> $GITHUB_OUTPUT
48
+
49
+ - name: Setup Python
50
+ uses: actions/setup-python@v5
51
+ with:
52
+ python-version: '3.x'
53
+
54
+ - name: Get package info
55
+ id: package_info
56
+ run: |
57
+ pip install tomli # 用于读取 pyproject.toml
58
+ python -c "
59
+ import tomli
60
+ with open('pyproject.toml', 'rb') as f:
61
+ data = tomli.load(f)
62
+ project = data.get('project', {})
63
+ print(f'name={project.get(\"name\", \"class-widgets-stubs\")}')
64
+ print(f'description={project.get(\"description\", \"Type stubs for Class Widgets SDK\")}')
65
+ "
66
+
67
+ - name: Create Release
68
+ uses: softprops/action-gh-release@v1
69
+ with:
70
+ name: Release v${{ steps.get_version.outputs.version }}
71
+ tag_name: v${{ steps.get_version.outputs.version }}
72
+ body: |
73
+ # ${{ steps.package_info.outputs.name }} v${{ steps.get_version.outputs.version }}
74
+
75
+ ${{ steps.package_info.outputs.description }}
76
+
77
+ ## Changelog
78
+
79
+ ${{ steps.changelog.outputs.changelog }}
80
+
81
+ ## Installation
82
+
83
+ ```bash
84
+ pip install ${{ steps.package_info.outputs.name }}==${{ steps.get_version.outputs.version }}
85
+ ```
86
+
87
+ ## Notes
88
+
89
+ This is an automated release. Please review the changes before publishing.
90
+
91
+ ---
92
+
93
+ *Release created automatically by GitHub Actions*
94
+
95
+ prerelease: false
96
+ generate_release_notes: true # 自动生成发布说明
97
+ token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,207 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+
165
+ # pytype static type analyzer
166
+ .pytype/
167
+
168
+ # Cython debug symbols
169
+ cython_debug/
170
+
171
+ # PyCharm
172
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
175
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
176
+ #.idea/
177
+
178
+ # Abstra
179
+ # Abstra is an AI-powered process automation framework.
180
+ # Ignore directories containing user credentials, local state, and settings.
181
+ # Learn more at https://abstra.io/docs
182
+ .abstra/
183
+
184
+ # Visual Studio Code
185
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
188
+ # you could uncomment the following to ignore the entire vscode folder
189
+ # .vscode/
190
+
191
+ # Ruff stuff:
192
+ .ruff_cache/
193
+
194
+ # PyPI configuration file
195
+ .pypirc
196
+
197
+ # Cursor
198
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
199
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
200
+ # refer to https://docs.cursor.com/context/ignore-files
201
+ .cursorignore
202
+ .cursorindexingignore
203
+
204
+ # Marimo
205
+ marimo/_static/
206
+ marimo/_lsp/
207
+ __marimo__/
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/.venv" />
6
+ </content>
7
+ <orderEntry type="jdk" jdkName="Python 3.12 (class-widgets-sdk)" jdkType="Python SDK" />
8
+ <orderEntry type="sourceFolder" forTests="false" />
9
+ </component>
10
+ </module>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Black">
4
+ <option name="sdkName" value="uv (class-widgets-sdk)" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (class-widgets-sdk)" project-jdk-type="Python SDK" />
7
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/class-widgets-sdk.iml" filepath="$PROJECT_DIR$/.idea/class-widgets-sdk.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
6
+ </component>
7
+ </project>