Merge branch 'feature/1'

This commit is contained in:
Tiara Rodney 2026-06-16 20:13:52 +02:00
commit 703cb863ec
Signed by: tiara
GPG key ID: 5CD8EC1D46106723
5 changed files with 162 additions and 1 deletions

32
Pipfile Normal file
View file

@ -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"

2
TODO
View file

@ -21,7 +21,7 @@ Content-Type: application/issue
ID: 1 ID: 1
Type: feature Type: feature
Title: Package sekft as an installable namespace package Title: Package sekft as an installable namespace package
Status: in-progress Status: done
Priority: medium Priority: medium
Created: 2026-06-16 Created: 2026-06-16
Module: sekft Module: sekft

77
pyproject.toml Normal file
View file

@ -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]

View file

@ -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.
"""

47
tox.ini Normal file
View file

@ -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