-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from bjhargrave/taxonomy-reading
Taxonomy reading API
- Loading branch information
Showing
25 changed files
with
1,205 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,6 @@ jobs: | |
strategy: | ||
matrix: | ||
python: | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Taxonomy Schema | ||
|
||
This Python package defines the JSON schema for the InstructLab [Taxonomy](https://github.com/instructlab/taxonomy) YAML. | ||
This Python package defines the JSON schema and a parser for the InstructLab [Taxonomy](https://github.com/instructlab/taxonomy) YAML. | ||
|
||
Consumers of this schema can `pip install instructlab-schema`, and access the schema files using `importlib.resources` on the `instructlab.schema` package. | ||
Consumers of this schema can `pip install instructlab-schema`, and use the `instructlab.schema.taxonomy.TaxonomyParser` class to parse and validate `qna.yaml` taxonomy files. | ||
Schema files can be directly accessed using the `instructlab.schema.schema_base()` method to get access the base of the schema resources. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
[build-system] | ||
requires = ["setuptools>=64", "setuptools_scm>=8"] | ||
requires = ["setuptools>=70.1.0", "setuptools_scm>=8"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
|
@@ -10,19 +10,26 @@ authors = [{ name = "InstructLab", email = "[email protected]" }] | |
description = "InstructLab Taxonomy Schema" | ||
readme = "README.md" | ||
license = { text = "Apache-2.0" } | ||
requires-python = ">=3.9" | ||
requires-python = ">=3.10" | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
dynamic = ["dependencies", "optional-dependencies", "version"] | ||
dependencies = [ | ||
"typing_extensions", | ||
"jsonschema>=4.22.0", | ||
"PyYAML>=6.0.0", | ||
# The below library should NOT be imported into any python files | ||
# We only use the command via subprocess | ||
"yamllint>=1.35.1", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
homepage = "https://instructlab.ai" | ||
|
@@ -34,13 +41,14 @@ version_file = "src/instructlab/schema/_version.py" | |
local_scheme = "no-local-version" # do not include +gREV local version, required for Test PyPI upload | ||
|
||
[tool.mypy] | ||
python_version = "3.9" | ||
python_version = "3.10" | ||
exclude = ["^src/instructlab/schema/_version\\.py$"] | ||
|
||
[tool.ruff] | ||
target-version = "py39" | ||
target-version = "py310" | ||
src = ["src", "tests"] | ||
extend-exclude = ["src/instructlab/schema/_version.py"] | ||
line-length = 180 | ||
|
||
[tool.ruff.lint] | ||
select = [ | ||
|
@@ -54,11 +62,23 @@ select = [ | |
"TID", # flake8-tidy-imports | ||
] | ||
|
||
[tool.ruff.lint.flake8-tidy-imports.banned-api] | ||
"yamllint".msg = "yamllint is for use as a command via subprocess." | ||
|
||
[tool.pylint.main] | ||
py-version = "3.9" | ||
py-version = "3.10" | ||
source-roots = ["src", "tests"] | ||
ignore = ["_version.py"] | ||
|
||
[tool.pylint.design] | ||
max-branches = 20 | ||
max-line-length = 180 | ||
max-locals = 20 | ||
min-public-methods = 1 | ||
|
||
[tool.pylint.format] | ||
max-args = 8 | ||
|
||
[tool.pylint."messages control"] | ||
disable = [ | ||
"missing-class-docstring", | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.