ry-cli 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.
- ry_cli-0.1.0/.github/logo.png +0 -0
- ry_cli-0.1.0/.github/workflows/publish-python.yml +217 -0
- ry_cli-0.1.0/.github/workflows/release-please.yml +22 -0
- ry_cli-0.1.0/.gitignore +1 -0
- ry_cli-0.1.0/CHANGELOG.md +8 -0
- ry_cli-0.1.0/Cargo.lock +719 -0
- ry_cli-0.1.0/Cargo.toml +22 -0
- ry_cli-0.1.0/LICENSE +21 -0
- ry_cli-0.1.0/PKG-INFO +76 -0
- ry_cli-0.1.0/README.md +55 -0
- ry_cli-0.1.0/config.example.yaml +46 -0
- ry_cli-0.1.0/pyproject.toml +27 -0
- ry_cli-0.1.0/src/config.rs +141 -0
- ry_cli-0.1.0/src/diagnostics.rs +110 -0
- ry_cli-0.1.0/src/generation.rs +42 -0
- ry_cli-0.1.0/src/inline.rs +402 -0
- ry_cli-0.1.0/src/lib.rs +40 -0
- ry_cli-0.1.0/src/main.rs +139 -0
- ry_cli-0.1.0/src/module.rs +53 -0
- ry_cli-0.1.0/src/packages.rs +168 -0
- ry_cli-0.1.0/src/treesitter.rs +26 -0
- ry_cli-0.1.0/tests/fixtures/basic_async_to_sync/expected.py +7 -0
- ry_cli-0.1.0/tests/fixtures/basic_async_to_sync/input.py +3 -0
- ry_cli-0.1.0/tests/fixtures/basic_async_to_sync/ry.yml +8 -0
- ry_cli-0.1.0/tests/fixtures/tag_rules/expected.py +7 -0
- ry_cli-0.1.0/tests/fixtures/tag_rules/input.py +3 -0
- ry_cli-0.1.0/tests/fixtures/tag_rules/ry.yml +8 -0
- ry_cli-0.1.0/tests/fixtures.rs +95 -0
|
Binary file
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
name: Publish Python Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
PACKAGE_NAME: ry-cli
|
|
13
|
+
PYTHON_VERSION: "3.10"
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
sdist:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
23
|
+
- name: Build sdist
|
|
24
|
+
uses: PyO3/maturin-action@v1
|
|
25
|
+
with:
|
|
26
|
+
command: sdist
|
|
27
|
+
args: --out dist
|
|
28
|
+
- name: Upload sdist
|
|
29
|
+
uses: actions/upload-artifact@v4
|
|
30
|
+
with:
|
|
31
|
+
name: wheels-sdist
|
|
32
|
+
path: dist
|
|
33
|
+
|
|
34
|
+
macos-x86_64:
|
|
35
|
+
runs-on: macos-14
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
- name: Add x86_64 target
|
|
39
|
+
run: rustup target add x86_64-apple-darwin
|
|
40
|
+
- name: Build wheels - x86_64
|
|
41
|
+
uses: PyO3/maturin-action@v1
|
|
42
|
+
with:
|
|
43
|
+
target: x86_64-apple-darwin
|
|
44
|
+
args: --release --out dist
|
|
45
|
+
- name: Upload wheels
|
|
46
|
+
uses: actions/upload-artifact@v4
|
|
47
|
+
with:
|
|
48
|
+
name: wheels-macos-x86_64
|
|
49
|
+
path: dist
|
|
50
|
+
|
|
51
|
+
macos-aarch64:
|
|
52
|
+
runs-on: macos-14
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
- uses: actions/setup-python@v5
|
|
56
|
+
with:
|
|
57
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
58
|
+
architecture: arm64
|
|
59
|
+
- name: Build wheels - aarch64
|
|
60
|
+
uses: PyO3/maturin-action@v1
|
|
61
|
+
with:
|
|
62
|
+
target: aarch64
|
|
63
|
+
args: --release --out dist
|
|
64
|
+
- name: Test wheel
|
|
65
|
+
run: |
|
|
66
|
+
pip install dist/*.whl --force-reinstall
|
|
67
|
+
ry --help
|
|
68
|
+
- name: Upload wheels
|
|
69
|
+
uses: actions/upload-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: wheels-macos-aarch64
|
|
72
|
+
path: dist
|
|
73
|
+
|
|
74
|
+
windows:
|
|
75
|
+
runs-on: windows-latest
|
|
76
|
+
strategy:
|
|
77
|
+
matrix:
|
|
78
|
+
platform:
|
|
79
|
+
- target: x86_64-pc-windows-msvc
|
|
80
|
+
arch: x64
|
|
81
|
+
- target: i686-pc-windows-msvc
|
|
82
|
+
arch: x86
|
|
83
|
+
- target: aarch64-pc-windows-msvc
|
|
84
|
+
arch: x64
|
|
85
|
+
steps:
|
|
86
|
+
- uses: actions/checkout@v4
|
|
87
|
+
- uses: actions/setup-python@v5
|
|
88
|
+
with:
|
|
89
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
90
|
+
architecture: ${{ matrix.platform.arch }}
|
|
91
|
+
- name: Build wheels
|
|
92
|
+
uses: PyO3/maturin-action@v1
|
|
93
|
+
with:
|
|
94
|
+
target: ${{ matrix.platform.target }}
|
|
95
|
+
args: --release --out dist
|
|
96
|
+
- name: Test wheel
|
|
97
|
+
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
|
|
98
|
+
shell: bash
|
|
99
|
+
run: |
|
|
100
|
+
python -m pip install dist/*.whl --force-reinstall
|
|
101
|
+
ry --help
|
|
102
|
+
- name: Upload wheels
|
|
103
|
+
uses: actions/upload-artifact@v4
|
|
104
|
+
with:
|
|
105
|
+
name: wheels-${{ matrix.platform.target }}
|
|
106
|
+
path: dist
|
|
107
|
+
|
|
108
|
+
linux:
|
|
109
|
+
runs-on: ubuntu-latest
|
|
110
|
+
strategy:
|
|
111
|
+
matrix:
|
|
112
|
+
target:
|
|
113
|
+
- x86_64-unknown-linux-gnu
|
|
114
|
+
- i686-unknown-linux-gnu
|
|
115
|
+
steps:
|
|
116
|
+
- uses: actions/checkout@v4
|
|
117
|
+
- uses: actions/setup-python@v5
|
|
118
|
+
with:
|
|
119
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
120
|
+
- name: Build wheels
|
|
121
|
+
uses: PyO3/maturin-action@v1
|
|
122
|
+
with:
|
|
123
|
+
target: ${{ matrix.target }}
|
|
124
|
+
manylinux: auto
|
|
125
|
+
args: --release --out dist
|
|
126
|
+
- name: Test wheel
|
|
127
|
+
if: ${{ startsWith(matrix.target, 'x86_64') }}
|
|
128
|
+
run: |
|
|
129
|
+
pip install dist/*.whl --force-reinstall
|
|
130
|
+
ry --help
|
|
131
|
+
- name: Upload wheels
|
|
132
|
+
uses: actions/upload-artifact@v4
|
|
133
|
+
with:
|
|
134
|
+
name: wheels-${{ matrix.target }}
|
|
135
|
+
path: dist
|
|
136
|
+
|
|
137
|
+
linux-cross:
|
|
138
|
+
runs-on: ubuntu-latest
|
|
139
|
+
strategy:
|
|
140
|
+
matrix:
|
|
141
|
+
target:
|
|
142
|
+
- aarch64-unknown-linux-gnu
|
|
143
|
+
- armv7-unknown-linux-gnueabihf
|
|
144
|
+
steps:
|
|
145
|
+
- uses: actions/checkout@v4
|
|
146
|
+
- uses: actions/setup-python@v5
|
|
147
|
+
with:
|
|
148
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
149
|
+
- name: Build wheels
|
|
150
|
+
uses: PyO3/maturin-action@v1
|
|
151
|
+
with:
|
|
152
|
+
target: ${{ matrix.target }}
|
|
153
|
+
manylinux: auto
|
|
154
|
+
args: --release --out dist
|
|
155
|
+
- name: Upload wheels
|
|
156
|
+
uses: actions/upload-artifact@v4
|
|
157
|
+
with:
|
|
158
|
+
name: wheels-${{ matrix.target }}
|
|
159
|
+
path: dist
|
|
160
|
+
|
|
161
|
+
musllinux:
|
|
162
|
+
runs-on: ubuntu-latest
|
|
163
|
+
strategy:
|
|
164
|
+
matrix:
|
|
165
|
+
target:
|
|
166
|
+
- x86_64-unknown-linux-musl
|
|
167
|
+
- aarch64-unknown-linux-musl
|
|
168
|
+
steps:
|
|
169
|
+
- uses: actions/checkout@v4
|
|
170
|
+
- uses: actions/setup-python@v5
|
|
171
|
+
with:
|
|
172
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
173
|
+
- name: Build wheels
|
|
174
|
+
uses: PyO3/maturin-action@v1
|
|
175
|
+
with:
|
|
176
|
+
target: ${{ matrix.target }}
|
|
177
|
+
manylinux: musllinux_1_2
|
|
178
|
+
args: --release --out dist
|
|
179
|
+
- name: Upload wheels
|
|
180
|
+
uses: actions/upload-artifact@v4
|
|
181
|
+
with:
|
|
182
|
+
name: wheels-${{ matrix.target }}
|
|
183
|
+
path: dist
|
|
184
|
+
|
|
185
|
+
release:
|
|
186
|
+
name: Release
|
|
187
|
+
runs-on: ubuntu-latest
|
|
188
|
+
needs:
|
|
189
|
+
[
|
|
190
|
+
sdist,
|
|
191
|
+
macos-x86_64,
|
|
192
|
+
macos-aarch64,
|
|
193
|
+
windows,
|
|
194
|
+
linux,
|
|
195
|
+
linux-cross,
|
|
196
|
+
musllinux,
|
|
197
|
+
]
|
|
198
|
+
permissions:
|
|
199
|
+
id-token: write
|
|
200
|
+
contents: write
|
|
201
|
+
steps:
|
|
202
|
+
- uses: actions/download-artifact@v4
|
|
203
|
+
with:
|
|
204
|
+
pattern: wheels-*
|
|
205
|
+
merge-multiple: true
|
|
206
|
+
path: dist
|
|
207
|
+
- name: Publish to PyPI
|
|
208
|
+
uses: PyO3/maturin-action@v1
|
|
209
|
+
with:
|
|
210
|
+
command: upload
|
|
211
|
+
args: --non-interactive --skip-existing dist/*
|
|
212
|
+
- name: Upload wheels to GitHub release
|
|
213
|
+
if: github.event_name == 'release'
|
|
214
|
+
env:
|
|
215
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
216
|
+
run: |
|
|
217
|
+
gh release upload ${{ github.event.release.tag_name }} dist/* --repo ${{ github.repository }}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Release Please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release-please:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
outputs:
|
|
16
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
17
|
+
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
18
|
+
steps:
|
|
19
|
+
- uses: googleapis/release-please-action@v4
|
|
20
|
+
id: release
|
|
21
|
+
with:
|
|
22
|
+
release-type: rust
|
ry_cli-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/target
|