Skip to content

Revert "add delay to avoid rate limits" & Fix curricular import#179

Merged
galshubeli merged 3 commits intomainfrom
fix-ontology-imports
Jan 27, 2026
Merged

Revert "add delay to avoid rate limits" & Fix curricular import#179
galshubeli merged 3 commits intomainfrom
fix-ontology-imports

Conversation

@galshubeli
Copy link
Contributor

@galshubeli galshubeli commented Jan 27, 2026

Summary by CodeRabbit

  • Chores
    • Adjusted internal imports and removed an unused import to simplify module structure.
  • Bug Fixes / Behavior
    • Source processing now runs continuously without an optional pause between items.
    • Simplified processing flow by removing a redundant post-processing step that re-added processed sources.

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

Removed unused imports and simplified source processing: moved a CreateOntologyStep import into a local scope, dropped an unused Document import, and removed the delay parameter plus per-source sleep and re-adding behavior in process_sources.

Changes

Cohort / File(s) Summary
Ontology import cleanup
graphrag_sdk/ontology.py, graphrag_sdk/steps/create_ontology_step.py
Moved CreateOntologyStep import into from_sources to avoid circular import; removed unused Document import. No API surface changes.
KnowledgeGraph processing change
graphrag_sdk/kg.py
Removed delay parameter from process_sources, eliminated time.sleep(delay) and the post-processing step that re-added processed sources; docstring/signature updated.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through bytes and trimmed a thread,
Moved a snagged import to where it led.
Sleep removed from the source-bound run,
Fewer hops now—my work is done.
Crunch, nibble, ship—hooray, let's have fun! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title partially addresses the changeset—it mentions reverting a delay feature and fixing imports, but contains a typo ('curricular' instead of 'circular') and doesn't fully clarify that the delay removal is a revert while imports are a fix. Correct the typo to 'circular' and clarify whether both changes are equally important or if one is the primary focus (e.g., 'Fix circular imports and remove delay parameter').
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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.

@augmentcode
Copy link

augmentcode bot commented Jan 27, 2026

🤖 Augment PR Summary

Summary: Cleans up imports to prevent unused/circular import issues.
Changes: Removes direct imports of CreateOntologyStep and Document, relying on the package export and local usage instead.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

from threading import Lock
from typing import Optional
from graphrag_sdk.steps.Step import Step
from graphrag_sdk.document import Document
Copy link

Choose a reason for hiding this comment

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

After removing Document, _process_source’s docstring still documents a document (Document) parameter that isn’t in the signature; consider updating the docstring to match (source: AbstractSource) to avoid misleading API docs.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

…sources"

This reverts commit add4c57, reversing
changes made to c7f8bad.
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: 1

🤖 Fix all issues with AI agents
In `@graphrag_sdk/kg.py`:
- Around line 204-214: The public method process_sources currently removed the
delay parameter which can break callers; restore backwards compatibility by
reintroducing a delay parameter (e.g., delay: Optional[float] = None) to the
process_sources signature in class/def process_sources and, inside the method,
accept and ignore it while issuing a DeprecationWarning (or logging a warning)
when delay is not None; ensure the warning text references process_sources and
suggests the new behavior so callers have a migration path.

@galshubeli galshubeli changed the title Fix Imports Revert "add delay to avoid rate limits" & Fix curricular import Jan 27, 2026
@galshubeli galshubeli merged commit 5cbdf94 into main Jan 27, 2026
8 checks passed
@galshubeli galshubeli deleted the fix-ontology-imports branch January 27, 2026 12:59
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