Skip to content

Commit b1e0e8a

Browse files
committed
migrate to uv
1 parent bdda220 commit b1e0e8a

File tree

9 files changed

+4403
-6485
lines changed

9 files changed

+4403
-6485
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ database:
1010
docker compose --profile db_only up
1111

1212
run:
13-
poetry run streamlit run app_home.py
13+
uv run streamlit run app_home.py
1414

1515
lint:
16-
poetry run python -m mypy .
16+
uv run python -m mypy .
1717

1818
ruff:
1919
ruff check . --fix

app_home.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import streamlit as st
2+
from dotenv import load_dotenv
23

34
from open_notebook.domain.base import ObjectModel
45
from open_notebook.exceptions import NotFoundError
@@ -10,6 +11,7 @@
1011
)
1112
from pages.stream_app.utils import setup_page
1213

14+
load_dotenv()
1315
setup_page("📒 Open Notebook", sidebar_state="collapsed")
1416

1517
if "object_id" not in st.query_params:

pages/stream_app/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from dotenv import load_dotenv
2+
3+
load_dotenv()

pages/stream_app/utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def version_sidebar():
2626

2727
with open("pyproject.toml", "rb") as f:
2828
pyproject = tomli.load(f)
29-
current_version = pyproject["tool"]["poetry"]["version"]
29+
current_version = pyproject["project"]["version"]
3030

3131
latest_version = get_version_from_github(
3232
"https://www.github.com/lfnovo/open-notebook", "main"
@@ -98,6 +98,7 @@ def setup_stream_state(current_notebook: Notebook) -> ChatSession:
9898

9999

100100
def check_migration():
101+
logger.critical("Running migration check")
101102
mm = MigrationManager()
102103
if mm.needs_migration:
103104
st.warning("The Open Notebook database needs a migration to run properly.")

poetry.lock

-6,430
This file was deleted.

poetry.toml

-3
This file was deleted.

pyproject.toml

+58-49
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,72 @@
1-
[tool.poetry]
1+
[project]
22
name = "open-notebook"
33
version = "0.1.1"
44
description = "An open source implementation of a research assistant, inspired by Google Notebook LM"
5-
authors = ["Luis Novo <[email protected]>"]
6-
license = "MIT"
5+
authors = [
6+
{name = "Luis Novo", email = "[email protected]"}
7+
]
78
readme = "README.md"
89
classifiers = [
910
"License :: OSI Approved :: MIT License",
1011
"Programming Language :: Python :: 3",
1112
"Programming Language :: Python :: 3.11",
1213
]
14+
requires-python = ">=3.11"
15+
dependencies = [
16+
"streamlit>=1.39.0",
17+
"watchdog>=5.0.3",
18+
"pydantic>=2.9.2",
19+
"loguru>=0.7.2",
20+
"langchain>=0.3.3",
21+
"langgraph>=0.2.38",
22+
"humanize>=4.11.0",
23+
"streamlit-tags>=1.2.8",
24+
"streamlit-scrollable-textbox>=0.0.3",
25+
"tiktoken>=0.8.0",
26+
"streamlit-monaco>=0.1.3",
27+
"langgraph-checkpoint-sqlite>=2.0.0",
28+
"pymupdf==1.24.11",
29+
"python-magic>=0.4.27",
30+
"langdetect>=1.0.9",
31+
"youtube-transcript-api>=0.6.2",
32+
"openai>=1.52.0",
33+
"pre-commit>=4.0.1",
34+
"langchain-community>=0.3.3",
35+
"litellm>=1.50.1",
36+
"langchain-openai>=0.2.3",
37+
"langchain-anthropic>=0.2.3",
38+
"langchain-ollama>=0.2.0",
39+
"langchain-google-vertexai>=2.0.5",
40+
"langchain-google-genai>=2.0.1",
41+
"podcastfy>=0.4",
42+
"tomli>=2.0.2",
43+
"bs4>=0.0.2",
44+
"python-docx>=1.1.2",
45+
"python-pptx>=1.0.2",
46+
"openpyxl>=3.1.5",
47+
"google-generativeai>=0.8.3",
48+
"langchain-groq>=0.2.1",
49+
"groq>=0.12.0",
50+
"python-dotenv>=1.0.1",
51+
"sdblpy",
52+
]
1353

14-
[tool.poetry.dependencies]
15-
python = "^3.11"
16-
streamlit = "^1.39.0"
17-
watchdog = "^5.0.3"
18-
pydantic = "^2.9.2"
19-
loguru = "^0.7.2"
20-
langchain = "^0.3.3"
21-
langgraph = "^0.2.38"
22-
humanize = "^4.11.0"
23-
streamlit-tags = "^1.2.8"
24-
streamlit-scrollable-textbox = "^0.0.3"
25-
tiktoken = "^0.8.0"
26-
streamlit-monaco = "^0.1.3"
27-
langgraph-checkpoint-sqlite = "^2.0.0"
28-
pymupdf = "1.24.11"
29-
python-magic = "^0.4.27"
30-
langdetect = "^1.0.9"
31-
youtube-transcript-api = "^0.6.2"
32-
openai = "^1.52.0"
33-
pre-commit = "^4.0.1"
34-
langchain-community = "^0.3.3"
35-
litellm = "^1.50.1"
36-
langchain-openai = "^0.2.3"
37-
langchain-anthropic = "^0.2.3"
38-
langchain-ollama = "^0.2.0"
39-
langchain-google-vertexai = "^2.0.5"
40-
sdblpy = {git = "https://github.com/lfnovo/surreal-lite-py.git"}
41-
langchain-google-genai = "^2.0.1"
42-
podcastfy = "^0.4"
43-
tomli = "^2.0.2"
44-
bs4 = "^0.0.2"
45-
python-docx = "^1.1.2"
46-
python-pptx = "^1.0.2"
47-
openpyxl = "^3.1.5"
48-
google-generativeai = "^0.8.3"
49-
langchain-groq = "^0.2.1"
50-
groq = "^0.12.0"
54+
[tool.setuptools]
55+
package-dir = {"jota_ai" = "src/open_notebook"}
5156

52-
[tool.poetry.group.dev.dependencies]
53-
ipykernel = "^6.29.5"
54-
ruff = "^0.5.5"
55-
mypy = "^1.11.1"
56-
types-requests = "^2.32.0.20241016"
57-
ipywidgets = "^8.1.5"
5857

59-
[build-system]
60-
requires = ["poetry-core"]
61-
build-backend = "poetry.core.masonry.api"
58+
[project.optional-dependencies]
59+
dev = [
60+
"ipykernel>=6.29.5",
61+
"ruff>=0.5.5",
62+
"mypy>=1.11.1",
63+
"types-requests>=2.32.0.20241016",
64+
"ipywidgets>=8.1.5",
65+
]
6266

67+
[build-system]
68+
requires = ["setuptools>=61.0"]
69+
build-backend = "setuptools.build_meta"
6370

6471
[tool.isort]
6572
profile = "black"
@@ -72,3 +79,5 @@ line-length = 88
7279
select = ["E", "F", "I"]
7380
ignore = ["E501"]
7481

82+
[tool.uv.sources]
83+
sdblpy = { git = "https://github.com/lfnovo/surreal-lite-py" }

src/open_notebook/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from dotenv import load_dotenv
2+
3+
load_dotenv()

0 commit comments

Comments
 (0)