avrae-ls 0.5.0__py3-none-any.whl → 0.6.0__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: avrae-ls
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: Language server for Avrae draconic aliases
5
5
  Author: 1drturtle
6
6
  License: MIT License
@@ -30,6 +30,7 @@ Requires-Dist: d20>=1.1.2
30
30
  Requires-Dist: httpx>=0.27
31
31
  Requires-Dist: lsprotocol>=2023.0.1
32
32
  Requires-Dist: pygls>=1.3.1
33
+ Requires-Dist: pyyaml>=6.0
33
34
  Provides-Extra: dev
34
35
  Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
35
36
  Requires-Dist: pytest-cov>=7.0.0; extra == 'dev'
@@ -66,18 +67,47 @@ Language Server Protocol (LSP) implementation targeting Avrae-style draconic ali
66
67
  - Tests only (with coverage): `make test` or `uv run pytest tests --cov=src`.
67
68
  - CLI smoke test without installing: `uv run python -m avrae_ls --analyze path/to/alias.txt`.
68
69
 
70
+ ## Alias tests
71
+
72
+ - Create files ending with `.alias-test` (or `.aliastest`) next to your alias file. Each test starts with an invocation, followed by `---` and the expected result; you can stack multiple tests in one file by repeating this pattern (optional metadata after a second `---` per test).
73
+ ```
74
+ !my-alias -b example args
75
+ ---
76
+ expected text or number
77
+ ```
78
+ - For embed aliases, put a YAML/JSON dictionary after the separator to compare against the embed preview (partial dictionaries are allowed).
79
+ ```
80
+ !embedtest
81
+ ---
82
+ title: Hello
83
+ description: World
84
+ ```
85
+ - Embed fields lists can be partial: only the listed fields (in order) are matched; extra fields in the alias do not fail the test.
86
+ - Use regex expectations by wrapping strings in `/.../` (or `re:...`). You can also mix literals with regex segments (e.g., `Hello /world.*/`) so only the delimited part is treated as regex.
87
+ - Optional second `---` section can carry metadata:
88
+ ```
89
+ name: critical-hit
90
+ vars:
91
+ cvars:
92
+ hp: 12
93
+ character:
94
+ name: Tester
95
+ ```
96
+ `name` is a label for reporting, `vars` are merged into cvars/uvars/svars/gvars, and `character` keys are deep-merged into the mock character.
97
+ - Run them with `avrae-ls --run-tests [path]` (defaults to the current directory); non-zero exit codes indicate failures.
98
+
69
99
  ## Runtime differences (mock vs. live Avrae)
70
100
 
71
101
  - Mock execution never writes back to Avrae: cvar/uvar/gvar mutations only live for the current run and reset before the next.
72
102
  - Network is limited to gvar fetches (when `enableGvarFetch` is true) and `verify_signature`; other Avrae/Discord calls are replaced with mocked context data from `.avraels.json`.
73
103
  - `get_gvar`/`using` values are pulled from local var files first; remote fetches go to `https://api.avrae.io/customizations/gvars/<id>` (or your `avraeService.baseUrl`) using `avraeService.token` and are cached for the session.
74
- - `signature()` returns a mock string (`mock-signature:<int>`). `verify_signature()` POSTs to `/bot/signature/verify`, respects `verifySignatureTimeout`/`verifySignatureRetries`, reuses the last successful response per signature, and includes `avraeService.token` if present.
104
+ - `signature()` returns a mock string (`mock-signature:<int>`). `verify_signature()` POSTs to `/bot/signature/verify`, reuses the last successful response per signature, and includes `avraeService.token` if present.
75
105
 
76
106
  ## Troubleshooting gvar fetch / verify_signature
77
107
 
78
108
  - `get_gvar` returns `None` or `using(...)` raises `ModuleNotFoundError`: ensure the workspace `.avraels.json` sets `enableGvarFetch: true`, includes a valid `avraeService.token`, or seed the gvar in a var file referenced by `varFiles`.
79
109
  - HTTP 401/403/404 from fetch/verify calls: check the token (401/403) and the gvar/signature id (404). Override `avraeService.baseUrl` if you mirror the API.
80
- - Slow or flaky calls: tune `verifySignatureTimeout` / `verifySignatureRetries`, or disable remote fetches by flipping `enableGvarFetch` off to rely purely on local vars.
110
+ - Slow or flaky calls: disable remote fetches by flipping `enableGvarFetch` off to rely purely on local vars.
81
111
 
82
112
  ## Other editors (stdio)
83
113
 
@@ -98,7 +128,7 @@ Language Server Protocol (LSP) implementation targeting Avrae-style draconic ali
98
128
  :major-modes '(fundamental-mode) ;; bind to your Avrae alias mode
99
129
  :server-id 'avrae-ls))
100
130
  ```
101
- - VS Code commands to mirror: `Avrae: Run Alias (Mock)`, `Avrae: Show Alias Preview`, and `Avrae: Reload Workspace Config` run against the same server binary.
131
+ - VS Code commands to mirror: `Avrae: Run Alias (Mock)`, `Avrae: Show Alias Preview`, `Avrae: Refresh GVARs`, and `Avrae: Reload Workspace Config` run against the same server binary.
102
132
 
103
133
  ## Releasing (maintainers)
104
134
 
@@ -0,0 +1,6 @@
1
+ draconic/LICENSE,sha256=Fzvu32_DafLKKn2mzxhEdlmrKZzAsigDZ87O7uoVqZI,1067
2
+ avrae_ls-0.6.0.dist-info/METADATA,sha256=1Jn3KTej0kkX_rEWL8wCi5wwNH_adV8wh5NYHJBPnAw,7163
3
+ avrae_ls-0.6.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
4
+ avrae_ls-0.6.0.dist-info/entry_points.txt,sha256=OtYXipMQzqmxpMoApgo0MeJYFmMbkbFN51Ibhpb8hF4,52
5
+ avrae_ls-0.6.0.dist-info/licenses/LICENSE,sha256=O-0zMbcEi6wXz1DiSdVgzMlQjJcNqNe5KDv08uYzqR0,1055
6
+ avrae_ls-0.6.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,6 +0,0 @@
1
- draconic/LICENSE,sha256=Fzvu32_DafLKKn2mzxhEdlmrKZzAsigDZ87O7uoVqZI,1067
2
- avrae_ls-0.5.0.dist-info/METADATA,sha256=Cl5rYWKuTLOoom3cjo4BV9ah4dMurBJ39nwJMsKBO4s,5916
3
- avrae_ls-0.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
4
- avrae_ls-0.5.0.dist-info/entry_points.txt,sha256=OtYXipMQzqmxpMoApgo0MeJYFmMbkbFN51Ibhpb8hF4,52
5
- avrae_ls-0.5.0.dist-info/licenses/LICENSE,sha256=O-0zMbcEi6wXz1DiSdVgzMlQjJcNqNe5KDv08uYzqR0,1055
6
- avrae_ls-0.5.0.dist-info/RECORD,,