Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'datasets>=2.19.0',
'accelerate>=0.20.1',
'sentence_transformers',
'peft',
'peft>=0.11.0,<0.18.0',
'ir-datasets',
'sentencepiece',
'protobuf'
Expand Down
Empty file added tests/__init__.py
Empty file.
21 changes: 21 additions & 0 deletions tests/test_dependencies.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""Test dependency version constraints."""

import ast
import os


def test_peft_version_constraint():
"""Test that peft has proper version constraint in setup.py."""
setup_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "setup.py")

with open(setup_path, "r") as f:
content = f.read()

# Check that peft has version constraints
assert "peft>=" in content, "peft should have a minimum version constraint"
assert "peft" in content and "<0.18" in content, "peft should have an upper bound < 0.18"


if __name__ == "__main__":
test_peft_version_constraint()
print("Dependency version constraint test passed!")