FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix NDJSON export dataset version validation by angeliqueeumwali · Pull Request #46 · prooflinedev/sdk-python · GitHub

Repository navigation

Fix NDJSON export dataset version validation - #46

Open
angeliqueeumwali wants to merge 1 commit into
prooflinedev:mainfrom
angeliqueeumwali:contribution/python-sdk-improvement
Open

angeliqueeumwali wants to merge 1 commit into
prooflinedev:mainfrom
angeliqueeumwali:contribution/python-sdk-improvement

Conversation

Copy link
Copy Markdown

Summary

Fixes dataset version validation in decode_export().

Previously, NDJSON responses containing "dataset_version": "1" (a string) were incorrectly accepted because the value was converted to a string before validation.

The decoder now validates dataset versions according to the response format:

  • CSV requires the string value "1".
  • NDJSON requires the integer value 1.
  • Non-object rows and invalid dataset versions are rejected.

Tests

Added a regression test covering both synchronous and asynchronous clients. It verifies that an NDJSON response with a string dataset version raises the expected ProoflineError with type urn:proofline:sdk:invalid-response.

Validation results:

  • 142 tests passed.
  • Ruff checks passed.
  • Mypy passed (198 source files).
  • git diff --check passed.

This branch has not been deployed

No deployments
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL