Repository navigation
ldh-AddFile imports GET; release 2.0.5 - #75
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
ldh-AddFileuploads the file, then reads the document back to find the file's URI (Appendix A,foaf:sha1). It got thatGEToperation by name from the operation registry: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:The suite's
conftest.pyregisters every operation for each session, so no test saw it.What
add_file.pyimportsGETand calls it directly, asldh-AddXHTMLBlockalready does. No other operation looks one up by name.CHANGELOG.md(a Fixed entry),pyproject.toml,server.jsonanduv.lock.Tests
TestLDHAddFileAsLibrary::test_runs_with_an_empty_registryempties the registry, uploads through the HTTP stub, and checks the returned file URI. It fails onmainand passes here.After merge
Push the
v2.0.5tag.release.ymlthen publishes to PyPI, creates the GitHub release, and lists the version in the MCP Registry.🤖 Generated with Claude Code