update template, rework the plugin documentation and migrate to cmem-client - #2
Conversation
Replays the template diff onto this repository and refreshes the locked dependencies that come with it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhUJZ7EwjXm7mN2jAdZzvn
|
Reviewer chosen automatically as part of the template-update sweep. The main author of this plugin is Sebastian Tramp (62% of the commits touching
So review falls to the next-highest contributor who can be assigned here: René Pietzsch (38% of those commits). |
|
Taking this one as maintainer. I am the main author of this plugin (62% of the commits touching GitHub does not allow requesting a review from the author of a pull request, so this is recorded as an assignment instead of a review request. The automatically chosen reviewer (@rpietzsch) has been removed from this pull request, since review falls to me. |
- Python Code workflow task: describe ports and defaults up front, document the `test_inputs` variable used by the "Validate execution phase" action, and add a caveats section (no sandbox, initialization code running on every load, validation without an execution context, dependency handling) - Python Code transform operator: add the missing task description, a working example and its own caveats - add descriptions to the initialization code, execution code and source code parameters, and reword the action descriptions - document `get_client` instead of the deprecated `setup_cmempy_user_access` - fix the stale link to the context object documentation - add a fixture which uninstalls example-pypi-package before and after test_install_missing_packages_success Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018CbvDZvVCY8JzWn9uJT6rc
Replace the deprecated cmem-cmempy usage with cmem-client: - package_management.install_missing_packages takes a Client and uses client.python_packages instead of cmem.cmempy.workspace.python - the workflow task builds its client with get_client(context) instead of calling setup_cmempy_user_access - the tests use Client.from_env() and delete_item(..., skip_if_missing=True) - cmem-cmempy is replaced by cmem-client in pyproject.toml Along the way this fixes the "already installed" message, which repeated the package name where the installed version belongs, and drops the last mention of setup_cmempy_user_access from the task documentation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018CbvDZvVCY8JzWn9uJT6rc
Coverage Report
|
tests/utils.py defines the needs_cmem marker described by the plugin-testing skill, and the tests which construct a Client, a TestExecutionContext or a TestPluginContext now carry it. Without a populated .env the suite reports 6 passed and 6 skipped instead of erroring, so a fresh clone can run task check. tests/fixtures/cmem-plugin-python-testing.project.zip is an export of a DataIntegration project which drives both plugins against a real deployment - port negotiation, dependency installation, SPARQL reads and writes through cmem-client, and the transform operator - none of which a unit test reaches. README.md says how to import and run it, and records the two workflows which fail on a finding: a Python task with a flexible schema input port cannot be fed by a JSON dataset, reported as cmem-plugin-template#79. CLAUDE.md carries the project specific agent instructions the template never writes: the two phase model of the workflow task, the documentation string which doubles as the test corpus, and what the test suite does to a deployment. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2PdymJgUZnA8KZKMEiUvm
Three changes, one per commit.
update to cmem-plugin-template v9.5.0Updates this repository to
cmem-plugin-templatev9.5.0 viacopier update, and refreshes the locked dependencies that come with it.rework the user facing plugin documentationRewrites the text a user reads inside Corporate Memory for both tasks, grounded in what the code actually does:
test_inputsvariable of the Validate execution phase action, and adds a Caveats section covering unsandboxed execution, initialization code running on every load, the ten-entity cap andcontext is Noneduring validation, and the limits of dependency installation.migrate to cmem-clientRemoves the deprecated
cmem-cmempyusage:install_missing_packagestakes aClientand readsclient.python_packagesinstead ofcmem.cmempy.workspace.python.get_client(context)rather than callingsetup_cmempy_user_access.Client.from_env(), andtest_install_missing_packages_successgained a fixture which uninstallsexample-pypi-packageunconditionally before and after the test, so neither a leftover from an earlier run nor a failing test can leave it behind.cmem-cmempyis replaced bycmem-clientinpyproject.toml.This also fixes the Install missing dependencies action, which printed the package name where the installed version belongs, and the documentation no longer points at
setup_cmempy_user_access.Checks
task checkpasses locally against a live Corporate Memory deployment: ruff, mypy (9 source files), deptry and trivy clean, 12 tests passed.