Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this be part of pyproject.toml?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can. uv creates this by default, given some Python toolings read this file. I will remove this and keep it in pyproject.toml, then update workflow to revert to its original version selection.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 6634c9b (#579)

39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[project]
name = "archweb"
version = "0.1.0"
description = "Archlinux website code"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arch Linux ;-)

readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"bencode-py==4.0.0",
"bleach==6.0.0",
"django==5.1.10",
"django-countries==7.6.1",
"django-csp==4.0",
"django-extensions==4.1",
"django-prometheus==2.3.1",
"feedparser==6.0.11",
"ipy==1.1",
"jsmin==3.0.1",
"markdown==3.3.7",
"parse==1.20.2",
"pgpdump==1.5",
"ptpython==2.0.4",
"requests==2.32.4",
"sqlparse==0.5.0",
"xtarfile==0.2.1",
"zstandard==0.23.0",
]

[dependency-groups]
dev = [
"flake8>=7.3.0",
"pytest>=8.4.1",
"pytest-cov>=6.2.1",
"pytest-django>=4.11.1",
]
prod = [
"pyasyncore==1.0.4",
"pyinotify==0.9.6",
"pymemcache==3.5.0",
]
19 changes: 0 additions & 19 deletions requirements.txt

This file was deleted.

4 changes: 0 additions & 4 deletions requirements_prod.txt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been moved to a UV dependency group instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that UV specific or an accepted Python PEP?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it was left out of scope when PEP-0621 was proposed. Poetry and UV move dependencies into groups, a default one that is always installed, along with optional groups of dependencies that we can install.

uv sync installs dependencies + dev dependencies
uv sync --no-dev install project dependencies without any development
uv sync --group prod installs dependencies + prod dependencies
etc.

This makes it easy for us to manage different scope of dependencies within the project

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Digging through UV's documentation a little more, dependencies are specified using Python dependency specification, and it follows PEP-621 standard, but it seems the dependency grouping spec is mainly UV-specific from what I understood.

This file was deleted.

4 changes: 0 additions & 4 deletions requirements_test.txt

This file was deleted.

Loading