-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Refactor MongoDB code. Clean codE
- Loading branch information
1 parent
b0b965b
commit fecef8e
Showing
20 changed files
with
634 additions
and
475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
parameters: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
from .collect_notion_data import collect_notion_data | ||
from .etl import etl | ||
|
||
__all__ = [ | ||
"collect_notion_data", | ||
"etl" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from zenml import pipeline | ||
from steps.infrastructure import ( | ||
ingest_to_mongodb, | ||
fetch_from_mongodb, | ||
) | ||
|
||
from second_brain.config import settings | ||
|
||
@pipeline | ||
def etl() -> None: | ||
ingest_json_config= { | ||
"mongodb_uri": settings.MONGODB_OFFLINE_URI, | ||
"database_name": settings.MONGODB_OFFLINE_DATABASE, | ||
"collection_name": settings.MONGODB_OFFLINE_COLLECTION, | ||
"data_directory": settings.DATA_DIRECTORY, | ||
} | ||
fetch_documents_config = { | ||
"mongodb_uri": settings.MONGODB_OFFLINE_URI, | ||
"database_name": settings.MONGODB_OFFLINE_DATABASE, | ||
"collection_name": settings.MONGODB_OFFLINE_COLLECTION, | ||
"limit": 100, | ||
} | ||
|
||
ingest_to_mongodb(**ingest_json_config) | ||
|
||
fetch_from_mongodb(**fetch_documents_config) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0", "wheel", "uv"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "zenml-rag-pipeline" | ||
name = "second_brain_course" | ||
version = "0.1.0" | ||
description = "Foundational ZenML-based pipeline stack with Local MongoDB Atlas integration." | ||
description = "Self-paced course on production LLMs and RAG by teaching you how to build an AI assistant on top of your second brain." | ||
authors = [ | ||
{name = "Paul Iusztin", email = "[email protected]"}, | ||
{name = "Jesse Moses", email = "[email protected]"}, | ||
|
@@ -23,10 +19,13 @@ dependencies = [ | |
"python-dotenv>=1.0.0", | ||
"pymongo>=4.4.0", | ||
"zenml[server]>=0.72.0", | ||
"boto3>=1.36.0", | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = ["ruff"] # Include only Ruff for linting | ||
[dependency-groups] | ||
dev = [ | ||
"ruff>=0.7.2", | ||
] | ||
|
||
[tool.ruff] | ||
line-length = 88 | ||
|
@@ -37,7 +36,11 @@ ignore = [ | |
[tool.pip] | ||
extra-index-url = "https://download.pytorch.org/whl/cpu/torch_stable.html" | ||
|
||
[build-system] | ||
requires = ["setuptools>=61.0", "wheel", "uv"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["."] | ||
where = ["src/."] | ||
include = ["configs", "pipelines", "steps"] | ||
exclude = ["data", "logs", "temp_store", "model_cache"] |
Oops, something went wrong.