Skip to content

Commit 5711c91

Browse files
committed
Start migrating to uv for project management
1 parent ef1b56e commit 5711c91

File tree

7 files changed

+439
-63
lines changed

7 files changed

+439
-63
lines changed

.github/workflows/cicd.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ on:
44
pull_request:
55
jobs:
66
lint:
7-
name: Lint code with black
7+
name: Lint code with ruff
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
11-
- uses: psf/black@stable
10+
- uses: actions/checkout@v4
11+
- uses: astral-sh/ruff-action@v1
12+
with:
13+
args: check pydantic2ts
1214
test:
1315
name: Run unit tests
1416
runs-on: ${{ matrix.os }}
@@ -29,13 +31,13 @@ jobs:
2931
python-version: "3.13"
3032
steps:
3133
- name: Check out repo
32-
uses: actions/checkout@v3
34+
uses: actions/checkout@v4
3335
- name: Set up Node.js 20
34-
uses: actions/setup-node@v3
36+
uses: actions/setup-node@v4
3537
with:
3638
node-version: 20
3739
- name: Set up Python ${{ matrix.python-version }}
38-
uses: actions/setup-python@v4
40+
uses: actions/setup-python@v5
3941
with:
4042
python-version: ${{ matrix.python-version }}
4143
- name: Install json-schema-to-typescript
@@ -74,9 +76,9 @@ jobs:
7476
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
7577
needs: test
7678
steps:
77-
- uses: actions/checkout@v3
79+
- uses: actions/checkout@v4
7880
- name: Set up Python 3.9
79-
uses: actions/setup-python@v4
81+
uses: actions/setup-python@v5
8082
with:
8183
python-version: 3.9
8284
- name: Install dependencies

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

pydantic2ts/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from pydantic2ts.cli.script import generate_typescript_defs
2+
3+
__all__ = ("generate_typescript_defs",)

pyproject.toml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
[project]
2+
name = "pydantic-to-typescript"
3+
version = "2.0.0"
4+
description = "Convert pydantic models to typescript interfaces"
5+
authors = [
6+
{name = "Phillip Dupuis", email = "phillip_dupuis@alumni.brown.edu"},
7+
]
8+
license = {text = "MIT"}
9+
readme = "README.md"
10+
requires-python = ">=3.8"
11+
keywords = ["pydantic", "typescript", "annotations", "validation", "interface"]
12+
classifiers = [
13+
"Development Status :: 5 - Production/Stable",
14+
"License :: OSI Approved :: MIT License",
15+
"Programming Language :: Python",
16+
"Programming Language :: Python :: 3",
17+
"Programming Language :: Python :: 3 :: Only",
18+
"Programming Language :: Python :: 3.8",
19+
"Programming Language :: Python :: 3.9",
20+
"Programming Language :: Python :: 3.10",
21+
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
24+
]
25+
dependencies = [
26+
"pydantic",
27+
]
28+
29+
[project.urls]
30+
Homepage = "https://github.com/phillipdupuis/pydantic-to-typescript"
31+
Repository = "https://github.com/phillipdupuis/pydantic-to-typescript"
32+
33+
[project.scripts]
34+
pydantic2ts = "pydantic2ts.cli.script:main"
35+
36+
[project.optional-dependencies]
37+
dev = [
38+
"pytest",
39+
"pytest-cov",
40+
"coverage",
41+
"ruff",
42+
]
43+
44+
[build-system]
45+
requires = ["hatchling"]
46+
build-backend = "hatchling.build"
47+
48+
[tool.hatch.build.targets.wheel]
49+
packages = ["pydantic2ts"]
50+
51+
[tool.ruff]
52+
line-length = 100
53+
indent-width = 4
54+
55+
[tool.ruff.format]
56+
quote-style = "double"
57+
58+
[tool.ruff.lint]
59+
select = ["E", "F", "I", "B", "W"]
60+
fixable = ["ALL"]
61+
ignore = ["E501"]

ruff.toml

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

setup.py

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

0 commit comments

Comments
 (0)