calc-rs-lang 0.2.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.
- calc_rs_lang-0.2.0/.github/workflows/publish.yml +144 -0
- calc_rs_lang-0.2.0/.gitignore +7 -0
- calc_rs_lang-0.2.0/Cargo.lock +1576 -0
- calc_rs_lang-0.2.0/Cargo.toml +42 -0
- calc_rs_lang-0.2.0/LICENSE +21 -0
- calc_rs_lang-0.2.0/PKG-INFO +191 -0
- calc_rs_lang-0.2.0/README.md +169 -0
- calc_rs_lang-0.2.0/cli-wheel/README.md +20 -0
- calc_rs_lang-0.2.0/cli-wheel/pyproject.toml +43 -0
- calc_rs_lang-0.2.0/docs/LSP.md +88 -0
- calc_rs_lang-0.2.0/docs/PUBLISHING.md +115 -0
- calc_rs_lang-0.2.0/notebook/calc_notebook.py +256 -0
- calc_rs_lang-0.2.0/notebook/dsl_editor.css +130 -0
- calc_rs_lang-0.2.0/notebook/dsl_editor.js +472 -0
- calc_rs_lang-0.2.0/notebook/eval.py +35 -0
- calc_rs_lang-0.2.0/notebook/table_editor.css +201 -0
- calc_rs_lang-0.2.0/notebook/table_editor.js +385 -0
- calc_rs_lang-0.2.0/pyproject.toml +49 -0
- calc_rs_lang-0.2.0/python/calc_rs/__init__.py +40 -0
- calc_rs_lang-0.2.0/python/calc_rs/__init__.pyi +246 -0
- calc_rs_lang-0.2.0/python/calc_rs/__main__.py +3 -0
- calc_rs_lang-0.2.0/python/calc_rs/_cli.py +124 -0
- calc_rs_lang-0.2.0/python/calc_rs/py.typed +0 -0
- calc_rs_lang-0.2.0/src/bin/calc_rs_lsp.rs +147 -0
- calc_rs_lang-0.2.0/src/calendar_utils.rs +416 -0
- calc_rs_lang-0.2.0/src/casts.rs +608 -0
- calc_rs_lang-0.2.0/src/cli_style.rs +698 -0
- calc_rs_lang-0.2.0/src/error.rs +21 -0
- calc_rs_lang-0.2.0/src/evaluator.rs +765 -0
- calc_rs_lang-0.2.0/src/file_bridge.rs +251 -0
- calc_rs_lang-0.2.0/src/formatting.rs +507 -0
- calc_rs_lang-0.2.0/src/functions/aggregate.rs +262 -0
- calc_rs_lang-0.2.0/src/functions/collection.rs +278 -0
- calc_rs_lang-0.2.0/src/functions/datetime.rs +295 -0
- calc_rs_lang-0.2.0/src/functions/format.rs +246 -0
- calc_rs_lang-0.2.0/src/functions/logic.rs +181 -0
- calc_rs_lang-0.2.0/src/functions/math.rs +188 -0
- calc_rs_lang-0.2.0/src/functions/minmax.rs +121 -0
- calc_rs_lang-0.2.0/src/functions/mod.rs +791 -0
- calc_rs_lang-0.2.0/src/functions/numeric.rs +151 -0
- calc_rs_lang-0.2.0/src/functions/table.rs +247 -0
- calc_rs_lang-0.2.0/src/functions/table_verbs.rs +689 -0
- calc_rs_lang-0.2.0/src/functions/text.rs +477 -0
- calc_rs_lang-0.2.0/src/lexer.rs +630 -0
- calc_rs_lang-0.2.0/src/lib.rs +61 -0
- calc_rs_lang-0.2.0/src/lsp.rs +257 -0
- calc_rs_lang-0.2.0/src/main.rs +543 -0
- calc_rs_lang-0.2.0/src/operators.rs +1536 -0
- calc_rs_lang-0.2.0/src/parser.rs +1094 -0
- calc_rs_lang-0.2.0/src/python_bindings.rs +667 -0
- calc_rs_lang-0.2.0/src/session.rs +171 -0
- calc_rs_lang-0.2.0/src/table_workbench.rs +629 -0
- calc_rs_lang-0.2.0/src/user_functions.rs +350 -0
- calc_rs_lang-0.2.0/src/values/collection.rs +152 -0
- calc_rs_lang-0.2.0/src/values/container.rs +152 -0
- calc_rs_lang-0.2.0/src/values/mod.rs +174 -0
- calc_rs_lang-0.2.0/src/values/scalar.rs +177 -0
- calc_rs_lang-0.2.0/src/values/type_.rs +64 -0
- calc_rs_lang-0.2.0/tests/fixtures/prices.xlsx +0 -0
- calc_rs_lang-0.2.0/uv.lock +1303 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Runs on every published GitHub Release, or manually via the Actions
|
|
4
|
+
# tab (workflow_dispatch) for a dry run — a manual run builds and
|
|
5
|
+
# uploads artifacts but the publish job's `environment: pypi` gate
|
|
6
|
+
# means it still won't push to PyPI without that environment approving
|
|
7
|
+
# it, so it's safe to trigger to sanity-check the build matrix.
|
|
8
|
+
on:
|
|
9
|
+
release:
|
|
10
|
+
types: [published]
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
linux:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
strategy:
|
|
20
|
+
matrix:
|
|
21
|
+
target: [x86_64, aarch64]
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
- uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: "3.13"
|
|
27
|
+
- name: Build calc-rs-lang wheels
|
|
28
|
+
uses: PyO3/maturin-action@v1
|
|
29
|
+
with:
|
|
30
|
+
target: ${{ matrix.target }}
|
|
31
|
+
args: --release --out dist
|
|
32
|
+
manylinux: auto
|
|
33
|
+
- uses: actions/upload-artifact@v4
|
|
34
|
+
with:
|
|
35
|
+
name: wheels-linux-${{ matrix.target }}
|
|
36
|
+
path: dist
|
|
37
|
+
- name: Build calc-rust wheel
|
|
38
|
+
uses: PyO3/maturin-action@v1
|
|
39
|
+
with:
|
|
40
|
+
target: ${{ matrix.target }}
|
|
41
|
+
args: --release --out dist
|
|
42
|
+
manylinux: auto
|
|
43
|
+
working-directory: cli-wheel
|
|
44
|
+
- uses: actions/upload-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: wheels-cli-linux-${{ matrix.target }}
|
|
47
|
+
path: cli-wheel/dist
|
|
48
|
+
|
|
49
|
+
windows:
|
|
50
|
+
runs-on: windows-latest
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v4
|
|
53
|
+
- uses: actions/setup-python@v5
|
|
54
|
+
with:
|
|
55
|
+
python-version: "3.13"
|
|
56
|
+
- name: Build calc-rs-lang wheels
|
|
57
|
+
uses: PyO3/maturin-action@v1
|
|
58
|
+
with:
|
|
59
|
+
args: --release --out dist
|
|
60
|
+
- uses: actions/upload-artifact@v4
|
|
61
|
+
with:
|
|
62
|
+
name: wheels-windows
|
|
63
|
+
path: dist
|
|
64
|
+
- name: Build calc-rust wheel
|
|
65
|
+
uses: PyO3/maturin-action@v1
|
|
66
|
+
with:
|
|
67
|
+
args: --release --out dist
|
|
68
|
+
working-directory: cli-wheel
|
|
69
|
+
- uses: actions/upload-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: wheels-cli-windows
|
|
72
|
+
path: cli-wheel/dist
|
|
73
|
+
|
|
74
|
+
macos:
|
|
75
|
+
runs-on: macos-latest
|
|
76
|
+
strategy:
|
|
77
|
+
matrix:
|
|
78
|
+
target: [x86_64, aarch64]
|
|
79
|
+
steps:
|
|
80
|
+
- uses: actions/checkout@v4
|
|
81
|
+
- uses: actions/setup-python@v5
|
|
82
|
+
with:
|
|
83
|
+
python-version: "3.13"
|
|
84
|
+
- name: Build calc-rs-lang wheels
|
|
85
|
+
uses: PyO3/maturin-action@v1
|
|
86
|
+
with:
|
|
87
|
+
target: ${{ matrix.target }}
|
|
88
|
+
args: --release --out dist
|
|
89
|
+
- uses: actions/upload-artifact@v4
|
|
90
|
+
with:
|
|
91
|
+
name: wheels-macos-${{ matrix.target }}
|
|
92
|
+
path: dist
|
|
93
|
+
- name: Build calc-rust wheel
|
|
94
|
+
uses: PyO3/maturin-action@v1
|
|
95
|
+
with:
|
|
96
|
+
target: ${{ matrix.target }}
|
|
97
|
+
args: --release --out dist
|
|
98
|
+
working-directory: cli-wheel
|
|
99
|
+
- uses: actions/upload-artifact@v4
|
|
100
|
+
with:
|
|
101
|
+
name: wheels-cli-macos-${{ matrix.target }}
|
|
102
|
+
path: cli-wheel/dist
|
|
103
|
+
|
|
104
|
+
sdist:
|
|
105
|
+
runs-on: ubuntu-latest
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@v4
|
|
108
|
+
- name: Build sdist
|
|
109
|
+
uses: PyO3/maturin-action@v1
|
|
110
|
+
with:
|
|
111
|
+
command: sdist
|
|
112
|
+
args: --out dist
|
|
113
|
+
- uses: actions/upload-artifact@v4
|
|
114
|
+
with:
|
|
115
|
+
name: wheels-sdist
|
|
116
|
+
path: dist
|
|
117
|
+
|
|
118
|
+
publish:
|
|
119
|
+
name: Publish to PyPI
|
|
120
|
+
runs-on: ubuntu-latest
|
|
121
|
+
needs: [linux, windows, macos, sdist]
|
|
122
|
+
# This one run publishes BOTH distributions — `calc-rs-lang` (the
|
|
123
|
+
# extension module) and `calc-rust` (the binary). Each needs its
|
|
124
|
+
# own trusted publisher registered on PyPI for this repo +
|
|
125
|
+
# publish.yml + the `pypi` environment (see docs/PUBLISHING.md).
|
|
126
|
+
#
|
|
127
|
+
# Configure this environment in the repo's Settings > Environments,
|
|
128
|
+
# then register it as the trusted publisher's environment name on
|
|
129
|
+
# PyPI. Requiring an environment lets you add a manual-approval rule
|
|
130
|
+
# so nothing ships without a human clicking "approve", even though
|
|
131
|
+
# the token-free auth below makes publishing otherwise automatic.
|
|
132
|
+
environment: pypi
|
|
133
|
+
permissions:
|
|
134
|
+
id-token: write # required for PyPI trusted publishing — no API token needed
|
|
135
|
+
steps:
|
|
136
|
+
- uses: actions/download-artifact@v4
|
|
137
|
+
with:
|
|
138
|
+
pattern: wheels-*
|
|
139
|
+
path: dist
|
|
140
|
+
merge-multiple: true
|
|
141
|
+
- name: Publish to PyPI
|
|
142
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
143
|
+
with:
|
|
144
|
+
packages-dir: dist
|