Skip to content

Commit e1504aa

Browse files
committed
feat: REL-10782 Introduce server-ai and langchain packages with initial configurations
1 parent b63dbb5 commit e1504aa

File tree

30 files changed

+297
-83
lines changed

30 files changed

+297
-83
lines changed

.github/actions/build/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ runs:
1010
steps:
1111
- name: Build distribution files
1212
shell: bash
13+
working-directory: ./packages/sdk/server-ai
1314
run: poetry build
1415
- name: Hash build files for provenance
1516
id: package-hashes
1617
shell: bash
17-
working-directory: ./dist
18+
working-directory: ./packages/sdk/server-ai/dist
1819
run: |
1920
echo "package-hashes=$(sha256sum * | base64 -w0)" >> "$GITHUB_OUTPUT"

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ jobs:
5959
uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439
6060

6161
- name: Install requirements
62-
run: poetry install
62+
run: |
63+
cd packages/sdk/server-ai
64+
poetry install
6365
6466
- name: Run tests
6567
run: make test

.release-please-manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
".": "0.10.1"
2+
"packages/sdk/server-ai": "0.10.1",
3+
"packages/ai-providers/server-ai-langchain": "0.1.0"
34
}

Makefile

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ SPHINXPROJ = launchdarkly-server-sdk
66
SOURCEDIR = docs
77
BUILDDIR = $(SOURCEDIR)/build
88

9+
# Package paths
10+
SERVER_AI_PKG = packages/sdk/server-ai
11+
LANGCHAIN_PKG = packages/ai-providers/server-ai-langchain
12+
913
.PHONY: help
1014
help: #! Show this help message
1115
@echo 'Usage: make [target] ... '
@@ -14,31 +18,59 @@ help: #! Show this help message
1418
@grep -h -F '#!' $(MAKEFILE_LIST) | grep -v grep | sed 's/:.*#!/:/' | column -t -s":"
1519

1620
.PHONY: install
17-
install:
18-
@poetry install
21+
install: #! Install all packages
22+
@cd $(SERVER_AI_PKG) && poetry install
23+
@cd $(LANGCHAIN_PKG) && poetry install
24+
25+
.PHONY: install-server-ai
26+
install-server-ai: #! Install server-ai package
27+
@cd $(SERVER_AI_PKG) && poetry install
28+
29+
.PHONY: install-langchain
30+
install-langchain: #! Install langchain provider package
31+
@cd $(LANGCHAIN_PKG) && poetry install
1932

2033
#
2134
# Quality control checks
2235
#
2336

2437
.PHONY: test
25-
test: #! Run unit tests
26-
test: install
27-
@poetry run pytest $(PYTEST_FLAGS)
38+
test: #! Run unit tests for all packages
39+
test: test-server-ai
40+
41+
.PHONY: test-server-ai
42+
test-server-ai: #! Run unit tests for server-ai package
43+
test-server-ai: install-server-ai
44+
@cd $(SERVER_AI_PKG) && poetry run pytest $(PYTEST_FLAGS)
45+
46+
.PHONY: test-langchain
47+
test-langchain: #! Run unit tests for langchain provider package
48+
test-langchain: install-langchain
49+
@cd $(LANGCHAIN_PKG) && poetry run pytest $(PYTEST_FLAGS)
2850

2951
.PHONY: lint
30-
lint: #! Run type analysis and linting checks
31-
lint: install
32-
@poetry run mypy ldai
33-
@poetry run isort --check --atomic ldai
34-
@poetry run pycodestyle ldai
52+
lint: #! Run type analysis and linting checks for all packages
53+
lint: lint-server-ai
54+
55+
.PHONY: lint-server-ai
56+
lint-server-ai: #! Run type analysis and linting checks for server-ai package
57+
lint-server-ai: install-server-ai
58+
@cd $(SERVER_AI_PKG) && poetry run mypy src/ldai
59+
@cd $(SERVER_AI_PKG) && poetry run isort --check --atomic src/ldai
60+
@cd $(SERVER_AI_PKG) && poetry run pycodestyle src/ldai
61+
62+
.PHONY: lint-langchain
63+
lint-langchain: #! Run type analysis and linting checks for langchain provider package
64+
lint-langchain: install-langchain
65+
@cd $(LANGCHAIN_PKG) && poetry run mypy src/ldai_langchain
66+
@cd $(LANGCHAIN_PKG) && poetry run pycodestyle src/ldai_langchain
3567

3668
#
3769
# Documentation generation
3870
#
3971

4072
.PHONY: docs
4173
docs: #! Generate sphinx-based documentation
42-
@poetry install --with docs
74+
@cd $(SERVER_AI_PKG) && poetry install --with docs
4375
@cd docs
44-
@poetry run $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
76+
@cd $(SERVER_AI_PKG) && poetry run $(SPHINXBUILD) -M html "../../../$(SOURCEDIR)" "../../../$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
import os
2020
import sys
2121

22-
sys.path.insert(0, os.path.abspath('..'))
22+
# Add the server-ai package source to the path
23+
sys.path.insert(0, os.path.abspath('../packages/sdk/server-ai/src'))
2324

2425
import ldai
2526

ldai/testing/__init__.py

Whitespace-only changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# LaunchDarkly AI SDK - LangChain Provider
2+
3+
This package provides LangChain integration for the LaunchDarkly Server-Side AI SDK.
4+
5+
## Status
6+
7+
🚧 **Coming Soon** - This package is a placeholder for future LangChain integration.
8+
9+
## Installation
10+
11+
```bash
12+
pip install launchdarkly-server-sdk-ai-langchain
13+
```
14+
15+
## Usage
16+
17+
```python
18+
# Coming soon
19+
```
20+
21+
## Documentation
22+
23+
For full documentation, please refer to the [LaunchDarkly AI SDK documentation](https://docs.launchdarkly.com/sdk/ai/python).
24+
25+
## Contributing
26+
27+
See [CONTRIBUTING.md](../../../CONTRIBUTING.md) in the repository root.
28+
29+
## License
30+
31+
Apache-2.0
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[tool.poetry]
2+
name = "launchdarkly-server-sdk-ai-langchain"
3+
version = "0.1.0"
4+
description = "LaunchDarkly AI SDK LangChain Provider"
5+
authors = ["LaunchDarkly <[email protected]>"]
6+
license = "Apache-2.0"
7+
readme = "README.md"
8+
homepage = "https://docs.launchdarkly.com/sdk/ai/python"
9+
repository = "https://github.com/launchdarkly/python-server-sdk-ai"
10+
classifiers = [
11+
"Intended Audience :: Developers",
12+
"License :: OSI Approved :: Apache Software License",
13+
"Operating System :: OS Independent",
14+
"Programming Language :: Python :: 3",
15+
"Programming Language :: Python :: 3.9",
16+
"Programming Language :: Python :: 3.10",
17+
"Programming Language :: Python :: 3.11",
18+
"Programming Language :: Python :: 3.12",
19+
"Programming Language :: Python :: 3.13",
20+
"Topic :: Software Development",
21+
"Topic :: Software Development :: Libraries",
22+
]
23+
packages = [{ include = "ldai_langchain", from = "src" }]
24+
25+
[tool.poetry.dependencies]
26+
python = ">=3.9,<4"
27+
launchdarkly-server-sdk-ai = ">=0.10.1"
28+
# langchain-core = ">=0.1.0" # Uncomment when implementing
29+
30+
31+
[tool.poetry.group.dev.dependencies]
32+
pytest = ">=2.8"
33+
pytest-cov = ">=2.4.0"
34+
pytest-asyncio = ">=0.21.0"
35+
mypy = "==1.18.2"
36+
37+
[tool.mypy]
38+
python_version = "3.9"
39+
ignore_missing_imports = true
40+
install_types = true
41+
non_interactive = true
42+
43+
44+
[tool.pytest.ini_options]
45+
addopts = ["-ra"]
46+
testpaths = ["tests"]
47+
48+
49+
[build-system]
50+
requires = ["poetry-core"]
51+
build-backend = "poetry.core.masonry.api"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""LaunchDarkly AI SDK - LangChain Provider.
2+
3+
This package provides LangChain integration for the LaunchDarkly Server-Side AI SDK.
4+
"""
5+
6+
__version__ = "0.1.0"
7+
8+
# Placeholder for future LangChain provider implementation
9+
# from ldai_langchain.langchain_provider import LangChainProvider
10+
11+
__all__ = [
12+
'__version__',
13+
# 'LangChainProvider', # Uncomment when implemented
14+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Tests for LangChain provider."""

0 commit comments

Comments
 (0)