Skip to content

feat: Replace pip with uv for dependency installation #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -19,10 +19,12 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
- name: Install uv and dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
curl -LsSf https://astral.sh/uv/install.sh | sh
source "$HOME/.cargo/env"
# Install build/dev dependencies needed for release
uv pip install --system .[dev]
- name: Build and release
run: |
python -m build
12 changes: 7 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -43,12 +43,14 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install uv and dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r dev-requirements.txt
pip install Django==${{ matrix.django-version }}
curl -LsSf https://astral.sh/uv/install.sh | sh
source "$HOME/.cargo/env"
# Install main dependencies, dev dependencies, and the specific Django version for the matrix
# Using -e .[dev] installs the current package in editable mode with dev extras
uv pip install --system -e .[dev]
uv pip install --system Django==${{ matrix.django-version }}
- name: Run tests
run: |
./check-lint.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ Supports only Postgres as of now
## Installation

```bash
pip install django-querysets-single-query-fetch
uv pip install django-querysets-single-query-fetch
```

## Usage
6 changes: 0 additions & 6 deletions dev-requirements.txt

This file was deleted.

60 changes: 60 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[build-system]
requires = ["setuptools>=42"]
build-backend = "setuptools.build_meta"

[project]
name = "django-querysets-single-query-fetch"
version = "0.0.12"
description = "Execute multiple Django querysets in a single SQL query"
readme = "README.md"
requires-python = ">=3.9"
license = "Apache-2.0" # SPDX identifier
authors = [
{ name = "Nishant Singh", email = "nishant.singh@mydukaan.io" }
]
classifiers = [
"Development Status :: 4 - Beta", # Assuming based on version < 1.0
"Framework :: Django",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Database",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"django>=4.0,<5.2", # From setup.py
"psycopg2==2.9.9" # Keep specific version for now
]

[project.urls]
Homepage = "https://github.com/iNishant/django-querysets-single-query-fetch"
Repository = "https://github.com/iNishant/django-querysets-single-query-fetch"

[project.optional-dependencies]
dev = [
"ruff==0.3.7",
"model-bakery==1.17.0",
"build==1.2.1",
"twine==5.0.0",
"mypy==1.10.0",
"mypy-extensions==1.0.0"
]

[tool.ruff]

[tool.setuptools.packages.find]
include = ["django_querysets_single_query_fetch*"]
exclude = ["testapp*", "testproject*"]

# Assuming default ruff config unless specified elsewhere

[tool.mypy]
# Assuming default mypy config unless specified elsewhere
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

17 changes: 0 additions & 17 deletions setup.py

This file was deleted.