Skip to content

Conversation

@adityanalge
Copy link

Description

The sample example in Readme showed a comma in the output which wouldn't be there as toon encoding removes them. This Pull Request fixes the exampe.

from toon_format import encode, decode

# Tabular array (uniform objects)
encode([{"id": 1, "name": "Alice"}, {"id": 2, "name": "Bob"}])
# [2,]{id,name}:
#   1,Alice
#   2,Bob

changed to 

# Tabular array (uniform objects)
encode([{"id": 1, "name": "Alice"}, {"id": 2, "name": "Bob"}])
# [2]{id,name}:
#   1,Alice
#   2,Bob

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test coverage improvement

Related Issues

Closes #

Changes Made

  • fix: removed the comma from the decode example output in the Readme file

SPEC Compliance

  • This PR implements/fixes spec compliance
  • Spec section(s) affected:
  • Spec version:

Testing

  • All existing tests pass
  • Added new tests for changes
  • Tested on Python 3.8
  • Tested on Python 3.9
  • Tested on Python 3.10
  • Tested on Python 3.11
  • Tested on Python 3.12

Test Output

=================================================== tests coverage ====================================================
___________________________________ coverage: platform win32, python 3.14.0-final-0 ___________________________________
TOTAL                                1101     99  91.01%
Required test coverage of 85% reached. Total coverage: 91.01%
=============================================== short test summary info ===============================================
SKIPPED [13] tests\test_spec_fixtures.py:134: Normalization tests don't roundtrip by design
=========================================== 792 passed, 13 skipped in 1.03s ===========================================

Checklist for Reviewers

  • Code changes are clear and well-documented
  • Tests adequately cover the changes
  • Documentation is updated
  • No security concerns
  • Follows TOON specification
  • Backward compatible (or breaking changes are justified and documented)

@adityanalge
Copy link
Author

Sorry. My work doesn't allow me to do open source contributions. Good luck with this project. It's a great initiative.

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.

2 participants