Skip to content

Commit fc03c3a

Browse files
committed
Merge master into remove-speakers branch and resolve conflicts
- Resolved modify/delete conflicts by keeping speakers app deletion - Updated CLAUDE.md to remove references to speakers/sessions functionality - Merged latest changes from master including CI/CD improvements
2 parents e37ccab + 5fd17c9 commit fc03c3a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+786
-191
lines changed

.github/workflows/test.yml

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,58 @@ name: Test packages
22
on: [push, pull_request, workflow_dispatch]
33

44
jobs:
5-
build:
6-
name: Execute tests
5+
test:
6+
name: Run code quality checks and tests
77
runs-on: ubuntu-latest
8+
9+
services:
10+
postgres:
11+
image: postgres:17
12+
env:
13+
POSTGRES_PASSWORD: postgres
14+
POSTGRES_DB: test_db
15+
options: >-
16+
--health-cmd pg_isready
17+
--health-interval 10s
18+
--health-timeout 5s
19+
--health-retries 5
20+
ports:
21+
- 5432:5432
22+
823
env:
924
DJANGO_SETTINGS_MODULE: pythonie.settings.tests
25+
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test_db
26+
1027
steps:
11-
- uses: actions/checkout@v2
12-
- name: Set Up Python 3.12
13-
uses: actions/setup-python@v2
28+
- uses: actions/checkout@v4
29+
30+
- name: Set up Python 3.13
31+
uses: actions/setup-python@v5
1432
with:
15-
python-version: "3.12"
16-
- name: Install the dependencies
33+
python-version: "3.13"
34+
cache: 'pip'
35+
cache-dependency-path: |
36+
requirements/main.txt
37+
requirements/dev.txt
38+
requirements/production.txt
39+
40+
- name: Install dependencies
1741
run: |
1842
python -m pip install --upgrade pip setuptools uv
19-
python -m uv pip install -r requirements/main.txt -r requirements/dev.txt
20-
- name: Run the tests
43+
python -m uv pip install -r requirements/main.txt -r requirements/dev.txt -r requirements/production.txt
44+
45+
- name: Check code formatting with Ruff
46+
run: |
47+
python -m ruff format --check pythonie
48+
49+
- name: Lint code with Ruff
50+
run: |
51+
python -m ruff check pythonie
52+
53+
- name: Check for security vulnerabilities
54+
run: |
55+
python -m pip_audit
56+
57+
- name: Run Django tests
2158
run: |
2259
python pythonie/manage.py test pythonie --verbosity=2

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,20 @@ project.db
6464
# Virtualenv folders
6565
*venv/
6666

67+
# Environment files with sensitive credentials
68+
.envrc
69+
development.env
70+
production.env
71+
72+
# Database dumps and local databases
73+
*.dump
74+
*.duckdb
75+
76+
# Local settings
77+
pythonie/pythonie/settings/pgdev.py
78+
79+
# MinIO data directory
80+
mc/
81+
82+
# Personal notes
83+
TODO.md

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
python 3.13.9
1+
python 3.13.11
22
task 3.37.2

CLAUDE.md

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Project Overview
66

7-
This is the Python Ireland (python.ie / pycon.ie) website, built with Django 5.2 and Wagtail CMS 7.2. It manages content for the Python Ireland community including meetups, sponsors, speakers, and PyCon talks/sessions.
7+
This is the Python Ireland (python.ie / pycon.ie) website, built with Django 6.0 and Wagtail CMS 7.2. It manages content for the Python Ireland community including meetups and sponsors.
88

99
### Python Version
1010

11-
This project requires **Python 3.13**. All code must be compatible with Python 3.13. When developing locally without Docker, ensure you are using Python 3.13.x.
11+
This project requires **Python 3.13.11** (or any Python 3.13.x). All code must be compatible with Python 3.13. When developing locally without Docker, ensure you are using Python 3.13.x.
1212

1313
## Architecture
1414

@@ -19,7 +19,6 @@ The project follows a modular Django app structure within the `pythonie/` direct
1919
- **core**: Base Wagtail pages (HomePage, SimplePage) with StreamField content blocks. Implements PageSegment snippets and mixins (MeetupMixin, SponsorMixin) for common functionality.
2020
- **meetups**: Manages Meetup.com integration for Python Ireland meetups. Includes a management command `updatemeetups` to sync with Meetup API.
2121
- **sponsors**: Sponsor management with SponsorshipLevel relationships.
22-
- **speakers**: Speaker and Session (talk/workshop) management for conferences. Includes Sessionize integration via management commands (`import-sessionize`, `update-sessionize-json-stream`).
2322

2423
### Settings Configuration
2524

@@ -42,8 +41,8 @@ Always specify settings module: `--settings=pythonie.settings.dev` (or `tests`,
4241

4342
### Key Dependencies
4443

45-
- Django ~5.2.0
46-
- Wagtail ~7.2.0 (CMS framework)
44+
- Django 6.0
45+
- Wagtail 7.2.1 (CMS framework)
4746
- Redis (caching, configured via `REDISCLOUD_URL`)
4847
- WhiteNoise (static file serving)
4948
- boto3/django-storages (S3 integration)
@@ -208,26 +207,13 @@ task heroku:maintenance:on
208207
task heroku:maintenance:off
209208
```
210209

211-
### Conference Management
212-
213-
```bash
214-
# Import speakers/sessions from Sessionize
215-
task pycon:import:sessionize
216-
# or: docker compose run web python pythonie/manage.py import-sessionize --file sessionize.xlsx
217-
218-
# Update from Sessionize JSON stream
219-
task pycon:import:sessionize:json
220-
```
221-
222210
## Important Implementation Notes
223211

224212
### Wagtail Page Models
225213

226214
All page types inherit from `wagtail.models.Page`. The page tree structure:
227215
- HomePage (root, can have child HomePage or SimplePage)
228216
- SimplePage
229-
- SpeakersPage → Speaker pages
230-
- TalksPage → Session pages
231217

232218
Pages use StreamFields for flexible content blocks (heading, paragraph, video, image, slide, html).
233219

@@ -260,7 +246,7 @@ Tests use `pythonie.settings.tests` which configures SQLite and mock Redis. Run
260246

261247
### Deployment
262248

263-
The project is hosted on Heroku.
249+
The project is hosted on Heroku using the **heroku-24** stack with PostgreSQL 17.
264250

265251
### Upgrading Wagtail
266252

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ refactor/simplify-sponsor-model
158158

159159
### Python
160160

161-
- **Python version**: 3.13 (strict requirement)
161+
- **Python version**: 3.13.11 (or any Python 3.13.x - strict requirement)
162162
- **Formatter**: Ruff
163163
- **Line length**: 88 characters (Ruff default)
164164
- **Imports**: Sorted automatically by Ruff

DEVELOPMENT.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222

2323
### Tech Stack
2424

25-
- **Framework**: Django 5.2.8
26-
- **CMS**: Wagtail 7.2
27-
- **Python**: 3.13 (required)
25+
- **Framework**: Django 6.0
26+
- **CMS**: Wagtail 7.2.1
27+
- **Python**: 3.13.11 (or any Python 3.13.x - required)
2828
- **Database**: PostgreSQL 17 (prod and dev via Docker)
2929
- **Cache**: Redis 6.2
3030
- **Storage**: AWS S3 (prod), Local (dev)
3131
- **Server**: Gunicorn (prod), Runserver (dev)
3232
- **Containerization**: Docker + docker-compose
3333
- **Automation**: Task (Taskfile.yaml)
34-
- **Deployment**: Heroku
34+
- **Deployment**: Heroku (heroku-24 stack)
3535

3636
### Project Statistics
3737

@@ -105,7 +105,7 @@ pythonie/
105105

106106
### Prerequisites
107107

108-
- Python 3.13 (required)
108+
- Python 3.13.11 (or any Python 3.13.x - required)
109109
- Docker + docker-compose
110110
- Task (or Make)
111111
- Git
@@ -1441,6 +1441,7 @@ pythonie/pythonie/wsgi.py # WSGI application
14411441
---
14421442

14431443
**Last updated**: 2025
1444-
**Django Version**: 5.2.8
1445-
**Wagtail Version**: 7.2
1446-
**Python Version**: 3.13
1444+
**Django Version**: 6.0
1445+
**Wagtail Version**: 7.2.1
1446+
**Python Version**: 3.13.11
1447+
**Heroku Stack**: heroku-24

README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Python Ireland Website
22

3-
Website for Python Ireland (python.ie / pycon.ie) community, built with Django 5.2 and Wagtail CMS 7.2. Manages meetups, sponsors, speakers, and conference sessions.
3+
Website for Python Ireland (python.ie / pycon.ie) community, built with Django 6.0 and Wagtail CMS 7.2. Manages meetups, sponsors, speakers, and conference sessions.
44

55
## Prerequisites
66

77
- Python 3.13 (see `.tool-versions`)
88
- Docker & Docker Compose (for containerized development - recommended)
99
- [Task](https://taskfile.dev/) (optional but recommended)
1010
- Redis (only for local non-Docker development)
11+
- Environment variables file as per [the instructions here](#environment-variables)
1112

1213
## Quick Start (Docker - Recommended)
1314

@@ -27,19 +28,24 @@ Website for Python Ireland (python.ie / pycon.ie) community, built with Django 5
2728
task django:migrate
2829
```
2930

30-
4. Create a superuser:
31+
4. Generate sample data (creates pages, navigation, meetups):
32+
```bash
33+
docker compose run --rm web python pythonie/manage.py generate_sample_data --settings=pythonie.settings.dev
34+
```
35+
36+
5. Create a superuser:
3137
```bash
3238
docker compose run --rm web python pythonie/manage.py createsuperuser --settings=pythonie.settings.dev
3339
```
3440

35-
5. Start the development server:
41+
6. Start the development server:
3642
```bash
3743
task run
3844
# or: docker compose run --rm --service-ports web python pythonie/manage.py runserver 0.0.0.0:8000
3945
```
4046

41-
6. Visit http://127.0.0.1:8000/ in your browser
42-
7. Access Wagtail admin at http://127.0.0.1:8000/admin/
47+
7. Visit http://127.0.0.1:8000/ to see the site with sample content
48+
8. Access Wagtail admin at http://127.0.0.1:8000/admin/
4349

4450
## Local Setup (Without Docker)
4551

@@ -52,11 +58,13 @@ If you prefer to develop without Docker:
5258
5. Activate the virtualenv: `source pythonie-venv/bin/activate`
5359
6. Install dependencies: `pip install -r requirements.txt` (or `uv pip install -r requirements.txt`)
5460
7. Set up the database: `python pythonie/manage.py migrate --settings=pythonie.settings.dev`
55-
8. Create a superuser: `python pythonie/manage.py createsuperuser --settings=pythonie.settings.dev`
56-
9. Install and run Redis server locally: `redis-server`
57-
10. Set Redis environment variable: `export REDISCLOUD_URL=127.0.0.1:6379`
58-
11. Run the server: `python pythonie/manage.py runserver --settings=pythonie.settings.dev`
59-
12. Visit http://127.0.0.1:8000/admin/ to log in
61+
8. Generate sample data: `python pythonie/manage.py generate_sample_data --settings=pythonie.settings.dev`
62+
9. Create a superuser: `python pythonie/manage.py createsuperuser --settings=pythonie.settings.dev`
63+
10. Install and run Redis server locally: `redis-server`
64+
11. Set Redis environment variable: `export REDISCLOUD_URL=127.0.0.1:6379`
65+
12. Run the server: `python pythonie/manage.py runserver --settings=pythonie.settings.dev`
66+
13. Visit http://127.0.0.1:8000/ to see the site with sample content
67+
14. Visit http://127.0.0.1:8000/admin/ to log in to Wagtail admin
6068

6169
## Project Structure
6270

@@ -87,6 +95,9 @@ task django:migrate # Run migrations
8795
task django:make-migrations # Create new migrations
8896
task django:collect-static # Collect static files
8997

98+
# Sample Data (for development)
99+
python pythonie/manage.py generate_sample_data --settings=pythonie.settings.dev
100+
90101
# Testing
91102
task tests # Run test suite
92103
make docker-tests # Alternative test command
@@ -202,7 +213,7 @@ export MEETUP_KEY=your_meetup_api_key # Get from https://secure.meetup.com/meet
202213

203214
## Deployment
204215

205-
The project is deployed on Heroku. Use Task commands for database operations:
216+
The project is deployed on Heroku using the **heroku-24** stack with PostgreSQL 17. Use Task commands for database operations:
206217

207218
```bash
208219
# View backups

pythonie/core/factories.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import factory
2+
from django.utils import timezone
3+
from factory.django import DjangoModelFactory
4+
from meetups.models import Meetup
5+
from sponsors.models import SponsorshipLevel
6+
7+
from core.models import HomePage, SimplePage
8+
9+
10+
class SponsorshipLevelFactory(DjangoModelFactory):
11+
class Meta:
12+
model = SponsorshipLevel
13+
django_get_or_create = ("name",)
14+
15+
level = 100
16+
name = "Bronze"
17+
18+
19+
class MeetupFactory(DjangoModelFactory):
20+
class Meta:
21+
model = Meetup
22+
django_get_or_create = ("id",)
23+
24+
id = factory.Sequence(lambda n: f"meetup-{n}")
25+
name = "Python Ireland Meetup"
26+
description = "Monthly Python meetup in Dublin"
27+
event_url = "https://meetup.com/pythonireland/"
28+
time = factory.LazyFunction(lambda: timezone.now() + timezone.timedelta(days=30))
29+
created = factory.LazyFunction(timezone.now)
30+
rsvps = 50
31+
status = "upcoming"
32+
visibility = "public"
33+
34+
35+
class HomePageFactory(DjangoModelFactory):
36+
class Meta:
37+
model = HomePage
38+
39+
title = "Python Ireland"
40+
slug = "home"
41+
show_meetups = True
42+
body = []
43+
44+
45+
class SimplePageFactory(DjangoModelFactory):
46+
class Meta:
47+
model = SimplePage
48+
49+
title = "Sample Page"
50+
slug = "sample-page"
51+
body = []

pythonie/core/management/__init__.py

Whitespace-only changes.

pythonie/core/management/commands/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)