mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
fix: resolve CI failures
- Format feature_extractor.py to pass ruff format check - Skip uvicorn tests when uvicorn not installed in CI environment - Exclude experiments/ from pre-commit ruff checks
This commit is contained in:
parent
d57673d745
commit
a187d80d7c
3 changed files with 7 additions and 4 deletions
|
|
@ -4,4 +4,6 @@ repos:
|
|||
hooks:
|
||||
- id: ruff
|
||||
args: [--fix]
|
||||
exclude: ^experiments/
|
||||
- id: ruff-format
|
||||
exclude: ^experiments/
|
||||
|
|
|
|||
|
|
@ -1155,7 +1155,9 @@ class StructuralExtractor(BaseFeatureExtractor):
|
|||
delimiters = self.DELIMITER.findall(text)
|
||||
features.delimiter_types = list({d[0] for d in delimiters if d})
|
||||
features.has_structured_template = (
|
||||
features.xml_tag_count > 2 or bool(features.delimiter_types) or features.json_object_count > 0
|
||||
features.xml_tag_count > 2
|
||||
or bool(features.delimiter_types)
|
||||
or features.json_object_count > 0
|
||||
)
|
||||
|
||||
# Conversation structure
|
||||
|
|
|
|||
|
|
@ -224,8 +224,7 @@ class TestWorkerConfiguration:
|
|||
|
||||
def test_uvicorn_workers_parameter(self):
|
||||
"""Test that uvicorn accepts workers parameter."""
|
||||
# uvicorn.run accepts workers=N for multi-process
|
||||
import uvicorn
|
||||
uvicorn = pytest.importorskip("uvicorn")
|
||||
|
||||
# Verify the Config class accepts workers
|
||||
config = uvicorn.Config(
|
||||
|
|
@ -238,7 +237,7 @@ class TestWorkerConfiguration:
|
|||
|
||||
def test_single_worker_default(self):
|
||||
"""Test that default is single worker (None)."""
|
||||
import uvicorn
|
||||
uvicorn = pytest.importorskip("uvicorn")
|
||||
|
||||
config = uvicorn.Config(app="app:app")
|
||||
# Default should be None (single process)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue