Skip to content

Commit b9a5601

Browse files
committed
fix: consistency with other makefiles
1 parent f1b9ffe commit b9a5601

4 files changed

Lines changed: 37 additions & 51 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -170,24 +170,13 @@ jobs:
170170
steps:
171171
- uses: actions/checkout@v4
172172

173-
- name: Set up Python ${{ matrix.python-version }}
174-
uses: actions/setup-python@v5
173+
- name: Set up uv
174+
uses: astral-sh/setup-uv@6ee6290f1cbc4156c0bdd66691b2c144ef8df19a # v7.4
175175
with:
176176
python-version: ${{ matrix.python-version }}
177177

178-
- name: Install poetry
179-
uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439
180-
181-
- name: Configure poetry for local virtualenvs
182-
run: poetry config virtualenvs.in-project true
183-
184-
- name: Install server-ai dependency first
185-
working-directory: packages/sdk/server-ai
186-
run: poetry install
187-
188-
- name: Install requirements
189-
working-directory: packages/optimization
190-
run: poetry install
178+
- name: Install dependencies
179+
run: make -C packages/optimization install
191180

192181
- name: Run tests
193182
run: make -C packages/optimization test

.github/workflows/release-please.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,6 @@ jobs:
239239
with:
240240
fetch-depth: 0
241241

242-
- uses: actions/setup-python@v5
243-
with:
244-
python-version: '3.11'
245-
246-
- name: Install poetry
247-
uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439 # 7b6d33e44b4f08d7021a1dee3c044e9c253d6439
248-
249242
- uses: ./.github/actions/ci
250243
with:
251244
workspace_path: packages/optimization

packages/optimization/Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ help: #! Show this help message
99

1010
.PHONY: install
1111
install: #! Install package dependencies
12-
poetry install
12+
uv sync --all-groups
1313

1414
.PHONY: test
1515
test: #! Run unit tests
1616
test: install
17-
poetry run pytest $(PYTEST_FLAGS)
17+
uv run pytest $(PYTEST_FLAGS)
1818

1919
.PHONY: lint
2020
lint: #! Run type analysis and linting checks
2121
lint: install
22-
poetry run mypy src/ldai_optimization
23-
poetry run isort --check --atomic src/ldai_optimization
24-
poetry run pycodestyle src/ldai_optimization
22+
uv run mypy src/ldai_optimization
23+
uv run isort --check --atomic src/ldai_optimization
24+
uv run pycodestyle src/ldai_optimization
2525

2626
.PHONY: build
2727
build: #! Build distribution files
2828
build: install
29-
poetry build
29+
uv build --out-dir dist

packages/optimization/pyproject.toml

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
[tool.poetry]
1+
[project]
22
name = "launchdarkly-server-sdk-ai-optimization"
3-
version = "0.0.0"
3+
version = "0.0.0" # x-release-please-version
44
description = "LaunchDarkly AI SDK optimization helpers"
5-
authors = ["LaunchDarkly <dev@launchdarkly.com>"]
6-
license = "Apache-2.0"
5+
authors = [{name = "LaunchDarkly", email = "dev@launchdarkly.com"}]
6+
license = {text = "Apache-2.0"}
77
readme = "README.md"
8-
homepage = "https://docs.launchdarkly.com/sdk/ai/python"
9-
repository = "https://github.com/launchdarkly/python-server-sdk-ai"
8+
requires-python = ">=3.9,<4"
109
classifiers = [
1110
"Intended Audience :: Developers",
1211
"License :: OSI Approved :: Apache Software License",
@@ -20,19 +19,30 @@ classifiers = [
2019
"Topic :: Software Development",
2120
"Topic :: Software Development :: Libraries",
2221
]
23-
packages = [{ include = "ldai_optimization", from = "src" }]
22+
dependencies = [
23+
"launchdarkly-server-sdk-ai>=0.16.0",
24+
]
25+
26+
[project.urls]
27+
Homepage = "https://docs.launchdarkly.com/sdk/ai/python"
28+
Repository = "https://github.com/launchdarkly/python-server-sdk-ai"
29+
30+
[dependency-groups]
31+
dev = [
32+
"pytest>=2.8",
33+
"pytest-cov>=2.4.0",
34+
"pytest-asyncio>=0.21.0,<1.0.0",
35+
"mypy==1.18.2",
36+
"pycodestyle>=2.11.0",
37+
"isort>=5.12.0",
38+
]
2439

25-
[tool.poetry.dependencies]
26-
python = ">=3.9,<4"
27-
launchdarkly-server-sdk-ai = ">=0.16.0"
40+
[build-system]
41+
requires = ["hatchling"]
42+
build-backend = "hatchling.build"
2843

29-
[tool.poetry.group.dev.dependencies]
30-
pytest = ">=2.8"
31-
pytest-cov = ">=2.4.0"
32-
pytest-asyncio = ">=0.21.0,<1.0.0"
33-
mypy = "==1.18.2"
34-
pycodestyle = ">=2.11.0"
35-
isort = ">=5.12.0"
44+
[tool.hatch.build.targets.wheel]
45+
packages = ["src/ldai_optimization"]
3646

3747
[tool.mypy]
3848
python_version = "3.9"
@@ -45,13 +55,7 @@ profile = "black"
4555
known_third_party = ["ldai"]
4656
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
4757

48-
4958
[tool.pytest.ini_options]
5059
addopts = ["-ra"]
5160
testpaths = ["tests"]
5261
asyncio_mode = "auto"
53-
54-
55-
[build-system]
56-
requires = ["poetry-core"]
57-
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)