Bug Report
Describe the bug
- The CLI help text and function docstring for
deploy specify that the abstract parameter must be at most 200 characters long (max 200 chars). However, create_dataset() in databusclient/api/deploy.py does not validate this limit before constructing and sending the dataset payload.
- Databus URI validation for
version_id currently relies on simple string splitting (rsplit('/', 4)), which fails to detect missing URL schemes (http/https), empty path segments, or invalid characters early on the client side.
To Reproduce
Steps to reproduce the behavior:
- Run the deploy CLI command passing an abstract longer than 200 characters:
databusclient deploy \
--version-id "https://databus.dbpedia.org/user/group/artifact/1.0.0" \
--title "Sample Title" \
--abstract "$(python3 -c 'print("A"*210)')" \
--description "Sample Description" \
--license "https://dalicc.net/licenses/cc-by-4.0" \
--apikey "dummy_key" \
https://example.com/data.ttl
Expected behavior
- The client should validate
len(artifact_version_abstract.strip()) <= 200 locally in create_dataset() and cli.py, raising a BadArgumentException if the limit is exceeded.
- The client should validate
version_id against a proper URL/URI format before constructing dataset metadata.
Additional context (optional)
- Affected file:
databusclient/api/deploy.py (lines 311-365) and databusclient/cli.py.
- Adding unit tests for abstract length enforcement in
tests/test_deploy.py will prevent future regressions.
Bug Report
Describe the bug
deployspecify that theabstractparameter must be at most 200 characters long (max 200 chars). However,create_dataset()indatabusclient/api/deploy.pydoes not validate this limit before constructing and sending the dataset payload.version_idcurrently relies on simple string splitting (rsplit('/', 4)), which fails to detect missing URL schemes (http/https), empty path segments, or invalid characters early on the client side.To Reproduce
Steps to reproduce the behavior:
Expected behavior
len(artifact_version_abstract.strip()) <= 200locally increate_dataset()andcli.py, raising aBadArgumentExceptionif the limit is exceeded.version_idagainst a proper URL/URI format before constructing dataset metadata.Additional context (optional)
databusclient/api/deploy.py(lines 311-365) anddatabusclient/cli.py.tests/test_deploy.pywill prevent future regressions.