Skip to content

Commit 0d5aa3a

Browse files
committed
update to properly include templates in package
1 parent 9d5d620 commit 0d5aa3a

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,12 @@ build-backend = "setuptools.build_meta"
4444

4545
[tool.setuptools.packages.find]
4646
where = ["."] # list of folders that contain the packages (["."] by default)
47-
include = ["merle"] # package names should match these glob patterns (["*"] by default)
47+
include = ["merle", "merle.templates"] # package names should match these glob patterns (["*"] by default)
4848
exclude = [] # exclude packages matching these glob patterns (empty by default)
4949

50+
[tool.setuptools.package-data]
51+
merle = ["templates/*.template", "templates/*.py"]
52+
5053
# Task runner
5154
[tool.poe.tasks]
5255
check = "uv run ruff check"

tests/test_functions.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ def test_normalize_simple_name(self):
5050
result = normalize_model_name("llama2")
5151
assert result == "llama2"
5252

53+
def test_normalize_huggingface_model_with_periods(self):
54+
"""Test normalization of HuggingFace model names with periods in hf.co prefix."""
55+
result = normalize_model_name("hf.co/mmnga/cyberagent_deepseek_r1_distill_qwen_14b_japa")
56+
assert result == "hf_co_mmnga_cyberagent_deepseek_r1_distill_qwen_14b_japa"
57+
58+
def test_normalize_model_with_multiple_periods(self):
59+
"""Test that multiple periods are normalized correctly."""
60+
result = normalize_model_name("model.name.with.dots")
61+
assert result == "model_name_with_dots"
62+
5363

5464
class TestMaskToken:
5565
"""Tests for mask_token function."""

0 commit comments

Comments
 (0)