Skip to content

Commit f3dda13

Browse files
authored
Merge pull request #254 from darinkishore/actions
Add `pyproject.toml`, github action for compiling.
2 parents f83f906 + 7e91442 commit f3dda13

File tree

2 files changed

+163
-0
lines changed

2 files changed

+163
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build Package
2+
3+
# Build package on its own without additional pip install
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
11+
env:
12+
POETRY_VERSION: "1.6.1"
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
python-version: ["3.9"]
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Set up python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install Poetry
27+
uses: snok/install-poetry@v1
28+
- name: Install dependencies
29+
run: poetry install --no-root
30+
- name: Build
31+
shell: bash
32+
run: poetry build
33+
- name: Test installing built package
34+
shell: bash
35+
run: python -m pip install .
36+
- name: Test import dspy
37+
shell: bash
38+
working-directory: ${{ vars.RUNNER_TEMP }}
39+
run: python -c "import dspy"
40+
- name: Test import dsp
41+
shell: bash
42+
working-directory: ${{ vars.RUNNER_TEMP }}
43+
run: python -c "import dsp"
44+

pyproject.toml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
[build-system]
2+
requires = ["setuptools>=40.8.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "dspy-ai"
7+
version = "2.1.1"
8+
description = "DSPy"
9+
readme = "README.md"
10+
authors = [{name = "Omar Khattab", email = "okhattab@stanford.edu"}]
11+
license = {text = "MIT License"}
12+
requires-python = ">=3.9, <3.12"
13+
classifiers = [
14+
"Development Status :: 3 - Alpha",
15+
"Intended Audience :: Science/Research",
16+
"License :: OSI Approved :: MIT License",
17+
"Operating System :: POSIX :: Linux",
18+
"Programming Language :: Python :: 3", # removed 3.8
19+
"Programming Language :: Python :: 3.9",
20+
]
21+
dependencies = [
22+
"backoff~=2.2.1",
23+
"joblib~=1.3.2",
24+
"openai~=0.28.1",
25+
"pandas~=2.1.1",
26+
"regex~=2023.10.3",
27+
"ujson~=5.8.0",
28+
"tqdm~=4.66.1",
29+
"datasets~=2.14.6",
30+
"requests~=2.31.0",
31+
"optuna~=3.4.0",
32+
]
33+
34+
[project.optional-dependencies]
35+
pinecone = ["pinecone-client~=2.2.4"]
36+
qdrant = ["qdrant-client~=1.6.2", "fastembed~=0.1.0"]
37+
chromadb = ["chromadb~=0.4.14"]
38+
marqo = ["marqo"]
39+
docs = [
40+
"sphinx>=4.3.0",
41+
"furo>=2023.3.27",
42+
"docutils<0.17",
43+
"m2r2",
44+
"myst-parser",
45+
"myst-nb",
46+
"sphinx-autobuild",
47+
"sphinx_rtd_theme",
48+
"pydantic<2.0.0",
49+
"autodoc_pydantic",
50+
"sphinx-reredirects>=0.1.2",
51+
"sphinx-automodapi==0.16.0"
52+
]
53+
54+
[project.urls]
55+
homepage = "https://github.com/stanfordnlp/dspy"
56+
57+
[tool.poetry]
58+
name = "dspy"
59+
version = "2.0.8"
60+
description = "DSPy"
61+
authors = ["Omar Khattab <okhattab@stanford.edu>"]
62+
license = "MIT"
63+
readme = "README.md"
64+
homepage = "https://github.com/stanfordnlp/dspy"
65+
repository = "https://github.com/stanfordnlp/dspy"
66+
# documentation = "https://dspy-ai.readthedocs.io"
67+
keywords = ["dspy", "ai", "language models", "llm", "openai"]
68+
# may be a bit much
69+
70+
71+
[tool.poetry.dependencies]
72+
python = ">=3.9,<3.12"
73+
backoff = "^2.2.1"
74+
joblib = "^1.3.2"
75+
openai = "^0.28.1"
76+
pandas = "^2.1.1"
77+
regex = "^2023.10.3"
78+
ujson = "^5.8.0"
79+
tqdm = "^4.66.1"
80+
datasets = "^2.14.6"
81+
requests = "^2.31.0"
82+
optuna = "^3.4.0"
83+
pinecone-client = {version = "^2.2.4", optional = true}
84+
qdrant-client = {version = "^1.6.2", optional = true}
85+
fastembed = {version = "^0.1.0", optional = true}
86+
chromadb = {version = "^0.4.14", optional = true}
87+
marqo = {version = "*", optional = true}
88+
sphinx = {version = ">=4.3.0", optional = true}
89+
furo = {version = ">=2023.3.27", optional = true}
90+
docutils = {version = "<0.17", optional = true}
91+
m2r2 = {version = "*", optional = true}
92+
myst-parser = {version = "*", optional = true}
93+
myst-nb = {version = "*", optional = true}
94+
sphinx-autobuild = {version = "*", optional = true}
95+
sphinx_rtd_theme = {version = "*", optional = true}
96+
pydantic = {version = "*", optional = true}
97+
autodoc_pydantic = {version = "*", optional = true}
98+
sphinx-reredirects = {version = "^0.1.2", optional = true}
99+
sphinx-automodapi = {version = "0.16.0", optional = true}
100+
101+
[tool.poetry.extras]
102+
pinecone = ["pinecone-client"]
103+
qdrant = ["qdrant-client", "fastembed"]
104+
chromadb = ["chromadb"]
105+
marqo = ["marqo"]
106+
docs = [
107+
"sphinx",
108+
"furo",
109+
"docutils",
110+
"m2r2",
111+
"myst-parser",
112+
"myst-nb",
113+
"sphinx-autobuild",
114+
"sphinx_rtd_theme",
115+
"pydantic",
116+
"autodoc_pydantic",
117+
"sphinx-reredirects",
118+
"sphinx-automodapi"
119+
]

0 commit comments

Comments
 (0)