migrate to uv
This commit is contained in:
parent
bdda2203cd
commit
b1e0e8ad99
9 changed files with 4403 additions and 6485 deletions
4
Makefile
4
Makefile
|
|
@ -10,10 +10,10 @@ database:
|
||||||
docker compose --profile db_only up
|
docker compose --profile db_only up
|
||||||
|
|
||||||
run:
|
run:
|
||||||
poetry run streamlit run app_home.py
|
uv run streamlit run app_home.py
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
poetry run python -m mypy .
|
uv run python -m mypy .
|
||||||
|
|
||||||
ruff:
|
ruff:
|
||||||
ruff check . --fix
|
ruff check . --fix
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import streamlit as st
|
import streamlit as st
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
from open_notebook.domain.base import ObjectModel
|
from open_notebook.domain.base import ObjectModel
|
||||||
from open_notebook.exceptions import NotFoundError
|
from open_notebook.exceptions import NotFoundError
|
||||||
|
|
@ -10,6 +11,7 @@ from pages.components import (
|
||||||
)
|
)
|
||||||
from pages.stream_app.utils import setup_page
|
from pages.stream_app.utils import setup_page
|
||||||
|
|
||||||
|
load_dotenv()
|
||||||
setup_page("📒 Open Notebook", sidebar_state="collapsed")
|
setup_page("📒 Open Notebook", sidebar_state="collapsed")
|
||||||
|
|
||||||
if "object_id" not in st.query_params:
|
if "object_id" not in st.query_params:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
load_dotenv()
|
||||||
|
|
@ -26,7 +26,7 @@ def version_sidebar():
|
||||||
|
|
||||||
with open("pyproject.toml", "rb") as f:
|
with open("pyproject.toml", "rb") as f:
|
||||||
pyproject = tomli.load(f)
|
pyproject = tomli.load(f)
|
||||||
current_version = pyproject["tool"]["poetry"]["version"]
|
current_version = pyproject["project"]["version"]
|
||||||
|
|
||||||
latest_version = get_version_from_github(
|
latest_version = get_version_from_github(
|
||||||
"https://www.github.com/lfnovo/open-notebook", "main"
|
"https://www.github.com/lfnovo/open-notebook", "main"
|
||||||
|
|
@ -98,6 +98,7 @@ def setup_stream_state(current_notebook: Notebook) -> ChatSession:
|
||||||
|
|
||||||
|
|
||||||
def check_migration():
|
def check_migration():
|
||||||
|
logger.critical("Running migration check")
|
||||||
mm = MigrationManager()
|
mm = MigrationManager()
|
||||||
if mm.needs_migration:
|
if mm.needs_migration:
|
||||||
st.warning("The Open Notebook database needs a migration to run properly.")
|
st.warning("The Open Notebook database needs a migration to run properly.")
|
||||||
|
|
|
||||||
6430
poetry.lock
generated
6430
poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,3 +0,0 @@
|
||||||
[virtualenvs]
|
|
||||||
in-project = true
|
|
||||||
path = "."
|
|
||||||
107
pyproject.toml
107
pyproject.toml
|
|
@ -1,65 +1,72 @@
|
||||||
[tool.poetry]
|
[project]
|
||||||
name = "open-notebook"
|
name = "open-notebook"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
description = "An open source implementation of a research assistant, inspired by Google Notebook LM"
|
description = "An open source implementation of a research assistant, inspired by Google Notebook LM"
|
||||||
authors = ["Luis Novo <lfnovo@gmail.com>"]
|
authors = [
|
||||||
license = "MIT"
|
{name = "Luis Novo", email = "lfnovo@gmail.com"}
|
||||||
|
]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"License :: OSI Approved :: MIT License",
|
"License :: OSI Approved :: MIT License",
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Programming Language :: Python :: 3.11",
|
"Programming Language :: Python :: 3.11",
|
||||||
]
|
]
|
||||||
|
requires-python = ">=3.11"
|
||||||
|
dependencies = [
|
||||||
|
"streamlit>=1.39.0",
|
||||||
|
"watchdog>=5.0.3",
|
||||||
|
"pydantic>=2.9.2",
|
||||||
|
"loguru>=0.7.2",
|
||||||
|
"langchain>=0.3.3",
|
||||||
|
"langgraph>=0.2.38",
|
||||||
|
"humanize>=4.11.0",
|
||||||
|
"streamlit-tags>=1.2.8",
|
||||||
|
"streamlit-scrollable-textbox>=0.0.3",
|
||||||
|
"tiktoken>=0.8.0",
|
||||||
|
"streamlit-monaco>=0.1.3",
|
||||||
|
"langgraph-checkpoint-sqlite>=2.0.0",
|
||||||
|
"pymupdf==1.24.11",
|
||||||
|
"python-magic>=0.4.27",
|
||||||
|
"langdetect>=1.0.9",
|
||||||
|
"youtube-transcript-api>=0.6.2",
|
||||||
|
"openai>=1.52.0",
|
||||||
|
"pre-commit>=4.0.1",
|
||||||
|
"langchain-community>=0.3.3",
|
||||||
|
"litellm>=1.50.1",
|
||||||
|
"langchain-openai>=0.2.3",
|
||||||
|
"langchain-anthropic>=0.2.3",
|
||||||
|
"langchain-ollama>=0.2.0",
|
||||||
|
"langchain-google-vertexai>=2.0.5",
|
||||||
|
"langchain-google-genai>=2.0.1",
|
||||||
|
"podcastfy>=0.4",
|
||||||
|
"tomli>=2.0.2",
|
||||||
|
"bs4>=0.0.2",
|
||||||
|
"python-docx>=1.1.2",
|
||||||
|
"python-pptx>=1.0.2",
|
||||||
|
"openpyxl>=3.1.5",
|
||||||
|
"google-generativeai>=0.8.3",
|
||||||
|
"langchain-groq>=0.2.1",
|
||||||
|
"groq>=0.12.0",
|
||||||
|
"python-dotenv>=1.0.1",
|
||||||
|
"sdblpy",
|
||||||
|
]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.setuptools]
|
||||||
python = "^3.11"
|
package-dir = {"jota_ai" = "src/open_notebook"}
|
||||||
streamlit = "^1.39.0"
|
|
||||||
watchdog = "^5.0.3"
|
|
||||||
pydantic = "^2.9.2"
|
|
||||||
loguru = "^0.7.2"
|
|
||||||
langchain = "^0.3.3"
|
|
||||||
langgraph = "^0.2.38"
|
|
||||||
humanize = "^4.11.0"
|
|
||||||
streamlit-tags = "^1.2.8"
|
|
||||||
streamlit-scrollable-textbox = "^0.0.3"
|
|
||||||
tiktoken = "^0.8.0"
|
|
||||||
streamlit-monaco = "^0.1.3"
|
|
||||||
langgraph-checkpoint-sqlite = "^2.0.0"
|
|
||||||
pymupdf = "1.24.11"
|
|
||||||
python-magic = "^0.4.27"
|
|
||||||
langdetect = "^1.0.9"
|
|
||||||
youtube-transcript-api = "^0.6.2"
|
|
||||||
openai = "^1.52.0"
|
|
||||||
pre-commit = "^4.0.1"
|
|
||||||
langchain-community = "^0.3.3"
|
|
||||||
litellm = "^1.50.1"
|
|
||||||
langchain-openai = "^0.2.3"
|
|
||||||
langchain-anthropic = "^0.2.3"
|
|
||||||
langchain-ollama = "^0.2.0"
|
|
||||||
langchain-google-vertexai = "^2.0.5"
|
|
||||||
sdblpy = {git = "https://github.com/lfnovo/surreal-lite-py.git"}
|
|
||||||
langchain-google-genai = "^2.0.1"
|
|
||||||
podcastfy = "^0.4"
|
|
||||||
tomli = "^2.0.2"
|
|
||||||
bs4 = "^0.0.2"
|
|
||||||
python-docx = "^1.1.2"
|
|
||||||
python-pptx = "^1.0.2"
|
|
||||||
openpyxl = "^3.1.5"
|
|
||||||
google-generativeai = "^0.8.3"
|
|
||||||
langchain-groq = "^0.2.1"
|
|
||||||
groq = "^0.12.0"
|
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
|
||||||
ipykernel = "^6.29.5"
|
[project.optional-dependencies]
|
||||||
ruff = "^0.5.5"
|
dev = [
|
||||||
mypy = "^1.11.1"
|
"ipykernel>=6.29.5",
|
||||||
types-requests = "^2.32.0.20241016"
|
"ruff>=0.5.5",
|
||||||
ipywidgets = "^8.1.5"
|
"mypy>=1.11.1",
|
||||||
|
"types-requests>=2.32.0.20241016",
|
||||||
|
"ipywidgets>=8.1.5",
|
||||||
|
]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["setuptools>=61.0"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
|
||||||
[tool.isort]
|
[tool.isort]
|
||||||
profile = "black"
|
profile = "black"
|
||||||
|
|
@ -72,3 +79,5 @@ line-length = 88
|
||||||
select = ["E", "F", "I"]
|
select = ["E", "F", "I"]
|
||||||
ignore = ["E501"]
|
ignore = ["E501"]
|
||||||
|
|
||||||
|
[tool.uv.sources]
|
||||||
|
sdblpy = { git = "https://github.com/lfnovo/surreal-lite-py" }
|
||||||
|
|
|
||||||
3
src/open_notebook/__init__.py
Normal file
3
src/open_notebook/__init__.py
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
load_dotenv()
|
||||||
Loading…
Reference in a new issue