Skip to content

Rc/6.0.0#900

Merged
mariusconjeaud merged 110 commits intomasterfrom
rc/6.0.0
Nov 26, 2025
Merged

Rc/6.0.0#900
mariusconjeaud merged 110 commits intomasterfrom
rc/6.0.0

Conversation

@mariusconjeaud
Copy link
Copy Markdown
Collaborator

No description provided.

mariusconjeaud and others added 15 commits June 12, 2025 15:11
Following the pattern of neomodel.sync_.core.Database where all instance properties are threading-local (except global mappings _NODE_CLASS_REGISTRY and _DB_SPECIFIC_CLASS_REGISTRY), I've converted the same properties of AsyncDatabase to ContextVars (to be context-local instance properties).
…sync-database-transactions"

This reverts commit 983def8, reversing
changes made to 3424ab2.
…ions

Fix for AsyncDatabase and parallel transactions #888 ?
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 25, 2025

Codecov Report

❌ Patch coverage is 95.63758% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.25%. Comparing base (a9e8bad) to head (94c51a0).
⚠️ Report is 82 commits behind head on master.

Files with missing lines Patch % Lines
neomodel/async_/node.py 95.96% 10 Missing ⚠️
neomodel/sync_/node.py 95.96% 10 Missing ⚠️
neomodel/async_/transaction.py 90.27% 7 Missing ⚠️
neomodel/sync_/transaction.py 90.27% 7 Missing ⚠️
neomodel/async_/relationship_manager.py 82.35% 6 Missing ⚠️
neomodel/sync_/relationship_manager.py 82.85% 6 Missing ⚠️
neomodel/async_/match.py 93.82% 5 Missing ⚠️
neomodel/sync_/match.py 93.82% 5 Missing ⚠️
neomodel/async_/database.py 98.44% 2 Missing ⚠️
neomodel/properties.py 91.66% 2 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #900      +/-   ##
==========================================
+ Coverage   87.17%   88.25%   +1.08%     
==========================================
  Files          36       41       +5     
  Lines        5956     6368     +412     
==========================================
+ Hits         5192     5620     +428     
+ Misses        764      748      -16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mariusconjeaud mariusconjeaud requested a review from tonioo November 4, 2025 14:06
ADernild and others added 12 commits November 11, 2025 23:15
Allow setting relationship properties when creating nodes with relationships
in async methods.

Example:
    await Dog.get_or_create(
        {"name": "Gizmo"},
        relationship=bob.pets,
        rel_props={"since": datetime(2020, 1, 1)}
    )

- Uses _rel_merge_helper for proper property handling
- Includes validation and async tests
- Sync version to follow
Add tests for create_or_update() with relationship properties:
- Single node with rel_props
- Batch nodes with shared rel_props

Ensures create_or_update() properly supports the rel_props parameter
added to _build_merge_query().
Mirror the async implementation to add relationship properties support
to sync methods.

Both get_or_create() and create_or_update() now support rel_props
parameter in sync API, maintaining parity with async version.

Example:
    Dog.get_or_create(
        {"name": "Gizmo"},
        relationship=bob.pets,
        rel_props={"since": datetime(2020, 1, 1)}
    )
Extract validation and deflation logic into dedicated helper methods
to reduce cognitive complexity.

- _validate_relationship(): Validates relationship manager and model
- _deflate_relationship_properties(): Deflates rel_props for Cypher

No behavioral changes.
Add support for relationship properties in `get_or_create()` and `create_or_update()`
@sonarqubecloud
Copy link
Copy Markdown

@mariusconjeaud mariusconjeaud merged commit fe6e849 into master Nov 26, 2025
26 checks passed
@mariusconjeaud mariusconjeaud deleted the rc/6.0.0 branch November 26, 2025 15:46
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.

6 participants