Skip to content

refactor(bar): rename 'thick' field to 'thick_bars' for clarity#514

Merged
palewire merged 1 commit intochekos:mainfrom
palewire:cut-serialize
Nov 15, 2025
Merged

refactor(bar): rename 'thick' field to 'thick_bars' for clarity#514
palewire merged 1 commit intochekos:mainfrom
palewire:cut-serialize

Conversation

@palewire
Copy link
Collaborator

Renamed the thick field to thick_bars in the BarChart class to improve code readability and make the field name more descriptive. The field still uses "thick" as an alias to maintain backward compatibility with the API.

Changes:

  • Renamed field from thick to thick_bars in BarChart model
  • Updated all references in serialization and deserialization methods
  • Updated test assertions to use new field name

This change makes the codebase more maintainable by using a more explicit field name while preserving the existing API contract through aliasing.

Renamed the `thick` field to `thick_bars` in the BarChart class to improve
code readability and make the field name more descriptive. The field still
uses "thick" as an alias to maintain backward compatibility with the API.

Changes:
- Renamed field from `thick` to `thick_bars` in BarChart model
- Updated all references in serialization and deserialization methods
- Updated test assertions to use new field name

This change makes the codebase more maintainable by using a more explicit
field name while preserving the existing API contract through aliasing.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the BarChart class by renaming the internal field from thick to thick_bars to improve code clarity and maintainability. The field uses "thick" as an alias to preserve backward compatibility with the Datawrapper API. All references in serialization, deserialization, and tests have been updated to use the new field name.

Key Changes

  • Renamed internal field from thick to thick_bars in the BarChart model definition
  • Updated serialization method to use self.thick_bars while maintaining "thick" as the API key
  • Updated deserialization method to populate thick_bars from the API's "thick" field
  • Updated test assertions across integration and functional test files to reference thick_bars

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
datawrapper/charts/bar.py Renamed field definition from thick to thick_bars with alias preservation, and updated serialization/deserialization methods
tests/integration/test_chart_get_method.py Updated assertion to use thick_bars field name
tests/functional/test_end_to_end.py Updated chart initialization and assertions to use thick_bars field name

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@palewire palewire merged commit 4aa5f02 into chekos:main Nov 15, 2025
15 checks passed
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