Compare commits

...

5 Commits

Author SHA1 Message Date
Joe Banks
fa60c4421f Merge pull request #627 from nottinghamtec/jb3/pipenv-to-uv
Migrate from pipenv to uv
2025-09-28 19:35:06 +01:00
Joe Banks
97b3663909 Add .venv to pycodestyle ignore 2025-09-28 19:28:54 +01:00
Joe Banks
50f6ff4bfd Migrate CI flows to using UV 2025-09-28 19:20:24 +01:00
Joe Banks
0945a893d5 Add uv files 2025-09-28 19:20:11 +01:00
Joe Banks
bc3611db9e Remove pipenv files 2025-09-28 19:20:03 +01:00
7 changed files with 1768 additions and 2508 deletions

View File

@@ -18,34 +18,37 @@ jobs:
- name: Install build dependencies
run: |
sudo apt-get install libcairo2-dev
- name: Set up Python
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pipenv'
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install Dependencies
run: |
python3 -m pip install --upgrade pip pipenv
pipenv install -d
# if: steps.pcache.outputs.cache-hit != 'true'
run: uv sync --locked --all-extras --dev
- name: Cache Static Files
id: static-cache
uses: actions/cache@v4
with:
path: 'pipeline/built_assets'
key: ${{ hashFiles('package-lock.json') }}-${{ hashFiles('pipeline/source_assets') }}
- uses: bahmutov/npm-install@v1
if: steps.static-cache.outputs.cache-hit != 'true'
- run: node node_modules/gulp/bin/gulp build
if: steps.static-cache.outputs.cache-hit != 'true'
- name: Basic Checks
run: |
pipenv run pycodestyle . --exclude=migrations,node_modules
pipenv run python3 manage.py check
pipenv run python3 manage.py makemigrations --check --dry-run
pipenv run python3 manage.py collectstatic --noinput
uv run pycodestyle . --exclude=.venv,migrations,node_modules
uv run python3 manage.py check
uv run python3 manage.py makemigrations --check --dry-run
uv run python3 manage.py collectstatic --noinput
- name: Run Tests
run: pipenv run pytest -n auto --cov
run: uv run pytest -n auto --cov
- uses: actions/upload-artifact@v4
if: failure()
with:
@@ -53,4 +56,4 @@ jobs:
path: screenshots/
retention-days: 5
- name: Coveralls
run: pipenv run coveralls --service=github
run: uv run coveralls --service=github

1
.python-version Normal file
View File

@@ -0,0 +1 @@
3.10

98
Pipfile
View File

@@ -1,98 +0,0 @@
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
ansicolors = "~=1.1.8"
asgiref = "~=3.3.1"
"backports.tempfile" = "~=1.0"
"backports.weakref" = "~=1.0.post1"
beautifulsoup4 = "~=4.9.3"
Brotli = "~=1.0.9"
cachetools = "~=4.2.1"
chardet = "~=4.0.0"
configparser = "~=5.0.1"
contextlib2 = "~=0.6.0.post1"
cssselect = "~=1.1.0"
cssutils = "~=1.0.2"
dj-database-url = "~=0.5.0"
dj-static = "~=0.0.6"
Django = "~=3.2"
django-debug-toolbar = "~=4.0.0"
django-filter = "~=2.4.0"
django-ical = "~=1.7.1"
django-recurrence = "~=1.10.3"
django-registration-redux = "~=2.9"
django-reversion = "~=3.0.9"
django-widget-tweaks = "~=1.4.8"
django-htmlmin = "~=0.11.0"
envparse = "*"
gunicorn = "~=22.0.0"
icalendar = "~=4.0.7"
idna = "~=3.7"
Markdown = "~=3.3.3"
msgpack = "~=1.0.2"
pep517 = "~=0.9.1"
Pillow = "~=10.0.1"
premailer = "~=3.7.0"
progress = "~=1.5"
psutil = "~=5.8.0"
psycopg2-binary = "*"
Pygments = "~=2.15.0"
pyparsing = "~=2.4.7"
PyPDF2 = "~=1.27.5"
PyPOM = "~=2.2.4"
python-dateutil = "~=2.8.1"
pytoml = "~=0.1.21"
pytz = "~=2020.5"
reportlab = "*"
requests = "~=2.32.3"
retrying = "~=1.3.3"
simplejson = "~=3.17.2"
six = "~=1.15.0"
soupsieve = "~=2.1"
sqlparse = "~=0.5.0"
static3 = "~=0.7.0"
svg2rlg = "~=0.3"
tini = "~=3.0.1"
tornado = "~=6.3"
urllib3 = "~=1.26.19"
whitenoise = "~=5.2.0"
yolk = "~=0.4.3"
zipp = "~=3.4.0"
"zope.component" = "~=4.6.2"
"zope.deferredimport" = "~=4.3.1"
"zope.deprecation" = "~=4.4.0"
"zope.event" = "~=4.5.0"
"zope.hookable" = "~=5.0.1"
"zope.proxy" = "~=4.3.5"
"zope.schema" = "~=6.0.1"
sentry-sdk = "*"
diff-match-patch = "*"
python-barcode = "*"
django-hCaptcha = "*"
importlib-metadata = "*"
django-hcaptcha = "*"
"z3c.rml" = "*"
pikepdf = "*"
django-queryable-properties = "*"
django-mass-edit = "*"
selenium = "~=4.9.1"
"zope.interface" = "*"
[dev-packages]
pycodestyle = "~=2.9.1"
coveralls = "*"
django-coverage-plugin = "*"
pytest-cov = "*"
pytest-django = "*"
pluggy = "*"
pytest-splinter = "*"
pytest = "*"
pytest-reverse = "*"
pytest-xdist = {extras = [ "psutil",], version = "*"}
PyPOM = {extras = [ "splinter",], version = "*"}
[requires]
python_version = "3.10"

2397
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

99
pyproject.toml Normal file
View File

@@ -0,0 +1,99 @@
[project]
name = "pyrigs"
version = "0.1.0"
description = "A Django-based event booking system designed for use by TEC PA and Lighting"
readme = "README.md"
requires-python = "~=3.10.0"
dependencies = [
"ansicolors~=1.1.8",
"asgiref~=3.3.1",
"backports.tempfile~=1.0",
"backports.weakref~=1.0.post1",
"beautifulsoup4~=4.9.3",
"Brotli~=1.0.9",
"cachetools~=4.2.1",
"chardet~=4.0.0",
"configparser~=5.0.1",
"contextlib2~=0.6.0.post1",
"cssselect~=1.1.0",
"cssutils~=1.0.2",
"dj-database-url~=0.5.0",
"dj-static~=0.0.6",
"Django~=3.2",
"django-debug-toolbar~=4.0.0",
"django-filter~=2.4.0",
"django-ical~=1.7.1",
"django-recurrence~=1.10.3",
"django-registration-redux~=2.9",
"django-reversion~=3.0.9",
"django-widget-tweaks~=1.4.8",
"django-htmlmin~=0.11.0",
"envparse",
"gunicorn~=22.0.0",
"icalendar~=4.0.7",
"idna~=3.7",
"Markdown~=3.3.3",
"msgpack~=1.0.2",
"pep517~=0.9.1",
"Pillow~=10.0.1",
"premailer~=3.7.0",
"progress~=1.5",
"psutil~=5.8.0",
"psycopg2-binary",
"Pygments~=2.15.0",
"pyparsing~=2.4.7",
"PyPDF2~=1.27.5",
"PyPOM~=2.2.4",
"python-dateutil~=2.8.1",
"pytoml~=0.1.21",
"pytz~=2020.5",
"reportlab",
"requests~=2.32.3",
"retrying~=1.3.3",
"simplejson~=3.17.2",
"six~=1.15.0",
"soupsieve~=2.1",
"sqlparse~=0.5.0",
"static3~=0.7.0",
"svg2rlg~=0.3",
"tini~=3.0.1",
"tornado~=6.3",
"urllib3~=1.26.19",
"whitenoise~=5.2.0",
"yolk~=0.4.3",
"zipp~=3.4.0",
"zope.component~=4.6.2",
"zope.deferredimport~=4.3.1",
"zope.deprecation~=4.4.0",
"zope.event~=4.5.0",
"zope.hookable~=5.0.1",
"zope.proxy~=4.3.5",
"zope.schema~=6.0.1",
"sentry-sdk",
"diff-match-patch",
"python-barcode",
"django-hCaptcha",
"importlib-metadata",
"django-hcaptcha",
"z3c.rml",
"pikepdf",
"django-queryable-properties",
"django-mass-edit",
"selenium~=4.9.1",
"zope.interface",
]
[dependency-groups]
dev = [
"pycodestyle~=2.9.1",
"coveralls",
"django-coverage-plugin",
"pytest-cov",
"pytest-django",
"pluggy",
"pytest-splinter",
"pytest",
"pytest-reverse",
"pytest-xdist[psutil]",
"PyPOM[splinter]",
]

View File

@@ -1,2 +1,3 @@
[pycodestyle]
max-line-length = 320
exclude = .venv

1651
uv.lock generated Normal file

File diff suppressed because it is too large Load Diff