Skip to content

Refactor SchemaConfig -> GraphSchema #340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 21, 2025

Conversation

stellasia
Copy link
Contributor

@stellasia stellasia commented May 16, 2025

Description

  • Rename SchemaConfig to GraphSchema
  • Use NodeType (previously SchemaEntity) and RelationshipType (previously SchemaRelation) to define GraphSchema
  • Rename entities/relations/potential_schema to node_types/relationship_types/patterns
  • Use tuples instead of lists for immutability (required to make the _*_index always consistent in the schema object) -> this validation is done by Pydantic and is transparent for users who provide nodes_types/relationship_types/patterns as list of str or dicts.

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation update
  • Project configuration change

Complexity

Complexity: Low

How Has This Been Tested?

  • Unit tests
  • E2E tests
  • Manual tests

Checklist

The following requirements should have been met (depending on the changes in the branch):

  • Documentation has been updated
  • Unit tests have been updated
  • E2E tests have been updated
  • Examples have been updated
  • New files have copyright header
  • CLA (https://neo4j.com/developer/cla/) has been signed
  • CHANGELOG.md updated if appropriate

@stellasia stellasia requested a review from a team as a code owner May 16, 2025 07:46
@stellasia stellasia force-pushed the refactor/schema-config branch from 1a62e9f to 67221a8 Compare May 20, 2025 11:35
@stellasia stellasia requested a review from oskarhane May 20, 2025 14:45
@stellasia stellasia changed the title Refactor SchemaConfig Refactor SchemaConfig -> GraphSchema May 20, 2025
Copy link
Member

@oskarhane oskarhane left a comment

Choose a reason for hiding this comment

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

Good stuff seeing this change.
Quite breaking, but all in the experimental namespace.

@stellasia stellasia merged commit 8b3af81 into neo4j:main May 21, 2025
7 checks passed
@stellasia stellasia deleted the refactor/schema-config branch May 21, 2025 19:29
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