Skip to content

feat: Add CreateOntologyStep import to ontology.py#176

Merged
galshubeli merged 2 commits intoFalkorDB:mainfrom
aryan757:main
Jan 27, 2026
Merged

feat: Add CreateOntologyStep import to ontology.py#176
galshubeli merged 2 commits intoFalkorDB:mainfrom
aryan757:main

Conversation

@aryan757
Copy link

@aryan757 aryan757 commented Jan 23, 2026

Fix: CreateOntologyStep import for Ontology.from_sources

This PR addresses an issue where the Ontology.from_sources method was failing due to a missing import for CreateOntologyStep. As a result, the "Creating Ontologies" example provided in the README.md (lines 143-146) was not working as expected.

The fix involves adding the necessary import statement for CreateOntologyStep from graphrag_sdk.steps.create_ontology_step into the graphrag_sdk/ontology.py file. This resolves the import error and allows the ontology creation process to function correctly as described in the documentation.

Summary by CodeRabbit

  • Chores
    • Updated internal imports for better code organization.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

Added the CreateOntologyStep import from graphrag_sdk.steps.create_ontology_step to graphrag_sdk/ontology.py. This is a straightforward import addition with no behavioral or control-flow modifications.

Changes

Cohort / File(s) Summary
Import Addition
graphrag_sdk/ontology.py
Added import of CreateOntologyStep from graphrag_sdk.steps.create_ontology_step for use in the Ontology.from_sources method

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A single line hops into view,
An import fresh and brand new,
CreateOntologyStep takes its place,
With grace and simplicity's embrace!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a CreateOntologyStep import to ontology.py, which directly fixes the import error preventing Ontology.from_sources from functioning.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
graphrag_sdk/ontology.py (1)

10-80: Use the newly imported CreateOntologyStep directly.

Right now the added import is unused, and Ontology.from_sources still calls graphrag_sdk.CreateOntologyStep (Line 75). If the package doesn’t expose that symbol, the original error persists. Consider using the directly imported class.

✅ Suggested fix
-        step = graphrag_sdk.CreateOntologyStep(
+        step = CreateOntologyStep(
             sources=sources,
             ontology=Ontology(),
             model=model,
             hide_progress=hide_progress,
         )

@galshubeli galshubeli merged commit 95b0186 into FalkorDB:main Jan 27, 2026
2 of 3 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.

2 participants