Skip to content

ldh-AddFile imports GET; release 2.0.5 - #75

Merged
namedgraph merged 2 commits into
mainfrom
fix/add-file-get-import
Dec 2, 2026
Merged

namedgraph merged 2 commits into
mainfrom
fix/add-file-get-import

Conversation

@namedgraph

Copy link
Copy Markdown
Member

Why

ldh-AddFile uploads the file, then reads the document back to find the file's URI (Appendix A, foaf:sha1). It got that GET operation by name from the operation registry:

document = Operation.get("GET")(settings=self.settings, context=self.context).execute(url)

Only Web-Algebra's own CLI (main.py) and server (server.py) fill the registry. A program that imports the operation, such as LinkedDataHub-Bots uploading an ArXiv paper's figures, has an empty one. The upload succeeded and the operation then failed:

TypeError: 'NoneType' object is not callable

The suite's conftest.py registers every operation for each session, so no test saw it.

What

  • add_file.py imports GET and calls it directly, as ldh-AddXHTMLBlock already does. No other operation looks one up by name.
  • A Release 2.0.5 commit: CHANGELOG.md (a Fixed entry), pyproject.toml, server.json and uv.lock.

Tests

  • TestLDHAddFileAsLibrary::test_runs_with_an_empty_registry empties the registry, uploads through the HTTP stub, and checks the returned file URI. It fails on main and passes here.
  • The full suite passes locally: 1122 passed, 7 skipped.
  • Checked end to end: LinkedDataHub-Bots uploaded a paper's 10 figures into a LinkedDataHub 6.6 dev instance.

After merge

Push the v2.0.5 tag. release.yml then publishes to PyPI, creates the GitHub release, and lists the version in the MCP Registry.

🤖 Generated with Claude Code

namedgraph and others added 2 commits December 2, 2026 11:30
…istry

The registry is filled only by Web-Algebra's own CLI and server, so ldh-AddFile
called from Python failed after the upload with "'NoneType' object is not
callable", reading the document back for the file's URI. ldh-AddXHTMLBlock
already imports GET. The suite's conftest registers every operation, which is
why no test caught it: the new one empties the registry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@namedgraph
namedgraph merged commit e392f84 into main Dec 2, 2026
12 checks passed
@namedgraph
namedgraph deleted the fix/add-file-get-import branch December 2, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant