Skip to content

Feat: add support for operations on IRI lists, add pandas-like queries#11

Merged
simontaurus merged 8 commits intomainfrom
dev
Mar 24, 2026
Merged

Feat: add support for operations on IRI lists, add pandas-like queries#11
simontaurus merged 8 commits intomainfrom
dev

Conversation

@simontaurus
Copy link
Copy Markdown
Contributor

No description provided.

…filters

- Port LinkedBaseModelList, OOFieldInfo, query()/[] operator from v2 to v1
- Add _constructing guard to prevent field-name shadow errors during
  class construction in both v1 and v2 metaclasses
- Fix None-safety in LinkedBaseModelList.__init__ (check before get_iri())
- Restructure query_test.py to cover both pydantic v1 and v2
by redirecting model_fields access to the class instead of the instance
@github-actions
Copy link
Copy Markdown
Contributor

📊 Benchmark Results

Click to see benchmark comparison
📊 Benchmark Comparison (threshold: 1.3x)
============================================================

✅ Performance Improvements:
  ✅ test_simple_dict_document_store: 0.0026s → 0.0015s (-42.6%, ratio: 0.57x)

➖ Unchanged (within threshold):
  ➖ test_sqlite_document_store: 0.0030s → 0.0031s (+4.0%)
  ➖ test_local_sparql_store: 0.0357s → 0.0384s (+7.5%)
  ➖ test_oneof_subschema: 0.0593s → 0.0509s (-14.1%)
  ➖ test_enum_docstrings: 0.0482s → 0.0438s (-9.2%)
  ➖ test_subclass_inheritance: 0.0457s → 0.0469s (+2.6%)
  ➖ test_class_hierarchy: 0.0498s → 0.0496s (-0.4%)
  ➖ test_core[v1]: 0.0317s → 0.0331s (+4.2%)
  ➖ test_core[v2]: 0.0405s → 0.0448s (+10.7%)
  ➖ test_schema_generation[v1]: 0.0015s → 0.0016s (+5.2%)
  ➖ test_schema_generation[v2]: 0.0026s → 0.0029s (+12.4%)
  ➖ test_simple_json: 0.0007s → 0.0007s (-0.3%)
  ➖ test_complex_graph: 0.0015s → 0.0015s (-1.2%)

============================================================
Summary: 0 regressions, 1 improvements, 12 unchanged
============================================================

✅ No significant performance regressions

Threshold: 1.3x (30% slower triggers a regression warning)

Note: Benchmarks are informational only and won't fail the build.

💡 Tip: Download the benchmark-results artifact for detailed JSON data

@github-actions
Copy link
Copy Markdown
Contributor

📊 Benchmark Results

Click to see benchmark comparison
📊 Benchmark Comparison (threshold: 1.3x)
============================================================

⚠️  Performance Regressions:
  ❌ test_schema_generation[v2]: 0.0024s → 0.0032s (+32.9%, ratio: 1.33x)

✅ Performance Improvements:
  ✅ test_simple_dict_document_store: 0.0025s → 0.0016s (-35.2%, ratio: 0.65x)

➖ Unchanged (within threshold):
  ➖ test_sqlite_document_store: 0.0029s → 0.0029s (-0.5%)
  ➖ test_local_sparql_store: 0.0347s → 0.0352s (+1.5%)
  ➖ test_oneof_subschema: 0.0494s → 0.0492s (-0.4%)
  ➖ test_enum_docstrings: 0.0468s → 0.0412s (-12.1%)
  ➖ test_subclass_inheritance: 0.0441s → 0.0490s (+11.0%)
  ➖ test_class_hierarchy: 0.0487s → 0.0470s (-3.6%)
  ➖ test_core[v1]: 0.0306s → 0.0311s (+1.7%)
  ➖ test_core[v2]: 0.0449s → 0.0433s (-3.8%)
  ➖ test_schema_generation[v1]: 0.0018s → 0.0015s (-16.9%)
  ➖ test_simple_json: 0.0005s → 0.0005s (+0.6%)
  ➖ test_complex_graph: 0.0013s → 0.0013s (+0.4%)

============================================================
Summary: 1 regressions, 1 improvements, 11 unchanged
============================================================

⚠️  Regressions detected but not failing build (informational only)

Threshold: 1.3x (30% slower triggers a regression warning)

Note: Benchmarks are informational only and won't fail the build.

💡 Tip: Download the benchmark-results artifact for detailed JSON data

mcs._constructing set the flag on whichever metaclass subclass was
calling __new__, but __getattribute__ checked type(self)._constructing
which resolves to the base metaclass. When a subclass metaclass like
QuantityValueMetaclass triggered construction, base classes using
LinkedBaseModelMetaClass still had _constructing=False, causing
false-positive field-name collision errors for fields like "type".

Also rename query/_query to oold_query/_oold_query to avoid
collisions with downstream "query" field names.
@github-actions
Copy link
Copy Markdown
Contributor

📊 Benchmark Results

Click to see benchmark comparison
Comparison file is empty - check workflow logs for details

Threshold: 1.3x (30% slower triggers a regression warning)

Note: Benchmarks are informational only and won't fail the build.

💡 Tip: Download the benchmark-results artifact for detailed JSON data

@github-actions
Copy link
Copy Markdown
Contributor

📊 Benchmark Results

Click to see benchmark comparison
Comparison file is empty - check workflow logs for details

Threshold: 1.3x (30% slower triggers a regression warning)

Note: Benchmarks are informational only and won't fail the build.

💡 Tip: Download the benchmark-results artifact for detailed JSON data

@simontaurus simontaurus merged commit 2a2469d into main Mar 24, 2026
10 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