silicate 0.1.2__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.
- silicate-0.1.2/.github/workflows/ci.yml +78 -0
- silicate-0.1.2/.github/workflows/claude-code-review.yml +29 -0
- silicate-0.1.2/.github/workflows/claude.yml +39 -0
- silicate-0.1.2/.github/workflows/release.yml +166 -0
- silicate-0.1.2/.gitignore +20 -0
- silicate-0.1.2/.gitmodules +3 -0
- silicate-0.1.2/.pre-commit-config.yaml +28 -0
- silicate-0.1.2/.python-version +1 -0
- silicate-0.1.2/.release-please-config.json +32 -0
- silicate-0.1.2/.release-please-manifest.json +3 -0
- silicate-0.1.2/CHANGELOG.md +22 -0
- silicate-0.1.2/Cargo.lock +2188 -0
- silicate-0.1.2/Cargo.toml +18 -0
- silicate-0.1.2/PKG-INFO +110 -0
- silicate-0.1.2/README.md +87 -0
- silicate-0.1.2/docs/api.md +150 -0
- silicate-0.1.2/docs/index.md +49 -0
- silicate-0.1.2/docs/installation.md +92 -0
- silicate-0.1.2/docs/stylesheets/extra.css +33 -0
- silicate-0.1.2/docs/usage.md +164 -0
- silicate-0.1.2/mkdocs.yml +76 -0
- silicate-0.1.2/pyproject.toml +44 -0
- silicate-0.1.2/python/silicate/__init__.py +10 -0
- silicate-0.1.2/python/silicate/__init__.pyi +97 -0
- silicate-0.1.2/python/silicate/py.typed +0 -0
- silicate-0.1.2/renovate.json +6 -0
- silicate-0.1.2/src/lib.rs +279 -0
- silicate-0.1.2/uv.lock +757 -0
- silicate-0.1.2/vendor/silicon/.github/dependabot.yml +27 -0
- silicate-0.1.2/vendor/silicon/.github/workflows/ci.yml +113 -0
- silicate-0.1.2/vendor/silicon/.github/workflows/release.yml +115 -0
- silicate-0.1.2/vendor/silicon/.gitignore +5 -0
- silicate-0.1.2/vendor/silicon/Cargo.lock +1865 -0
- silicate-0.1.2/vendor/silicon/Cargo.toml +68 -0
- silicate-0.1.2/vendor/silicon/LICENSE +21 -0
- silicate-0.1.2/vendor/silicon/README.md +159 -0
- silicate-0.1.2/vendor/silicon/assets/README.md +3 -0
- silicate-0.1.2/vendor/silicon/assets/fonts/Hack-Bold.ttf +0 -0
- silicate-0.1.2/vendor/silicon/assets/fonts/Hack-BoldItalic.ttf +0 -0
- silicate-0.1.2/vendor/silicon/assets/fonts/Hack-Italic.ttf +0 -0
- silicate-0.1.2/vendor/silicon/assets/fonts/Hack-Regular.ttf +0 -0
- silicate-0.1.2/vendor/silicon/assets/sync_from_bat.sh +15 -0
- silicate-0.1.2/vendor/silicon/assets/syntaxes/.gitignore +4 -0
- silicate-0.1.2/vendor/silicon/assets/syntaxes.bin +0 -0
- silicate-0.1.2/vendor/silicon/assets/themes/.gitignore +5 -0
- silicate-0.1.2/vendor/silicon/assets/themes.bin +0 -0
- silicate-0.1.2/vendor/silicon/example/example.png +0 -0
- silicate-0.1.2/vendor/silicon/example/example.rs +10 -0
- silicate-0.1.2/vendor/silicon/example/example.sh +1 -0
- silicate-0.1.2/vendor/silicon/src/assets.rs +59 -0
- silicate-0.1.2/vendor/silicon/src/bin/silicon/config.rs +319 -0
- silicate-0.1.2/vendor/silicon/src/bin/silicon/main.rs +171 -0
- silicate-0.1.2/vendor/silicon/src/blur.rs +375 -0
- silicate-0.1.2/vendor/silicon/src/directories.rs +66 -0
- silicate-0.1.2/vendor/silicon/src/error.rs +56 -0
- silicate-0.1.2/vendor/silicon/src/font.rs +460 -0
- silicate-0.1.2/vendor/silicon/src/formatter.rs +394 -0
- silicate-0.1.2/vendor/silicon/src/hb_wrapper.rs +117 -0
- silicate-0.1.2/vendor/silicon/src/lib.rs +48 -0
- silicate-0.1.2/vendor/silicon/src/utils.rs +378 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ci-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
os: [macos-14, ubuntu-latest]
|
|
18
|
+
runs-on: ${{ matrix.os }}
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout
|
|
21
|
+
uses: actions/checkout@v6
|
|
22
|
+
with:
|
|
23
|
+
submodules: recursive
|
|
24
|
+
|
|
25
|
+
- name: Install system dependencies (Linux)
|
|
26
|
+
if: runner.os == 'Linux'
|
|
27
|
+
run: sudo apt-get update && sudo apt-get install -y pkg-config libfontconfig1-dev libfreetype-dev
|
|
28
|
+
|
|
29
|
+
- name: Install uv
|
|
30
|
+
uses: astral-sh/setup-uv@v7
|
|
31
|
+
|
|
32
|
+
- name: Install Rust toolchain
|
|
33
|
+
uses: dtolnay/rust-toolchain@stable
|
|
34
|
+
|
|
35
|
+
- name: Build with maturin
|
|
36
|
+
run: |
|
|
37
|
+
uv venv
|
|
38
|
+
VIRTUAL_ENV=.venv uvx maturin develop
|
|
39
|
+
|
|
40
|
+
- name: Smoke test
|
|
41
|
+
run: |
|
|
42
|
+
uv run python -c "
|
|
43
|
+
import silicate
|
|
44
|
+
themes = silicate.list_themes()
|
|
45
|
+
assert len(themes) > 0, 'No themes found'
|
|
46
|
+
langs = silicate.list_languages()
|
|
47
|
+
assert len(langs) > 0, 'No languages found'
|
|
48
|
+
png = silicate.generate('print(42)', language='python')
|
|
49
|
+
assert png[:4] == bytes([0x89, 0x50, 0x4e, 0x47]), 'Invalid PNG header'
|
|
50
|
+
print(f'OK: {len(themes)} themes, {len(langs)} languages, {len(png)} byte PNG')
|
|
51
|
+
"
|
|
52
|
+
|
|
53
|
+
lint:
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
steps:
|
|
56
|
+
- name: Checkout
|
|
57
|
+
uses: actions/checkout@v6
|
|
58
|
+
|
|
59
|
+
- name: Install uv
|
|
60
|
+
uses: astral-sh/setup-uv@v7
|
|
61
|
+
|
|
62
|
+
- name: Ruff check
|
|
63
|
+
run: uvx ruff check python/
|
|
64
|
+
|
|
65
|
+
- name: Ruff format check
|
|
66
|
+
run: uvx ruff format --check python/
|
|
67
|
+
|
|
68
|
+
docs:
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
steps:
|
|
71
|
+
- name: Checkout
|
|
72
|
+
uses: actions/checkout@v6
|
|
73
|
+
|
|
74
|
+
- name: Install uv
|
|
75
|
+
uses: astral-sh/setup-uv@v7
|
|
76
|
+
|
|
77
|
+
- name: Build docs (strict)
|
|
78
|
+
run: uvx --with mkdocs-material mkdocs build --strict
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Claude Code Review
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, ready_for_review, reopened]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
claude-review:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
pull-requests: read
|
|
13
|
+
issues: read
|
|
14
|
+
id-token: write
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout repository
|
|
18
|
+
uses: actions/checkout@v6
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 1
|
|
21
|
+
|
|
22
|
+
- name: Run Claude Code Review
|
|
23
|
+
id: claude-review
|
|
24
|
+
uses: anthropics/claude-code-action@v1
|
|
25
|
+
with:
|
|
26
|
+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
27
|
+
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
|
|
28
|
+
plugins: 'code-review@claude-code-plugins'
|
|
29
|
+
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Claude Code
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issue_comment:
|
|
5
|
+
types: [created]
|
|
6
|
+
pull_request_review_comment:
|
|
7
|
+
types: [created]
|
|
8
|
+
issues:
|
|
9
|
+
types: [opened, assigned]
|
|
10
|
+
pull_request_review:
|
|
11
|
+
types: [submitted]
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
claude:
|
|
15
|
+
if: |
|
|
16
|
+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
17
|
+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
18
|
+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
|
19
|
+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
pull-requests: read
|
|
24
|
+
issues: read
|
|
25
|
+
id-token: write
|
|
26
|
+
actions: read
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout repository
|
|
29
|
+
uses: actions/checkout@v6
|
|
30
|
+
with:
|
|
31
|
+
fetch-depth: 1
|
|
32
|
+
|
|
33
|
+
- name: Run Claude Code
|
|
34
|
+
id: claude
|
|
35
|
+
uses: anthropics/claude-code-action@v1
|
|
36
|
+
with:
|
|
37
|
+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
38
|
+
additional_permissions: |
|
|
39
|
+
actions: read
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
force-publish:
|
|
9
|
+
description: "Force publish even if no release created"
|
|
10
|
+
type: boolean
|
|
11
|
+
default: false
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: write
|
|
15
|
+
pull-requests: write
|
|
16
|
+
id-token: write
|
|
17
|
+
pages: write
|
|
18
|
+
|
|
19
|
+
concurrency:
|
|
20
|
+
group: release
|
|
21
|
+
cancel-in-progress: false
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
release-please:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
outputs:
|
|
27
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
28
|
+
version: ${{ steps.release.outputs.version }}
|
|
29
|
+
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
30
|
+
steps:
|
|
31
|
+
- name: Checkout
|
|
32
|
+
uses: actions/checkout@v6
|
|
33
|
+
|
|
34
|
+
- name: Run release-please
|
|
35
|
+
id: release
|
|
36
|
+
uses: googleapis/release-please-action@v4
|
|
37
|
+
with:
|
|
38
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
39
|
+
config-file: .release-please-config.json
|
|
40
|
+
manifest-file: .release-please-manifest.json
|
|
41
|
+
|
|
42
|
+
build-wheels:
|
|
43
|
+
needs: release-please
|
|
44
|
+
if: needs.release-please.outputs.release_created == 'true' || github.event.inputs.force-publish == 'true'
|
|
45
|
+
strategy:
|
|
46
|
+
fail-fast: false
|
|
47
|
+
matrix:
|
|
48
|
+
include:
|
|
49
|
+
# macOS
|
|
50
|
+
- os: macos-14
|
|
51
|
+
target: aarch64-apple-darwin
|
|
52
|
+
- os: macos-14
|
|
53
|
+
target: x86_64-apple-darwin
|
|
54
|
+
# Linux
|
|
55
|
+
- os: ubuntu-latest
|
|
56
|
+
target: x86_64-unknown-linux-gnu
|
|
57
|
+
- os: ubuntu-latest
|
|
58
|
+
target: aarch64-unknown-linux-gnu
|
|
59
|
+
# Windows
|
|
60
|
+
- os: windows-latest
|
|
61
|
+
target: x86_64-pc-windows-msvc
|
|
62
|
+
runs-on: ${{ matrix.os }}
|
|
63
|
+
env:
|
|
64
|
+
RUST_FONTCONFIG_DLOPEN: "1"
|
|
65
|
+
steps:
|
|
66
|
+
- name: Checkout
|
|
67
|
+
uses: actions/checkout@v6
|
|
68
|
+
with:
|
|
69
|
+
submodules: recursive
|
|
70
|
+
|
|
71
|
+
- name: Build wheels
|
|
72
|
+
uses: PyO3/maturin-action@v1
|
|
73
|
+
with:
|
|
74
|
+
target: ${{ matrix.target }}
|
|
75
|
+
args: --release --out dist --find-interpreter
|
|
76
|
+
manylinux: auto
|
|
77
|
+
before-script-linux: |
|
|
78
|
+
yum install -y fontconfig-devel freetype-devel || true
|
|
79
|
+
|
|
80
|
+
- name: Upload wheels
|
|
81
|
+
uses: actions/upload-artifact@v6
|
|
82
|
+
with:
|
|
83
|
+
name: wheels-${{ matrix.target }}
|
|
84
|
+
path: dist/
|
|
85
|
+
|
|
86
|
+
build-sdist:
|
|
87
|
+
needs: release-please
|
|
88
|
+
if: needs.release-please.outputs.release_created == 'true' || github.event.inputs.force-publish == 'true'
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
steps:
|
|
91
|
+
- name: Checkout
|
|
92
|
+
uses: actions/checkout@v6
|
|
93
|
+
with:
|
|
94
|
+
submodules: recursive
|
|
95
|
+
|
|
96
|
+
- name: Build sdist
|
|
97
|
+
uses: PyO3/maturin-action@v1
|
|
98
|
+
with:
|
|
99
|
+
command: sdist
|
|
100
|
+
args: --out dist
|
|
101
|
+
|
|
102
|
+
- name: Upload sdist
|
|
103
|
+
uses: actions/upload-artifact@v6
|
|
104
|
+
with:
|
|
105
|
+
name: sdist
|
|
106
|
+
path: dist/
|
|
107
|
+
|
|
108
|
+
publish-pypi:
|
|
109
|
+
needs: [build-wheels, build-sdist]
|
|
110
|
+
runs-on: ubuntu-latest
|
|
111
|
+
permissions:
|
|
112
|
+
id-token: write
|
|
113
|
+
environment:
|
|
114
|
+
name: pypi
|
|
115
|
+
url: https://pypi.org/project/silicate/
|
|
116
|
+
steps:
|
|
117
|
+
- name: Download all artifacts
|
|
118
|
+
uses: actions/download-artifact@v7
|
|
119
|
+
with:
|
|
120
|
+
path: dist/
|
|
121
|
+
merge-multiple: true
|
|
122
|
+
|
|
123
|
+
- name: Install uv
|
|
124
|
+
uses: astral-sh/setup-uv@v7
|
|
125
|
+
|
|
126
|
+
- name: Publish to PyPI
|
|
127
|
+
run: uv publish dist/*
|
|
128
|
+
|
|
129
|
+
build-docs:
|
|
130
|
+
needs: release-please
|
|
131
|
+
if: needs.release-please.outputs.release_created == 'true' || github.event.inputs.force-publish == 'true'
|
|
132
|
+
runs-on: ubuntu-latest
|
|
133
|
+
steps:
|
|
134
|
+
- name: Checkout
|
|
135
|
+
uses: actions/checkout@v6
|
|
136
|
+
|
|
137
|
+
- name: Install uv
|
|
138
|
+
uses: astral-sh/setup-uv@v7
|
|
139
|
+
|
|
140
|
+
- name: Build docs
|
|
141
|
+
run: uvx --with mkdocs-material mkdocs build --strict
|
|
142
|
+
|
|
143
|
+
- name: Add CNAME
|
|
144
|
+
run: echo "silicate.alltuner.com" > site/CNAME
|
|
145
|
+
|
|
146
|
+
- name: Setup Pages
|
|
147
|
+
uses: actions/configure-pages@v5
|
|
148
|
+
|
|
149
|
+
- name: Upload pages artifact
|
|
150
|
+
uses: actions/upload-pages-artifact@v4
|
|
151
|
+
with:
|
|
152
|
+
path: site/
|
|
153
|
+
|
|
154
|
+
deploy-docs:
|
|
155
|
+
needs: build-docs
|
|
156
|
+
runs-on: ubuntu-latest
|
|
157
|
+
permissions:
|
|
158
|
+
pages: write
|
|
159
|
+
id-token: write
|
|
160
|
+
environment:
|
|
161
|
+
name: github-pages
|
|
162
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
163
|
+
steps:
|
|
164
|
+
- name: Deploy to GitHub Pages
|
|
165
|
+
id: deployment
|
|
166
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
# Built-in hooks (fast, Rust-native)
|
|
3
|
+
- repo: builtin
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-toml
|
|
8
|
+
- id: check-yaml
|
|
9
|
+
- id: check-json
|
|
10
|
+
- id: check-merge-conflict
|
|
11
|
+
- id: detect-private-key
|
|
12
|
+
- id: no-commit-to-branch
|
|
13
|
+
args: [--branch, main, --branch, master]
|
|
14
|
+
|
|
15
|
+
# Ruff for Python linting and formatting
|
|
16
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
17
|
+
rev: v0.9.6
|
|
18
|
+
hooks:
|
|
19
|
+
- id: ruff
|
|
20
|
+
args: [--fix]
|
|
21
|
+
- id: ruff-format
|
|
22
|
+
|
|
23
|
+
# Prevent push to main/master
|
|
24
|
+
- repo: builtin
|
|
25
|
+
hooks:
|
|
26
|
+
- id: no-commit-to-branch
|
|
27
|
+
args: [--branch, main, --branch, master]
|
|
28
|
+
stages: [pre-push]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": {
|
|
3
|
+
".": {
|
|
4
|
+
"changelog-path": "CHANGELOG.md",
|
|
5
|
+
"release-type": "simple",
|
|
6
|
+
"include-component-in-tag": false,
|
|
7
|
+
"bump-minor-pre-major": true,
|
|
8
|
+
"bump-patch-for-minor-pre-major": true,
|
|
9
|
+
"changelog-sections": [
|
|
10
|
+
{ "type": "feat", "section": "Features" },
|
|
11
|
+
{ "type": "fix", "section": "Bug Fixes" },
|
|
12
|
+
{ "type": "refactor", "section": "Code Refactoring" },
|
|
13
|
+
{ "type": "perf", "section": "Performance Improvements" },
|
|
14
|
+
{ "type": "chore", "section": "Miscellaneous Chores" },
|
|
15
|
+
{ "type": "docs", "section": "Documentation Updates" },
|
|
16
|
+
{ "type": "ci", "section": "CI/CD Changes" }
|
|
17
|
+
],
|
|
18
|
+
"extra-files": [
|
|
19
|
+
{
|
|
20
|
+
"type": "toml",
|
|
21
|
+
"path": "pyproject.toml",
|
|
22
|
+
"jsonpath": "$.project.version"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "toml",
|
|
26
|
+
"path": "Cargo.toml",
|
|
27
|
+
"jsonpath": "$.package.version"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.1.2](https://github.com/alltuner/silicate/compare/v0.1.1...v0.1.2) (2026-02-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* CI wheel builds and docs sidebar ([#3](https://github.com/alltuner/silicate/issues/3)) ([c7d34ec](https://github.com/alltuner/silicate/commit/c7d34ec28b21e5a8475361217ed4ab1dd358b407))
|
|
9
|
+
|
|
10
|
+
## [0.1.1](https://github.com/alltuner/silicate/compare/v0.1.0...v0.1.1) (2026-02-25)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* initial release of Silicate ([c72d77a](https://github.com/alltuner/silicate/commit/c72d77ab9b05fa4a98f2024f2213fe3841619a0d))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Miscellaneous Chores
|
|
19
|
+
|
|
20
|
+
* add *.so and *.pyd to gitignore ([#2](https://github.com/alltuner/silicate/issues/2)) ([6ae4ad9](https://github.com/alltuner/silicate/commit/6ae4ad917b1c5dc21759d2049a3e3344ddf45df4))
|
|
21
|
+
|
|
22
|
+
## Changelog
|