Skip to content

Commit 6014b90

Browse files
authored
Merge pull request #13 from iNishant/devin/1744449785-replace-pip-with-uv
feat: Replace pip with uv for dependency installation
2 parents 721e406 + f430b9e commit 6014b90

File tree

7 files changed

+73
-34
lines changed

7 files changed

+73
-34
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ jobs:
1919
uses: actions/setup-python@v3
2020
with:
2121
python-version: "3.9"
22-
- name: Install dependencies
22+
- name: Install uv and dependencies
2323
run: |
24-
python -m pip install --upgrade pip
25-
pip install -r dev-requirements.txt
24+
curl -LsSf https://astral.sh/uv/install.sh | sh
25+
source "$HOME/.cargo/env"
26+
# Install build/dev dependencies needed for release
27+
uv pip install --system .[dev]
2628
- name: Build and release
2729
run: |
2830
python -m build

.github/workflows/test.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ jobs:
4343
uses: actions/setup-python@v4
4444
with:
4545
python-version: ${{ matrix.python-version }}
46-
- name: Install dependencies
46+
- name: Install uv and dependencies
4747
run: |
48-
python -m pip install --upgrade pip
49-
pip install -r requirements.txt
50-
pip install -r dev-requirements.txt
51-
pip install Django==${{ matrix.django-version }}
48+
curl -LsSf https://astral.sh/uv/install.sh | sh
49+
source "$HOME/.cargo/env"
50+
# Install main dependencies, dev dependencies, and the specific Django version for the matrix
51+
# Using -e .[dev] installs the current package in editable mode with dev extras
52+
uv pip install --system -e .[dev]
53+
uv pip install --system Django==${{ matrix.django-version }}
5254
- name: Run tests
5355
run: |
5456
./check-lint.sh

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Supports only Postgres as of now
1010
## Installation
1111

1212
```bash
13-
pip install django-querysets-single-query-fetch
13+
uv pip install django-querysets-single-query-fetch
1414
```
1515

1616
## Usage

dev-requirements.txt

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

pyproject.toml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[build-system]
2+
requires = ["setuptools>=42"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "django-querysets-single-query-fetch"
7+
version = "0.0.12"
8+
description = "Execute multiple Django querysets in a single SQL query"
9+
readme = "README.md"
10+
requires-python = ">=3.9"
11+
license = "Apache-2.0" # SPDX identifier
12+
authors = [
13+
{ name = "Nishant Singh", email = "[email protected]" }
14+
]
15+
classifiers = [
16+
"Development Status :: 4 - Beta", # Assuming based on version < 1.0
17+
"Framework :: Django",
18+
"Framework :: Django :: 4.0",
19+
"Framework :: Django :: 4.1",
20+
"Framework :: Django :: 4.2",
21+
"Framework :: Django :: 5.0",
22+
"Framework :: Django :: 5.1",
23+
"Intended Audience :: Developers",
24+
"Operating System :: OS Independent",
25+
"Programming Language :: Python :: 3",
26+
"Programming Language :: Python :: 3.9",
27+
"Programming Language :: Python :: 3.10",
28+
"Programming Language :: Python :: 3.11",
29+
"Topic :: Database",
30+
"Topic :: Software Development :: Libraries :: Python Modules",
31+
]
32+
dependencies = [
33+
"django>=4.0,<5.2", # From setup.py
34+
"psycopg2==2.9.9" # Keep specific version for now
35+
]
36+
37+
[project.urls]
38+
Homepage = "https://github.com/iNishant/django-querysets-single-query-fetch"
39+
Repository = "https://github.com/iNishant/django-querysets-single-query-fetch"
40+
41+
[project.optional-dependencies]
42+
dev = [
43+
"ruff==0.3.7",
44+
"model-bakery==1.17.0",
45+
"build==1.2.1",
46+
"twine==5.0.0",
47+
"mypy==1.10.0",
48+
"mypy-extensions==1.0.0"
49+
]
50+
51+
[tool.ruff]
52+
53+
[tool.setuptools.packages.find]
54+
include = ["django_querysets_single_query_fetch*"]
55+
exclude = ["testapp*", "testproject*"]
56+
57+
# Assuming default ruff config unless specified elsewhere
58+
59+
[tool.mypy]
60+
# Assuming default mypy config unless specified elsewhere

requirements.txt

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

setup.py

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

0 commit comments

Comments
 (0)