-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graph updates for COG-166 #88
Conversation
WalkthroughA delightful addition has been made to the GitHub Actions workflow, introducing a new environment variable setting 'dev'. This tweak is likely to impact how the tests are executed or configured during the development phase. Additionally, there are changes in type annotations and import statements across various Python modules, refining the codebase structure and functionality. Changes
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (4)
Files skipped from review due to trivial changes (2)
Additional comments not posted (6)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this 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
@@ -1,13 +1,16 @@ | |||
from typing import Protocol, BinaryIO | |||
|
|||
from typing import Union, Protocol, BinaryIO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the redundant imports of Protocol
and BinaryIO
as they are already imported at the beginning of the file.
- from typing import Union, Protocol, BinaryIO
+ from typing import Union
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
from typing import Union, Protocol, BinaryIO | |
from typing import Union |
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
10531072 | Triggered | Generic High Entropy Secret | 0b54f9e | cognee/utils.py | View secret |
10531072 | Triggered | Generic High Entropy Secret | 0b54f9e | cognee/utils.py | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
There was a problem hiding this 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
self.storage_path = storage_path | ||
|
||
def store(self, file_path: str, data: Union[BinaryIO, str]): | ||
def store(self, file_path: str, data: Union[BinaryIO, str]) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using os.path.join
for constructing file paths to ensure cross-platform compatibility.
- full_file_path = self.storage_path + "/" + file_path
+ full_file_path = os.path.join(self.storage_path, file_path)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
def store(self, file_path: str, data: Union[BinaryIO, str]) -> None: | |
def store(self, file_path: str, data: Union[BinaryIO, str]) -> None: | |
full_file_path = os.path.join(self.storage_path, file_path) |
Summary by CodeRabbit
IngestionData
class to useUnion
for thedata
attribute.get_data
,get_identifier
, andget_metadata
methods in theIngestionData
class.create_vector_memory
from the modulecognee/modules/memory/vector/__init__.py
.is_existing_memory
andregister_memory_for_user
and added an import forcreate_information_points
in thecognee/modules/users/memory/__init__.py
.