Skip to content

Commit

Permalink
Merge pull request #14 from russellb/namespace-package
Browse files Browse the repository at this point in the history
Rename package to `instructlab.sdg` from `instructlab_sdg`
  • Loading branch information
russellb authored Jun 10, 2024
2 parents 0dc4872 + 299381b commit 9867dd8
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Auto generated
src/instructlab_sdg/_version.py
src/instructlab/sdg/_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ source = "https://github.com/instructlab/sdg"
issues = "https://github.com/instructlab/sdg/issues"

[tool.setuptools_scm]
version_file = "src/instructlab_sdg/_version.py"
version_file = "src/instructlab/sdg/_version.py"
# do not include +gREV local version, required for Test PyPI upload
local_scheme = "no-local-version"

Expand All @@ -50,7 +50,7 @@ dependencies = {file = ["requirements.txt"]}

[tool.setuptools.packages.find]
where = ["src"]
include = ["sdg"]
include = ["instructlab.sdg"]

[tool.setuptools.package-data]
"instructlab.schema.v1" = ["*.json"]
Expand Down Expand Up @@ -107,8 +107,8 @@ known-local-folder = ["tuning"]
[tool.mypy]
disable_error_code = ["import-not-found", "import-untyped"]
exclude = [
"^src/instructlab_sdg/generate_data\\.py$",
"^src/instructlab_sdg/utils\\.py$",
"^src/instructlab/sdg/generate_data\\.py$",
"^src/instructlab/sdg/utils\\.py$",
]
# honor excludes by not following there through imports
follow_imports = "silent"
1 change: 1 addition & 0 deletions src/instructlab/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
File renamed without changes.
3 changes: 3 additions & 0 deletions src/instructlab/sdg/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# First party
# First Party
from instructlab.sdg.generate_data import generate_data
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import time

# Third Party
# instructlab - All of these need to go away - issue #6
# instructlab - All of these need to go away (other than sdg) - issue #6
from instructlab.config import get_model_family
from instructlab.utils import (
chunk_document,
Expand All @@ -28,7 +28,8 @@
import tqdm

# First Party
from instructlab_sdg import utils
# pylint: disable=ungrouped-imports
from instructlab.sdg import utils

DEFAULT_PROMPT_TEMPLATE_MERLINITE = """\
You are asked to come up with a set of 5 diverse task instructions under {{taxonomy}}{{" for the task \\"%s\\""|format(task_description) if task_description}}. These task instructions will be given to a GPT model and we will evaluate the GPT model for completing the instructions.
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions src/instructlab_sdg/__init__.py

This file was deleted.

4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ skip_install = true
skipsdist = true
deps = -r requirements-dev.txt
commands =
{envpython} -m pylint --load-plugins pylint_pydantic src/instructlab_sdg/
{envpython} -m pylint --load-plugins pylint_pydantic src/instructlab/sdg/

[testenv:fastlint]
description = fast lint with pylint (without 3rd party modules)
Expand All @@ -24,7 +24,7 @@ deps =
pylint
pylint-pydantic
commands =
{envpython} -m pylint --load-plugins pylint_pydantic {posargs:--disable=import-error src/instructlab_sdg/}
{envpython} -m pylint --load-plugins pylint_pydantic {posargs:--disable=import-error src/instructlab/sdg/}

[testenv:ruff]
description = reformat and fix code with Ruff (and isort)
Expand Down

0 comments on commit 9867dd8

Please sign in to comment.