Skip to content

Conversation

@polfeliu
Copy link
Contributor

@polfeliu polfeliu commented Dec 11, 2025

Description

Added xcf table element to the xcf parser and associated methods

Type of change

  • Parse and serialize table elements accroding to spec
  • Serialize data attribute on registers on xcf
  • Prefer data attribute on registers over storage
  • Incremented xcf version to 2.2
  • Add tables on check_configuration, load_configuration, and save_configuration
  • Extra: added agents.md as a test, not sure if its fully working, just experimenting

Tests

  • Aded unit tests for all methods

Please describe the manual tests that you ran to verify your changes if it applies.

Documentation

Please update the documentation.

  • Update docstrings of every function, method or class that change.
  • Build documentation locally to verify changes.
  • Add the changes at the [Unreleased] section of the CHANGELOG.

@polfeliu polfeliu changed the base branch from master to INGK-1193-create-table-object-api December 11, 2025 13:04
@polfeliu polfeliu requested a review from Copilot December 11, 2025 13:04
Copy link

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 adds support for table elements in XCF (configuration) files by introducing new classes (TableElement and ConfigTable) and extending the ConfigRegister class to support optional data attributes. The changes also refactor attribute extraction to use a centralized helper function with improved error messages.

Key Changes:

  • Added TableElement and ConfigTable classes for handling table data in configuration files
  • Extended ConfigRegister to support optional binary data attributes
  • Introduced a global _get_attribute_from_element helper function with overloaded type signatures for better error handling
  • Updated XCF file format minor version from 1 to 2

Reviewed changes

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

File Description
ingenialink/configuration_file.py Added TableElement and ConfigTable classes, extended ConfigRegister with data attribute support, introduced centralized attribute extraction helper, and updated XCF format to support tables
tests/test_configuration_file.py Added comprehensive tests for TableElement and ConfigTable serialization/deserialization, updated ConfigRegister error message tests, and added tests for data attribute handling
agents.md Added new documentation file for agent-related notes and styling preferences

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

Copy link

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link

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

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


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

def __init__(self, device: Device) -> None:
self.major_version = self._SUPPORTED_MAJOR_VERSION
self.minor_version = 1
self.minor_version = 2
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

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

The minor version is being incremented from 1 to 2, but this appears to be a significant change that adds table support to the XCF format. Consider whether this should be a major version increment instead, or ensure the format remains backward compatible. If the format is designed to be backward compatible (i.e., older readers can safely ignore the Tables element), document this explicitly in the code or changelog.

Copilot uses AI. Check for mistakes.
Copy link

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

) -> Optional[str]: ...


def _get_attribute_from_element(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

separated from dict class to have easier access from other classes

Base automatically changed from INGK-1193-create-table-object-api to develop December 22, 2025 13:53
@polfeliu polfeliu marked this pull request as ready for review December 23, 2025 08:48
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