Skip to content

Commit

Permalink
tests: Don't assume a version has skills and knowledge schemas
Browse files Browse the repository at this point in the history
v3 only needed an update to `knowledge.json`. The skills schema
remains unchanged, so it seems unnecessary to add a new copy of the
same thing. Fix the test to not assume both schemas are included in
every version bump. Skills should continue to specify v2.

Signed-off-by: Russell Bryant <[email protected]>
  • Loading branch information
russellb committed Jul 17, 2024
1 parent 2be6938 commit 892b60a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ def test_import_schema_base(self):
schema_version = schema_base.joinpath(f"v{i+1}")
for schema_name in ("compositional_skills", "knowledge", "version"):
path = schema_version.joinpath(f"{schema_name}.json")
if not path.exists():
continue
self._load_schema(path)

def test_import_schema_versions(self):
for i in range(len(schema_versions())):
schema_version = resources.files(f"instructlab.schema.v{i+1}")
for schema_name in ("compositional_skills", "knowledge", "version"):
path = schema_version.joinpath(f"{schema_name}.json")
if not path.exists():
continue
self._load_schema(path)

0 comments on commit 892b60a

Please sign in to comment.