Skip to content

v0.1.2 add file support for custom vocabulary

Choose a tag to compare

@github-actions github-actions released this 30 Jul 09:03
· 35 commits to dev since this release

[0.1.2] - 2026-07-30

Added

  • --file / -f CLI option on ste100-mcp (repeatable): pass one or more
    *.jsonl vocabulary files at startup. Paths are merged with those from
    STE100_MCP_FILES; duplicates are removed while preserving order.
  • Factory class in settings.py — thread-safe singleton for
    Settings using a double-checked lock. Class-level state removes the
    need for a module-level global variable.
    • Factory.create_instance(extra_files) — creates the singleton, merges
      CLI-supplied paths with env-supplied paths, asserts it is called only once.
    • Factory.get_instance() — returns the singleton, asserts
      create_instance was called first.
  • tests/settings/test_factory.py — 8 unit tests covering singleton
    creation, identity, deduplication, and both AssertionError guard paths.

Changed

  • cli.py calls Factory.create_instance(files or []) before mcp.run()
    so CLI-supplied paths are available to the server lifespan.
  • server.py _lifespan calls Factory.get_instance() instead of
    constructing a new Settings() on every startup.

Fixed

  • Removed bogus --file validation block in cli.py that called
    load_dotenv instead of exiting on error (Typer's exists=True already
    rejects non-existent paths).
  • Changed --file default from mutable [] to None to avoid the
    mutable-default-argument footgun.

Full Changelog: v0.1.1...v0.1.2