Commit 1629227
Typing and XML removal (#414)
* Runner: dataclass => pydantic BaseModel
* guard: Add overload typedefs for __call__ and parse
* Correctly type guard.py and references
* run: Fully typed
* guard: Fix parse type overload
* cli: one typehint fix
* guard: Raise RuntimeError if num_reasks is None after calling configure
* run: Reconsolidate rebased parse call
* run: Add type expecting reasks
* Remove <pydantic> plumbing
* rail: Type
* guard: Propagate typehints
* base_prompt: Correctly return None on no match
* Type schema, validators, datatypes
* format
* rail: Default input schema to None
* Allow metadata to be None instead of default dict
* Add coro checks to SaliencyCheck validator
* Refactor MockValidator to create_mock_validator
This now creates a type dynamically instead of just an instance
* datatypes: Import Self from typing_extensions instead of typing (python3.11+)
* Add typing-extensions dependency
This is already included by some other dependency, but we should also explicitly require it
* Remove PydanticReask (old pydantic plumbing)
* Fix mocked openai embeddings response
* analytics
* embedding: Typing
* document_store: Typing
* vectordb: Typing
* docs_utils: Typing
* json_utils: Typing
* logs_utils: Typing
* reask_utils: Typing
* pydantic_utils: Typing
* format
* sql_utils: Typing
* parsing_utils: Typing
* utils/misc: Typing
* pydantic_utils: Fixup
* add missing imports back in
* fix tests
* lint fixes
* ignore tests when calculating coverage
* match js pattern to mkdocs docs
* add GA
* directly add postgot and pipedrive keys
* GA stream directly in yml
* Update canonical uri
* Formatter.parse -> Template.get_identifiers
* polyfill get_identifiers for older python versions
* test_get_template_variables
* autoformat
* swap spy
* simplify test
* correct minimum version
* remove unused impot
* use safe_substitute to guard against monetary format i.e. $5
* ignore pyenv version
* test prompt.escape
* lint fix
* ignore lint error on line
* schema.FormatAttr: Remove internal XML dependence
* datatypes: Store optional as param in datatype
* text2sql: Typing
* Makefile: Add type target
* guard: Type return as Any
* llm_providers: Typing
* JsonSchema.parse: Small typing
* validators.provenancev0: Rewrite to satisfy typing
* ci: Add pyright job
* setup: Add pyright to dev dependencies
* Ignore handled missing imports
* pydantic_utils: Return instead of pass (bug?)
* setup: Require dev dependency lxml-stubs (for typing)
* validators.ProvenanceV1: Rewrite for typing
* Fix xml attr string casts
* json_utils: Take datatype dict instead of xml element
* datatypes: Abstract out name and description
* datatypes: Verify metadata over datatype
* Split validators into separate package
* schema/reask_utils: Migrate from internal XML dependence
* tests: Fix
* Rewrite pruned tree test
* format
* Refactor removeprefix for python 3.8
* Abstract out xml element string cast
* add a few UTs
* test_async: Test StringSchema.async_validate
* test_xml_utils: Add test for test_xml_element_cast
* test manifest
* schema: Remove unused func
* add pydantic chat integration test
* test_llm_providers: Add openai chat tests with basemodel
* Fix some type errors
* datatypes: set_children => set_children_from_xml
* datatypes: Remove iter methods
* datatypes: Remove xml element property
* schema: Simplify from_xml construction
* test_reask_utils: Amend test with correct validator example
* lint
* circ references, semi-passing tests
* correct string default typing
* date_format fix
* run.call: correctly pass output as llm_response
* guard.parse: Pop kwargs off api initialization (as it used to do)
* mock_llm_outputs: Add tomato cheese pizza example
* test_run: formatting
* fix regex validator
* fix validator test type sussing
* lint
* unused import removed
* typing 50% fixed
* text completion
* ignore pyright warning on np
* lint
* fix numpy typing issue
* Check for match type on init
* merge latest from public main
* ignore tpying on optional packages
* fix import path and typing on detect_secrets package
---------
Co-authored-by: Rafael Irgolic <[email protected]>
Co-authored-by: rafael <[email protected]>
Co-authored-by: Caleb Courier <[email protected]>1 parent eded75d commit 1629227
File tree
66 files changed
+2440
-1711
lines changed- .github/workflows
- docs/javascripts
- guardrails
- applications
- prompt
- utils
- vectordb
- tests
- integration_tests
- applications
- test_assets/pydantic
- unit_tests
- mocks
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
66 files changed
+2440
-1711
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
45 | 72 | | |
46 | 73 | | |
47 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | | - | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | | - | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | | - | |
148 | | - | |
149 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
| |||
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | | - | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
179 | 180 | | |
180 | 181 | | |
181 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
182 | 189 | | |
183 | 190 | | |
184 | 191 | | |
| |||
188 | 195 | | |
189 | 196 | | |
190 | 197 | | |
191 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
192 | 203 | | |
193 | 204 | | |
194 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
0 commit comments