From f9e3df3d6fb558800e29892dde93fa3b1c3f96b1 Mon Sep 17 00:00:00 2001 From: 0xUnicorn <17219001+0xUnicorn@users.noreply.github.com> Date: Tue, 27 May 2025 01:34:29 +0200 Subject: [PATCH 1/2] Create bootstrap optional dependency for 'factory_boy', due to being used in both dev (bootstrap script) and test --- pyproject.toml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aca489e47..0627b53ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ dependencies = [ "asyncio==3.4.3", "commonmark==0.9.1", "conference-scheduler==3.0.1", - "django-allauth[mfa]==65.8.0", + "django-allauth[mfa]==65.8.1", "django-bootstrap5==25.1", "django-colorfield==0.14.0", "django-cors-headers==4.7.0", @@ -54,7 +54,13 @@ dependencies = [ ] [project.optional-dependencies] + +bootstrap = [ + "factory_boy==3.3.3", +] + dev = [ + "bornhack-website[bootstrap]", "pre-commit==4.2.0", "setuptools_scm==8.3.1", "django-debug-toolbar==5.2.0", @@ -64,14 +70,15 @@ dev = [ ] test = [ + "bornhack-website[bootstrap]", "beautifulsoup4==4.13.4", "coverage==7.8.0", - "factory_boy==3.3.3", "hypothesis==6.131.15", "beautifulsoup4==4.13.4", "unittest-xml-reporting==3.2.0", ] + [project.urls] homepage = "https://github.com/bornhack/bornhack-website" From b14d545a7b9568339e6acae6391cf66728df29b9 Mon Sep 17 00:00:00 2001 From: 0xUnicorn <17219001+0xUnicorn@users.noreply.github.com> Date: Tue, 27 May 2025 01:43:43 +0200 Subject: [PATCH 2/2] Update description about python virtual env and update how to install the pip package dependencies from 'pyproject.toml' instead of the old requirements.txt file. --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3462202d5..932edcb02 100644 --- a/README.md +++ b/README.md @@ -56,9 +56,9 @@ If you already cloned the repository without --recursive, you can change into th git submodule update --init --recursive #### Virtualenv -Create a Python 3.7 virtual environment and activate it: +Create a Python >= 3.11 virtual environment and activate it: ``` -$ virtualenv venv -p python3.7 +$ virtualenv venv $ source venv/bin/activate ``` @@ -84,6 +84,7 @@ Install system dependencies (method depends on OS): - OpenBSD: pkg_add libmagic - macOS: brew install libmagic - GDAL (might already be installed) + - Arch: gdal - macOS: brew install gdal - wkhtmltopdf (also for pdf generation): - OpenBSD: pkg_add wkhtmltopdf @@ -100,7 +101,7 @@ Install system dependencies (method depends on OS): #### Python packages Install pip packages: ``` -(venv) $ pip install -r src/requirements/dev.txt +(venv) $ pip install .[dev] ``` #### Postgres