Skip to content

Commit

Permalink
Dependency clean up (#125)
Browse files Browse the repository at this point in the history
update python deps, bump version to 0.0.7
  • Loading branch information
willeppy authored Jan 28, 2025
1 parent db419d5 commit cb6bccf
Show file tree
Hide file tree
Showing 7 changed files with 1,930 additions and 2,066 deletions.
2 changes: 1 addition & 1 deletion DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The backend hosts a FastAPI server and data processing functions along with the
Pre-requisites

1. Install conda
2. Install poetry
2. Install poetry (>=2.0.1)

Make a new conda environment, can be called whatever

Expand Down
3,910 changes: 1,884 additions & 2,026 deletions poetry.lock

Large diffs are not rendered by default.

67 changes: 37 additions & 30 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,40 +1,47 @@
[tool.poetry]
[project]
name = "texture-viz"
version = "0.0.6"
version = "0.0.7"
description = "Process and profile text datasets interactively"
authors = ["Will Epperson <[email protected]>"]
authors = [{ name = "Will Epperson", email = "[email protected]" }]
readme = "README.md"
keywords = ["text", "nlp", "data profiling", "llm"]
requires-python = ">=3.10"
dependencies = [
"pandas (>=2.2.3,<3.0.0)",
"fastapi (>=0.115.7,<0.116.0)",
"pydantic (>=2.10.6,<3.0.0)",
"duckdb (>=1.1.3,<2.0.0)",
"pyarrow (>=19.0.0,<20.0.0)",
"orjson (>=3.10.15,<4.0.0)",
"uvicorn[standard] (>=0.34.0,<0.35.0)",
"tiktoken (>=0.8.0,<0.9.0)",
"lancedb (>=0.18.0,<0.19.0)",
"openai (>=1.60.2,<2.0.0)",
"multiprocess (>=0.70.17,<0.71.0)",
"anywidget (>=0.9.13,<0.10.0)",
"numpy (>=2.2.2,<3.0.0)",
]

[project.optional-dependencies]
extra = [
"sentence-transformers>=2.2.2",
"torch>=2.1.1",
"nltk>=3.8.1",
"umap-learn>=0.5.5",
]

[project.urls]
repository = "https://github.com/cmudig/Texture"
homepage = "https://github.com/cmudig/Texture"
keywords = ["text", "nlp", "data profiling", "llm"]
packages = [{ include = "texture" }]
include = ["texture/frontend/**/*"]

[tool.poetry.dependencies]
python = "^3.10"
pandas = "^2.1.0"
sentence-transformers = "^2.2.2"
pyod = "^1.1.0"
torch = "^2.1.1"
fastapi = "^0.104.1"
pydantic = "^2.5.2"
duckdb = "^0.10.2"
pyarrow = "^14.0.1"
orjson = "^3.9.10"
uvicorn = { extras = ["standard"], version = "^0.24.0.post1" }
python-multipart = "^0.0.6"
nltk = "^3.8.1"
tiktoken = "^0.5.2"
lancedb = "^0.5.1"
umap-learn = "^0.5.5"
openai = "^1.20.0"
multiprocess = "^0.70.16"
anywidget = "^0.9.13"
[project.scripts]
run_server = "texture.runner_dev_temp:dev_run"

[tool.poetry]
packages = [{ include = "texture" }]
include = [{ path = "texture/frontend/**/*", format = ["sdist", "wheel"] }]
exclude = ["texture/extra"]

[build-system]
requires = ["poetry-core"]
requires = ["poetry-core>=2.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
run_server = "texture.runner_dev_temp:dev_run"
2 changes: 1 addition & 1 deletion texture/database/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def load_dataframe(self, table_name, df: pd.DataFrame):
df: DataFrame to load
"""
q = f"CREATE TABLE '{table_name}' AS SELECT * FROM df"
self.execute(q)
self.connection.sql(q)

def add_column(self, tableName, columnName, data):
"""
Expand Down
9 changes: 4 additions & 5 deletions texture/database/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import pandas as pd
import numpy as np

from texture.extra.embeddings import get_projection
from texture.models import DatasetSchema, Column, DataType
from texture.names import (
C_VECTOR,
Expand Down Expand Up @@ -33,11 +32,11 @@ def preprocess(

if not (C_EMBED_X in df.columns and C_EMBED_Y in df.columns):
print(
f"Found '{C_VECTOR}' column but no projection (missing '{C_EMBED_X}', '{C_EMBED_Y}'). Projecting now..."
f"Found '{C_VECTOR}' column but no projection (missing '{C_EMBED_X}', '{C_EMBED_Y}')."
)
projection = get_projection(df[C_VECTOR])
df[C_EMBED_X] = projection[:, 0]
df[C_EMBED_Y] = projection[:, 1]
# projection = get_projection(df[C_VECTOR])
# df[C_EMBED_X] = projection[:, 0]
# df[C_EMBED_Y] = projection[:, 1]

# or just projection of embeddings
if C_EMBED_X in df.columns and C_EMBED_Y in df.columns:
Expand Down
4 changes: 2 additions & 2 deletions texturefrontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion texturefrontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "texture",
"private": true,
"version": "0.0.6",
"version": "0.0.7",
"type": "module",
"author": {
"name": "Will Epperson",
Expand Down

0 comments on commit cb6bccf

Please sign in to comment.