From 0ace2597a33470dc1eb4d1c22459dfd96655b375 Mon Sep 17 00:00:00 2001 From: Tiara Rodney Date: Tue, 16 Jun 2026 20:13:48 +0200 Subject: [PATCH 1/4] feat: scaffold installable namespace package --- pyproject.toml | 77 +++++++++++++++++++++++++++++++ src/tiararodney/sekft/__init__.py | 5 ++ 2 files changed, 82 insertions(+) create mode 100644 pyproject.toml create mode 100644 src/tiararodney/sekft/__init__.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..c99f76a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,77 @@ +[build-system] +requires = [ + "setuptools", + "wheel", + "setuptools-scm[toml]" +] +build-backend = "setuptools.build_meta" + +[project] +name = "tiararodney.sekft" +description = "Fine-tune small open models to operate a POSIX shell (sek)" +authors = [ + { name = "Tiara Rodney", email = "tiara.rodney@byteb4rb1e.me" } +] +readme = "README.md" +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Natural Language :: English", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: System :: Shells", + "Typing :: Typed", +] +dependencies = [ + "tiararodney.posix-sdc", +] +dynamic = ["version"] +requires-python = ">=3.9" + +[project.optional-dependencies] +gpu = [ + "torch", + "transformers", + "peft", + "datasets", + "accelerate", + "bitsandbytes", + "tensorboard", +] + +[project.scripts] +sekft-train = "tiararodney.sekft.sft:main" +sekft-eval = "tiararodney.sekft.eval:main" +sekft-resident = "tiararodney.sekft.resident:main" + +[project.urls] +Git = "https://git.code.tiararodney.com/tiararodney/sekft" + +[tool.setuptools.packages.find] +where = ["src"] +namespaces = true + +[tool.pytest.ini_options] +pythonpath = ["src", "../posix-sdc/src"] +testpaths = ["tests"] +markers = [ + "pytest: integration tests runnable without external services", + "gpu: requires torch and a GPU", + "docker: requires Docker and the sekft-dash image", +] + +[tool.mypy] +strict = true + +[tool.autopep8] +max_line_length = 80 +aggressive = 3 +recursive = true + +[tool.setuptools_scm] diff --git a/src/tiararodney/sekft/__init__.py b/src/tiararodney/sekft/__init__.py new file mode 100644 index 0000000..0cb60f3 --- /dev/null +++ b/src/tiararodney/sekft/__init__.py @@ -0,0 +1,5 @@ +"""sekft: fine-tune small open models to operate a POSIX shell (sek). + +Consumes the posix-sdc dataset; the trainer, behavioural evaluator, and the +resident-base harness live here. +""" From d468870d64f46a2c0db2575660d97dda99a842f6 Mon Sep 17 00:00:00 2001 From: Tiara Rodney Date: Tue, 16 Jun 2026 20:13:49 +0200 Subject: [PATCH 2/4] chore: pin posix-sdc as a local editable dependency --- Pipfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Pipfile diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..08edb5c --- /dev/null +++ b/Pipfile @@ -0,0 +1,32 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +"tiararodney.sekft" = {file = ".", editable = true} +# Local editable override of the posix-sdc dependency declared (abstractly) in +# pyproject.toml, so the dataset/factory is developed side by side. +"tiararodney.posix-sdc" = {path = "../posix-sdc", editable = true} + +[dev-packages] +tox = "*" +pytest = "*" +build = "*" +twine = "*" +setuptools-scm = "~=8.2.0" +pypi-attestations = "*" +autopep8 = "*" + +[requires] +python_version = "3" + +[scripts] +"dist" = "python3 -m build" +"dist:attestations" = "python3 -m pypi_attestations sign dist/*" +"dist:publish:tiararodney" = "python3 -m twine upload --sign --repository tiararodney dist/*" +"test" = "tox" +"test:static" = "tox run -m static" +"test:unit" = "tox run -m unit" +"test:integration" = "tox run -m integration" +"test:smoke" = "tox run -m smoke" From b00aefaf780b0a0e3b8e59c8abb57d9c2762c434 Mon Sep 17 00:00:00 2001 From: Tiara Rodney Date: Tue, 16 Jun 2026 20:13:49 +0200 Subject: [PATCH 3/4] chore: add tox lint, format and test environments --- tox.ini | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..917e98a --- /dev/null +++ b/tox.ini @@ -0,0 +1,47 @@ +[tox] +requires = + tox>=4.19 +env_list = + unit-py3{9-13} + smoke-py3{9-13} + lint + format + +[testenv] +deps = + ../posix-sdc + . + +[testenv:lint] +description = run type check on code base +labels = static +deps = + mypy +commands = + mypy src tests --junit-xml test-reports/{env_name}.xml + +[testenv:format] +description = check formatting +labels = static +deps = + autopep8 +commands = + autopep8 --diff --exit-code src tests + +[testenv:unit-py3{9-13}] +description = run unit tests +labels = unit +deps = + {[testenv]deps} + pytest +commands = + pytest tests/unit --junitxml=test-reports/{env_name}.xml + +[testenv:smoke-py3{9-13}] +description = run smoke tests against the console entry points +labels = smoke +deps = + {[testenv]deps} + pytest +commands = + pytest tests/smoke --junitxml=test-reports/{env_name}.xml From 046683a3717cf7ab8a70a915dc59f6a12a1f2f76 Mon Sep 17 00:00:00 2001 From: Tiara Rodney Date: Tue, 16 Jun 2026 20:13:51 +0200 Subject: [PATCH 4/4] todo(1): done Namespace package builds; gpu extra isolates torch/transformers/peft/datasets; posix-sdc declared in pyproject and overridden editable in Pipfile; console scripts wired; tox envs defined. --- TODO | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO b/TODO index 037458f..b9e1ed8 100644 --- a/TODO +++ b/TODO @@ -21,7 +21,7 @@ Content-Type: application/issue ID: 1 Type: feature Title: Package sekft as an installable namespace package -Status: in-progress +Status: done Priority: medium Created: 2026-06-16 Module: sekft