yoheinakajima / instagraph

Converts text input or URL into knowledge graph and displays
MIT License
3.27k stars 281 forks source link

fix from_ related bug, URL to URI #58

Closed snakajima closed 10 months ago

snakajima commented 10 months ago

Summary by CodeRabbit

coderabbitai[bot] commented 10 months ago

Walkthrough

The changes primarily focus on enhancing the code's robustness and consistency. The environment variable for the Neo4j URL is updated, and a fallback mechanism is introduced. Additionally, a property name in the 'edges' dictionary is corrected to match the expected name, improving the code's readability and maintainability.

Changes

File Summary
main.py The code now checks for the "NEO4J_URI" environment variable for the Neo4j URL. If not found, it falls back to "NEO4JURL" and issues a warning. The 'from' property in the 'edges' dictionary is renamed to 'from'.
models.py The Edge class has been updated. The from_ attribute is renamed to from using the alias parameter in the Field declaration, as 'from' is a reserved keyword in Python.

🐇

In the land of code, where logic is king,

Changes are made, improvements they bring.

With each pull request, we hop and we leap,

Crafting our masterpiece, in the Git we keep. 🎉

Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - Mention `@coderabbitai` in any *review comment* for bot assistance. - Note: Review comments are made on code diffs or files, not on the PR overview. ### Pause Incremental Reviews - Insert `@coderabbitai: ignore` in the PR description to halt the bot's ongoing reviews. Remove the line to resume. - Additionally, enter `@coderabbitai pause` to halt the bot's ongoing reviews as any issue or review comment. To resume reviews, enter `@coderabbitai resume` as any issue or review comment.