Skip to content

Commit

Permalink
fix: updated poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
broomva committed Feb 2, 2024
1 parent 40a6070 commit 343cf15
Show file tree
Hide file tree
Showing 13 changed files with 229 additions and 376 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ package_list:
create_env:
conda deactivate -n vortex \
&& conda env remove -n vortex -y \
&& conda create -n vortex python=3.10 -y \
&& conda create -n vortex python=3.11 -y \
&& conda activate vortex
12 changes: 0 additions & 12 deletions environment.yml

This file was deleted.

4 changes: 1 addition & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
from vortex import entrypoint

if __name__ == "__main__":
entrypoint()
print("Vortex is installed!")
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ langchainhub = "^0.1.14"
selenium = "^4.17.2"
html2text = "^2020.1.16"
chainlit = "^1.0.200"
faiss-cpu = "^1.7.4"
# faiss-cpu = "^1.7.4"
chromadb = "^0.4.22"
tiktoken = "^0.5.2"
pymupdf = "^1.23.19"
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ langchainhub
selenium
html2text
chainlit
faiss-cpu
# faiss-cpu
chromadb
tiktoken
pymupdf
duckduckgo-search
wikipedia
mlflow
sendgrid
sendgrid
185 changes: 80 additions & 105 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
# import glob
# import io
# import os
# import sys
import glob
import io
import os
import sys

import setuptools
from setuptools import find_namespace_packages, find_packages

# Package metadata.
name = "vortex"
description = (
"A simple util to get a spark and mlflow session objects from an .env file"
)

package_root = os.path.abspath(os.path.dirname(__file__))

version = {}
with open(os.path.join(package_root, "version.py")) as fp:
exec(fp.read(), version)
version = version["__version__"]

readme_filename = os.path.join(package_root, "README.md")
with io.open(readme_filename, encoding="utf-8") as readme_file:
readme = readme_file.read()

# Should be one of:
# 'Development Status :: 3 - Alpha'
# 'Development Status :: 4 - Beta'
# 'Development Status :: 5 - Production/Stable'
release_status = "Development Status :: 3 - Alpha"

with open("requirements.txt") as f:
required = f.read().splitlines()

# import setuptools
# from setuptools import find_namespace_packages, find_packages

# if sys.version_info < (3, 8):
# find_namespace_packages()
Expand All @@ -13,49 +40,56 @@
# sys.exit(1)


# def prepare_data_files(directory, extensions):
# files = []
# for ext in extensions:
# files.extend(glob.glob(f"{directory}/*.{ext}"))
# return files


# data_files_structure = [
# (
# "vortex",
# prepare_data_files(
# "vortex",
# ["csv", "sql", "txt", "md", "html", "css", "json", "yaml", "faiss", "pkl"],
# ),
# ),
# ]

# # Package metadata.
# name = "vortex"
# description = (
# "A simple util to get a spark and mlflow session objects from an .env file"
# )
# # Should be one of:
# # 'Development Status :: 3 - Alpha'
# # 'Development Status :: 4 - Beta'
# # 'Development Status :: 5 - Production/Stable'
# release_status = "Development Status :: 3 - Alpha"
def prepare_data_files(directory, extensions):
files = []
for ext in extensions:
files.extend(glob.glob(f"{directory}/*.{ext}"))
return files

# with open("requirements.txt") as f:
# required = f.read().splitlines()

# # Setup boilerplate below this line.
data_files_structure = [
(
"vortex",
prepare_data_files(
"vortex",
["csv", "sql", "txt", "md", "html", "css", "json", "yaml", "faiss", "pkl"],
),
),
]

# package_root = os.path.abspath(os.path.dirname(__file__))

# version = {}
# with open(os.path.join(package_root, "version.py")) as fp:
# exec(fp.read(), version)
# version = version["__version__"]
setuptools.setup(
name="vortex",
packages=find_packages(exclude=["vortex_tests"]),
install_requires=[
"dagster",
"dagster-cloud",
"boto3",
"pandas",
"matplotlib",
"langchain",
"langchain_openai",
"openai",
"sqlalchemy",
"psycopg2-binary",
"pyautogen",
"bs4",
"langchainhub",
"langchain-community",
"selenium",
"html2text",
"chainlit",
"faiss-cpu",
"chromadb",
"tiktoken",
"pymupdf",
# "duckduckgo",
"wikipedia",
"sendgrid",
],
extras_require={"dev": ["dagster-webserver", "pytest"]},
)

# readme_filename = os.path.join(package_root, "README.md")
# with io.open(readme_filename, encoding="utf-8") as readme_file:
# readme = readme_file.read()

# setuptools.setup(
# name=name,
Expand All @@ -72,35 +106,11 @@
# "Operating System :: OS Independent",
# "Development Status :: 3 - Alpha",
# "Intended Audience :: Developers",
# "Programming Language :: Python",
# "Programming Language :: Python :: 3",
# "Programming Language :: Python :: 3.8",
# "Programming Language :: Python :: 3.9",
# "Programming Language :: Python :: 3.10",
# "Programming Language :: Python :: 3.11",
# "Programming Language :: Python" "Programming Language :: Python :: 3.11",
# "Topic :: Software Development :: Libraries :: Python Modules",
# ],
# # packages=find_packages(),
# packages=find_packages(exclude=["vortex_tests"]),
# # install_requires=required,
# install_requires=[
# "dagster",
# "dagster-cloud",
# "boto3",
# "pandas",
# "matplotlib",
# "langchain",
# "langchain_openai",
# "openai",
# "sqlalchemy",
# "psycopg2-binary",
# "pyautogen",
# "bs4",
# "langchainhub",
# "langchain-community",
# "selenium",
# "html2text",
# ],
# install_requires=required,
# extras_require={"dev": ["dagster-webserver", "pytest"]},
# python_requires=">=3.8",
# include_package_data=True,
Expand Down Expand Up @@ -131,38 +141,3 @@
# ],
# },
# )


from setuptools import find_packages, setup

setup(
name="vortex",
packages=find_packages(exclude=["vortex_tests"]),
install_requires=[
"dagster",
"dagster-cloud",
"boto3",
"pandas",
"matplotlib",
"langchain",
"langchain_openai",
"openai",
"sqlalchemy",
"psycopg2-binary",
"pyautogen",
"bs4",
"langchainhub",
"langchain-community",
"selenium",
"html2text",
"chainlit",
"faiss-cpu",
"chromadb",
"tiktoken",
"pymupdf",
# "duckduckgo",
"wikipedia",
"sendgrid",
],
extras_require={"dev": ["dagster-webserver", "pytest"]},
)
3 changes: 1 addition & 2 deletions vortex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@


def entrypoint():
# init()
...
print("Vortex is installed!")
20 changes: 0 additions & 20 deletions vortex/flows/DockerFile

This file was deleted.

20 changes: 20 additions & 0 deletions vortex/flows/DockerFile_dagster
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dagster libraries to run both dagster-webserver and the dagster-daemon. Does not
# need to have access to any pipeline code.

FROM --platform=linux/amd64 python:3.11

RUN pip install \
dagster \
dagster-graphql \
dagster-webserver \
dagster-postgres \
dagster-docker

# Set $DAGSTER_HOME and copy dagster instance and workspace YAML there
ENV DAGSTER_HOME=/opt/dagster/dagster_home/

RUN mkdir -p $DAGSTER_HOME

COPY dagster.yaml workspace.yaml $DAGSTER_HOME

WORKDIR $DAGSTER_HOME
23 changes: 23 additions & 0 deletions vortex/flows/DockerFile_user_code
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM --platform=linux/amd64 python:3.11

# Checkout and install dagster libraries needed to run the gRPC server
# exposing your repository to dagster-webserver and dagster-daemon, and to load the DagsterInstance

RUN pip install \
dagster \
dagster-postgres \
dagster-docker

# Add repository code

WORKDIR /opt/dagster/app

COPY vortex /opt/dagster/app/

# Run dagster gRPC server on port 4000

EXPOSE 4000

# CMD allows this to be overridden from run launchers or executors that want
# to run other commands against your repository
CMD ["dagster", "api", "grpc", "-h", "0.0.0.0", "-p", "4000", "-f", "vorte/__init__.py"]
Loading

0 comments on commit 343cf15

Please sign in to comment.