Update arcade new template to pass linting (#201)

This commit is contained in:
Eric Gustin 2025-01-14 08:32:38 -08:00 committed by GitHub
parent 8795871d51
commit 5022d339a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 14 additions and 7 deletions

View file

@ -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

View file

@ -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/

View file

@ -16,3 +16,4 @@ repos:
- id: ruff
args: [--fix]
- id: ruff-format

View file

@ -1,2 +1,3 @@
# Ignore Python files for Prettier
*.py

View file

@ -13,3 +13,4 @@ files = [ "*.json", "*.jsonc", "*.yml", "*.yaml" ]
[overrides.options]
tabWidth = 2

View file

@ -42,3 +42,4 @@ select = [
[format]
preview = true
skip-magic-trailing-comma = false

View file

@ -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.

View file

@ -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

View file

@ -71,3 +71,4 @@
```bash
arcade evals --host localhost --details
```

View file

@ -7,3 +7,4 @@ coverage:
default:
target: 90%
threshold: 0.5%

View file

@ -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),

View file

@ -37,3 +37,4 @@ testpaths = ["tests"]
[tool.coverage.report]
skip_empty = true

View file

@ -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)

View file

@ -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