Skip to content

Commit c384ec6

Browse files
committed
refactor: replace poetry with uv
1 parent 28d5c87 commit c384ec6

9 files changed

Lines changed: 698 additions & 930 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
pull_request:
5-
branches: [main]
5+
branches: [ main ]
66
push:
7-
branches: [main]
7+
branches: [ main ]
88

99
jobs:
1010
build:
@@ -15,58 +15,56 @@ jobs:
1515
- name: Checkout repository
1616
uses: actions/checkout@v4
1717

18-
- name: Setup Python
19-
uses: actions/setup-python@v5
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
2020
with:
21-
python-version: "3.11"
21+
version: "0.7.9"
2222

23-
- name: Install Poetry
24-
uses: snok/install-poetry@v1
23+
- name: "Set up Python"
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version-file: "pyproject.toml"
2527

2628
- name: Install dependencies
27-
run: poetry install
29+
run: uv sync --locked --all-extras --dev
2830

2931
- name: Lint
30-
run: poetry run black --check .
32+
run: uv run black --check .
3133

3234
- name: Build
33-
run: poetry build
35+
run: uv build
3436

35-
# the `coverage xml -i` command is needed to re-write the
36-
# coverage report with relative paths
3737
- name: Test
38-
run: |
39-
poetry run pytest --cov src --cov-report xml tests
40-
poetry run coverage xml -i
38+
run: uv run pytest
4139

4240
test:
4341
name: Test
4442
runs-on: ubuntu-24.04
4543
strategy:
4644
fail-fast: false
4745
matrix:
48-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
49-
poetry-version: ["1.8.2"]
46+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
5047

5148
steps:
5249
- name: Checkout repository
5350
uses: actions/checkout@v4
5451

52+
- name: Install uv
53+
uses: astral-sh/setup-uv@v5
54+
with:
55+
version: "0.7.9"
56+
5557
- name: Setup python
5658
uses: actions/setup-python@v5
5759
with:
5860
python-version: "${{ matrix.python-version }}"
5961

60-
- name: Install Poetry
61-
uses: snok/install-poetry@v1
62-
with:
63-
version: "${{ matrix.poetry-version }}"
6462

6563
- name: Install dependencies
66-
run: poetry install
64+
run: uv sync --locked --all-extras --dev
6765

6866
- name: Build
69-
run: poetry build
67+
run: uv build
7068

7169
- name: Test
72-
run: poetry run tox
70+
run: uv run pytest

poetry.lock

Lines changed: 0 additions & 853 deletions
This file was deleted.

pyproject.toml

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,51 @@
1-
[tool.poetry]
1+
[project]
22
name = "fds.sdk.utils"
33
version = "2.1.0"
44
description = "Utilities for interacting with FactSet APIs."
5-
authors = ["FactSet Research Systems"]
6-
license = "Apache-2.0"
5+
authors = [{ name = "FactSet Research Systems" }]
6+
requires-python = ">=3.9.0,<4"
77
readme = "README.md"
8-
homepage = "https://developer.factset.com"
8+
license = "Apache-2.0"
99
keywords = [
1010
"FactSet",
1111
"API",
12-
"SDK"
12+
"SDK",
13+
]
14+
dependencies = [
15+
"requests-oauthlib>=2.0.0,<3",
16+
"requests>=2.32.3,<3",
17+
"oauthlib>=3.2.2,<4",
18+
"joserfc>=1.1.0,<2",
1319
]
14-
packages = [
15-
{ include = "fds", from = "src" }
20+
21+
[project.urls]
22+
Homepage = "https://developer.factset.com"
23+
24+
[dependency-groups]
25+
dev = [
26+
"black>=25.1.0,<26",
27+
"pytest>=8.4.0,<9",
28+
"pytest-cov>=6.1.1,<7",
29+
"pytest-mock>=3.14.1,<4"
1630
]
31+
32+
[tool.hatch.build.targets.sdist]
33+
include = ["src/fds"]
1734
exclude = ["tests"]
1835

19-
[tool.poetry.dependencies]
20-
python = "^3.8.0"
21-
requests-oauthlib = "^2.0.0"
22-
requests = "^2.28.2"
23-
oauthlib = "^3.2.2"
24-
joserfc = ">=0.9,<1.1"
25-
26-
[tool.poetry.dev-dependencies]
27-
pytest = "^8.3.5"
28-
black = "^24.8.0"
29-
pytest-cov = "^5.0.0"
30-
pytest-mock = "^3.11.1"
31-
tox = "^4.25.0"
32-
tox-gh-actions = "^3.3.0"
36+
[tool.hatch.build.targets.wheel]
37+
include = ["src/fds"]
38+
exclude = ["tests"]
39+
40+
[tool.hatch.build.targets.wheel.sources]
41+
"src/fds" = "fds"
42+
43+
[build-system]
44+
requires = ["hatchling"]
45+
build-backend = "hatchling.build"
3346

3447
[tool.black]
3548
line-length = 120
3649

37-
[build-system]
38-
requires = ["poetry-core"]
39-
build-backend = "poetry.core.masonry.api"
50+
[tool.pytest.ini_options]
51+
addopts = "--cov=fds --cov-report xml"

src/fds/__init__.py

Whitespace-only changes.

src/fds/sdk/__init__.py

Whitespace-only changes.

src/fds/sdk/utils/__init__.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/__init__.py

Whitespace-only changes.

tox.ini

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)