mirror of
https://github.com/dataforcanada/d4c-service-geo-assistant.git
synced 2026-06-17 08:21:02 +02:00
Enable pydocstyle (D) ruff rule and add more docs (#21)
* Use pydocstyle (D) rule with google convention Add a ruff rule to catch missing documentation. Using google convention so that undocumented-param (D417) rule is enabled to catch missing params, xref https://docs.astral.sh/ruff/rules/undocumented-param. Extended to include D213 (instead of D212) and D410 rules too. * Fix D100 Missing docstring in public module * Fix D101 Missing docstring in public class * Fix D103 Missing docstring in public function Also ignore rule D205 to allow first sentence of docstring to wrap to multiple lines. * Fix D417 Missing argument description in the docstring * Update indent in pyproject.toml file
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
"""Tests for Overture tool."""
|
||||
|
||||
import os
|
||||
|
||||
import geopandas as gpd
|
||||
@@ -57,6 +59,7 @@ def geo_assistant_with_buffer_fixture():
|
||||
|
||||
|
||||
async def test_get_place():
|
||||
"""Ensure that `get_place` tool returns an Overture place given a place_name."""
|
||||
command = await get_place.ainvoke(
|
||||
ToolCall(
|
||||
name="get_place",
|
||||
@@ -69,6 +72,10 @@ async def test_get_place():
|
||||
|
||||
|
||||
async def test_get_places_within_buffer(geo_assistant_with_buffer_fixture):
|
||||
"""
|
||||
Ensure that `get_places_within_buffer` tool returns multiple Overture places that
|
||||
fit match the category 'cafe' within a specific buffer area around a location.
|
||||
"""
|
||||
command = await get_places_within_buffer.ainvoke(
|
||||
ToolCall(
|
||||
name="get_places_within_buffer",
|
||||
|
||||
Reference in New Issue
Block a user