Update arcade new template to pass linting (#201)
This commit is contained in:
parent
8795871d51
commit
5022d339a2
14 changed files with 14 additions and 7 deletions
|
|
@ -12,3 +12,4 @@ max_line_length = 100 # This is also set in .ruff.toml for ruff
|
|||
[*.{json,jsonc,yml,yaml}]
|
||||
indent_style = space
|
||||
indent_size = 2 # This is also set in .prettierrc.toml
|
||||
|
||||
|
|
|
|||
|
|
@ -164,3 +164,4 @@ cython_debug/
|
|||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
|
|
|
|||
|
|
@ -16,3 +16,4 @@ repos:
|
|||
- id: ruff
|
||||
args: [--fix]
|
||||
- id: ruff-format
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
# Ignore Python files for Prettier
|
||||
*.py
|
||||
|
||||
|
|
|
|||
|
|
@ -13,3 +13,4 @@ files = [ "*.json", "*.jsonc", "*.yml", "*.yaml" ]
|
|||
|
||||
[overrides.options]
|
||||
tabWidth = 2
|
||||
|
||||
|
|
|
|||
|
|
@ -42,3 +42,4 @@ select = [
|
|||
[format]
|
||||
preview = true
|
||||
skip-magic-trailing-comma = false
|
||||
|
||||
|
|
|
|||
|
|
@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
|
|
|||
|
|
@ -51,3 +51,4 @@ check: ## Run code quality tools.
|
|||
@poetry run pre-commit run -a
|
||||
@echo "🚀 Static type checking: Running mypy"
|
||||
@poetry run mypy --config-file=pyproject.toml
|
||||
|
||||
|
|
|
|||
|
|
@ -71,3 +71,4 @@
|
|||
```bash
|
||||
arcade evals --host localhost --details
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -7,3 +7,4 @@ coverage:
|
|||
default:
|
||||
target: 90%
|
||||
threshold: 0.5%
|
||||
|
||||
|
|
|
|||
|
|
@ -36,12 +36,7 @@ def {{ toolkit_name }}_eval_suite() -> EvalSuite:
|
|||
suite.add_case(
|
||||
name="Saying hello",
|
||||
user_message="He's actually right here, say hi to him!",
|
||||
expected_tool_calls=[
|
||||
ExpectedToolCall(
|
||||
func=say_hello,
|
||||
args={"name": "John Doe"}
|
||||
)
|
||||
],
|
||||
expected_tool_calls=[ExpectedToolCall(func=say_hello, args={"name": "John Doe"})],
|
||||
rubric=rubric,
|
||||
critics=[
|
||||
SimilarityCritic(critic_field="name", weight=0.5),
|
||||
|
|
|
|||
|
|
@ -37,3 +37,4 @@ testpaths = ["tests"]
|
|||
|
||||
[tool.coverage.report]
|
||||
skip_empty = true
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ from {{ package_name }}.tools.hello import say_hello
|
|||
def test_hello() -> None:
|
||||
assert say_hello("developer") == "Hello, developer!"
|
||||
|
||||
|
||||
def test_hello_raises_error() -> None:
|
||||
with pytest.raises(ToolExecutionError):
|
||||
say_hello(1)
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@ allowlist_externals = poetry
|
|||
commands =
|
||||
poetry install -v --all-extras
|
||||
pytest --doctest-modules tests --cov --cov-config=pyproject.toml --cov-report=xml
|
||||
# mypy
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue