[project] name = "iscc-sct" version = "0.2.2" description = "ISCC - Semantic Code Text" authors = [{ name = "Titusz", email = "tp@piscc.io" }] requires-python = ">=3.11" readme = "README.md" license = "Apache-2.0" license-files = ["LICENSE"] keywords = [ "iscc", "text similarity", "cross lingual", "semantic similarity", ] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Topic :: Text Processing", "Topic :: Text Processing :: General", "Topic :: Text Processing :: Indexing", "Topic :: Text Processing :: Linguistic", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Multimedia :: Graphics", "Topic :: Scientific/Engineering :: Image Recognition", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Libraries", "Topic :: System :: Archiving", "Topic :: System :: Clustering", "Topic :: System :: Distributed Computing", ] dependencies = [ # >=0.32.0 ships the upstream "avoid sizing whole distant split sections" fix and releases # the GIL during native chunking. It mitigates - but does not eliminate - the issue #24 # super-linear cost on separator-free spans, so the chunking guard below is retained. "semantic-text-splitter>=0.32.0", "loguru", "blake3", "platformdirs", "tokenizers", "pydantic-settings", "charset-normalizer", "numpy", "pybase64", "certifi", "pyyaml", "pydantic", ] # The onnxruntime variant wheels unpack into the same site-packages directory and clobber each # other, so exactly one of the cpu/gpu extras must be installed (see issue #23). [project.optional-dependencies] cpu = ["onnxruntime"] gpu = ["onnxruntime-gpu"] demo = ["gradio"] [project.urls] Homepage = "https://iscc.codes" Repository = "https://github.com/iscc/iscc-sct" Documentation = "https://github.com/iscc/iscc-sct" Changelog = "https://github.com/iscc/iscc-sct/blob/main/CHANGELOG.md" "Bug Tracker" = "https://github.com/iscc/iscc-sct/issues" Twitter = "https://twitter.com/iscc_foundation" Donate = "https://iscc.foundation/support" [project.scripts] iscc-sct = "iscc_sct.cli:main" [dependency-groups] test = [ "pytest", "coverage", "pytest-cov", "onnxruntime", # dev/test environments use CPU inference ] dev = [ "poethepoet", "ruff", "mdformat-mkdocs[recommended]", "mdformat-gfm-alerts", "prek>=0.4.4", "zensical>=0.0.21", "mkdocstrings-python>=1.16.0", ] [tool.uv] default-groups = "all" conflicts = [ [{ extra = "cpu" }, { extra = "gpu" }], [{ group = "test" }, { extra = "gpu" }], ] # The HF Space installs requirements.txt alongside gradio[oauth,mcp], whose mcp extra pins # pydantic<=2.12.5 — keep the locked pydantic co-installable with the Space runtime. constraint-dependencies = ["pydantic<=2.12.5"] [tool.uv.build-backend] module-root = "" [build-system] requires = ["uv_build>=0.11.20,<0.12.0"] build-backend = "uv_build" [tool.ruff] line-length = 100 [tool.ruff.lint] # F401: imports referenced only in PEP 484 type comments are invisible to ruff ignore = ["F401"] [tool.ruff.lint.per-file-ignores] # F403: star imports intentionally re-export the public API "iscc_sct/__init__.py" = ["F403"] [tool.ruff.format] line-ending = "lf" [tool.coverage.run] omit = ["iscc_sct/dev.py", "tests/", "iscc_sct/demo.py"] patch = ["subprocess"] [tool.poe.tasks] format-code = { cmd = "ruff format", help = "Code style formating with ruff" } format-markdown = { cmd = "mdformat --wrap 100 --end-of-line lf --exclude docs/reference/api.md README.md CHANGELOG.md docs", help = "Markdown formating with mdformat" } format-yml = { script = "iscc_sct.dev:format_yml", help = "Format YML files"} convert-lf = { script = "iscc_sct.dev:convert_lf", help = "Convert line endings to LF"} # Erase any stale .coverage.* parallel data files left by an aborted run before measuring, so the # 100% gate never inherits orphaned subprocess data (patch=["subprocess"]) and report a spurious # <100% (issue: leftover .coverage.GOLEM.pid* files + failing coverage gate). test.sequence = [ { cmd = "coverage erase" }, { cmd = "pytest --cov=iscc_sct --cov-fail-under=100" }, ] test.help = "Run tests with coverage" docs-serve = { cmd = "zensical serve", help = "Serve the documentation site locally" } docs-build.sequence = [ { cmd = "zensical build" }, { cmd = "python scripts/gen_llms_full.py" }, ] docs-build.help = "Build the docs site and generate llms-full.txt" precommit = { cmd = "uv run prek run", help = "Run prek hooks on changed files" } export-requirements = { cmd = "uv export --no-default-groups --extra cpu --no-emit-project --no-hashes --no-annotate --no-header --output-file requirements.txt", help = "Export requirements.txt from uv.lock for HF Space" } update-dependencies = { cmd = "uv sync --upgrade --extra demo", help = "Update dependencies" } all = ["format-code", "format-markdown", "format-yml", "convert-lf", "export-requirements", "test"] update = ["update-dependencies", "all"]