Skip to content
Merged
Show file tree
Hide file tree
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
103 changes: 103 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Deploy Documentation

on:
push:
branches:
- enext
- main
paths:
- 'doc/**'
- '.github/workflows/deploy-docs.yml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
enchant-2 \
libffi-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev \
gettext \
libfreetype-dev \
libjpeg-dev \
libpq-dev \
build-essential

- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd doc
# Install all dependencies (Sphinx, Django, and all packages)
bash install-all-deps.sh

- name: Build unified documentation
run: |
cd doc
# Set environment variables (conf.py handles Django setup automatically)
export DJANGO_SETTINGS_MODULE=eventyay.config.settings
export EVENTYAY_CONFIG_FILE=$(pwd)/eventyay-docs.cfg
export DATABASE_URL="sqlite:///:memory:"
export REDIS_URL="redis://localhost:6379/0"
export MPLCONFIGDIR=/tmp/matplotlib
mkdir -p $MPLCONFIGDIR
# Build documentation
make html

- name: Prepare deployment
run: |
mkdir -p _site
# Copy unified documentation (includes all components: tickets, talk, video)
echo "Copying unified documentation..."
cp -r doc/_build/html/* _site/
# Copy CNAME for custom domain (docs.eventyay.com)
cp doc/CNAME _site/
# Create .nojekyll to prevent GitHub Pages from ignoring files starting with _
touch _site/.nojekyll
# List contents for verification
echo "Documentation site structure:"
ls -la _site/

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '_site'

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

42 changes: 0 additions & 42 deletions .github/workflows/gh-pages-deploy.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ __pycache__/
.mypy_cache/
.ipython/
_static/
# Exception: Track documentation static files
!doc/_static/
!doc/talk/_static/
!doc/video/_static/
.idea
.secret
atlassian-ide-plugin.xml
Expand Down
1 change: 1 addition & 0 deletions app/eventyay/base/models/access_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class Meta:
}

class urls(EventUrls):
"""URL patterns for SubmitterAccessCode model views."""
base = edit = '{self.event.cfp.urls.access_codes}{self.code}/'
send = '{base}send'
delete = '{base}delete/'
Expand Down
1 change: 1 addition & 0 deletions app/eventyay/base/models/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ def reset_password(self, event, user=None, mail_text=None, orga=False):
reset_password.alters_data = True

class orga_urls(EventUrls):
"""URL patterns for organizer panel views related to this user."""
admin = '/orga/admin/users/{self.code}/'

@transaction.atomic
Expand Down
18 changes: 16 additions & 2 deletions app/eventyay/base/models/cfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,21 @@ def is_field_required(self, field):
return self.fields.get(field, default_fields()[field])['visibility'] == 'required'

for field in default_fields().keys():
setattr(cls, f'request_{field}', property(partial(is_field_requested, field=field)))
setattr(cls, f'require_{field}', property(partial(is_field_required, field=field)))
# Create wrapper functions with clean docstrings to avoid RST formatting issues
def make_request_getter(field_name):
def getter(self):
return is_field_requested(self, field_name)
getter.__doc__ = f"Check if {field_name} field is requested."
return getter

def make_require_getter(field_name):
def getter(self):
return is_field_required(self, field_name)
getter.__doc__ = f"Check if {field_name} field is required."
return getter

setattr(cls, f'request_{field}', property(make_request_getter(field)))
setattr(cls, f'require_{field}', property(make_require_getter(field)))
return cls


Expand Down Expand Up @@ -103,6 +116,7 @@ class CfP(PretalxModel):
fields = models.JSONField(default=default_fields)

class urls(EventUrls):
"""URL patterns for public CfP (Call for Proposals) views."""
base = '{self.event.orga_urls.cfp}'
editor = '{base}flow/'
questions = '{base}questions/'
Expand Down
6 changes: 5 additions & 1 deletion app/eventyay/base/models/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ class Event(
tickets for.

:param organizer: The organizer this event belongs to
:type organizer: Organizer
:type organizer: eventyay.base.models.organizer.Organizer
:param testmode: This event is in test mode
:type testmode: bool
:param name: This event's full title
Expand Down Expand Up @@ -807,6 +807,7 @@ class Event(
)

class urls(EventUrls):
"""URL patterns for public/frontend views of this event."""
base_path = settings.BASE_PATH
base = '{base_path}/{self.slug}/'
login = '{base}login/'
Expand Down Expand Up @@ -837,6 +838,7 @@ class urls(EventUrls):
settings_css = '{base}static/event.css'

class orga_urls(EventUrls):
"""URL patterns for organizer/admin panel views of this event."""
base_path = settings.BASE_PATH
base = '{base_path}/orga/event/{self.slug}/'
login = '{base}login/'
Expand Down Expand Up @@ -890,6 +892,7 @@ class orga_urls(EventUrls):
new_information = '{base}info/new/'

class api_urls(EventUrls):
"""URL patterns for API endpoints related to this event."""
base_path = settings.TALK_BASE_PATH
base = '{base_path}/api/events/{self.slug}/'
submissions = '{base}submissions/'
Expand All @@ -910,6 +913,7 @@ class api_urls(EventUrls):
speaker_information = '{base}speaker-information/'

class tickets_urls(EventUrls):
"""URL patterns for ticket/control panel views of this event."""
_full_base_path = settings.BASE_PATH
base_path = urlparse(_full_base_path).path.rstrip('/')
base = '{base_path}/control/'
Expand Down
1 change: 1 addition & 0 deletions app/eventyay/base/models/information.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def log_parent(self):
return self.event

class orga_urls(EventUrls):
"""URL patterns for organizer panel views of speaker information."""
base = edit = '{self.event.orga_urls.information}{self.pk}/'
delete = '{base}delete/'

Expand Down
2 changes: 2 additions & 0 deletions app/eventyay/base/models/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class Meta:
}

class urls(EventUrls):
"""URL patterns for mail template views."""
base = edit = '{self.event.orga_urls.mail_templates}{self.pk}/'
delete = '{base}delete/'

Expand Down Expand Up @@ -344,6 +345,7 @@ class Meta:
}

class urls(EventUrls):
"""URL patterns for queued mail views."""
base = edit = '{self.event.orga_urls.mail}{self.pk}/'
delete = '{base}delete'
send = '{base}send'
Expand Down
3 changes: 2 additions & 1 deletion app/eventyay/base/models/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ class PretalxModel(
metaclass=RulesModelBase,
):
"""
Base model for most pretalx models. Suitable for plugins.
Base model for most Eventyay models. Suitable for plugins.
Provides scoped object management, logging, timestamps, and file cleanup.
"""

objects = ScopedManager(event='event')
Expand Down
2 changes: 2 additions & 0 deletions app/eventyay/base/models/organizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def __str__(self) -> str:
return self.name

class orga_urls(EventUrls):
"""URL patterns for organizer panel views of this organizer."""
base_path = settings.BASE_PATH
base = '{base_path}/orga/organizer/{self.slug}/'
settings = '{base_path}/orga/organizer/{self.slug}/settings/'
Expand Down Expand Up @@ -444,6 +445,7 @@ def events(self):
return self.limit_events.all()

class orga_urls(EventUrls):
"""URL patterns for organizer panel views of this team."""
base = '{self.organizer.orga_urls.teams}{self.pk}/'
delete = '{base}delete/'

Expand Down
2 changes: 2 additions & 0 deletions app/eventyay/base/models/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ class Meta:
}

class urls(EventUrls):
"""URL patterns for public speaker profile views."""
public = '{self.event.urls.base}speaker/{self.user.code}/'
social_image = '{public}og-image'
talks_ical = '{self.urls.public}talks.ics'

class orga_urls(EventUrls):
"""URL patterns for organizer panel views of this speaker profile."""
base = '{self.event.orga_urls.speakers}{self.user.code}/'
password_reset = '{self.event.orga_urls.speakers}{self.user.code}/reset'
toggle_arrived = '{self.event.orga_urls.speakers}{self.user.code}/toggle-arrived'
Expand Down
1 change: 1 addition & 0 deletions app/eventyay/base/models/question.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ def read_only(self):
return self.freeze_after and (self.freeze_after <= now())

class urls(EventUrls):
"""URL patterns for question views."""
base = '{self.event.cfp.urls.questions}{self.pk}/'
edit = '{base}edit/'
delete = '{base}delete/'
Expand Down
3 changes: 3 additions & 0 deletions app/eventyay/base/models/review.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class ReviewScoreCategory(PretalxModel):
)

class urls(EventUrls):
"""URL patterns for review phase views."""
base = '{self.event.orga_urls.review_settings}category/{self.pk}/'
delete = '{base}delete'

Expand Down Expand Up @@ -185,6 +186,7 @@ def save(self, *args, update_score=True, **kwargs):
return super().save(*args, **kwargs)

class urls(EventUrls):
"""URL patterns for individual review views."""
base = '{self.submission.orga_urls.reviews}'
delete = '{base}delete'

Expand Down Expand Up @@ -270,6 +272,7 @@ class Meta:
ordering = ('position',)

class urls(EventUrls):
"""URL patterns for review phase management views."""
base = '{self.event.orga_urls.review_settings}phase/{self.pk}/'
delete = '{base}delete'
activate = '{base}activate'
Expand Down
1 change: 1 addition & 0 deletions app/eventyay/base/models/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ class Meta:
}

class urls(EventUrls):
"""URL patterns for room views."""
settings_base = edit = '{self.event.orga_urls.room_settings}{self.pk}/'
delete = '{settings_base}delete/'

Expand Down
1 change: 1 addition & 0 deletions app/eventyay/base/models/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class Meta:
}

class urls(EventUrls):
"""URL patterns for schedule views."""
public = '{self.event.urls.schedule}v/{self.url_version}/'
widget_data = '{public}widgets/schedule.json'
nojs = '{public}nojs'
Expand Down
2 changes: 2 additions & 0 deletions app/eventyay/base/models/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ class Meta:
}

class urls(EventUrls):
"""URL patterns for public submission views."""
user_base = '{self.event.urls.user_submissions}{self.code}/'
withdraw = '{user_base}withdraw'
discard = '{user_base}discard'
Expand All @@ -334,6 +335,7 @@ class urls(EventUrls):
review = '{self.event.urls.base}talk/review/{self.review_code}'

class orga_urls(EventUrls):
"""URL patterns for organizer panel views of this submission."""
base = edit = '{self.event.orga_urls.submissions}{self.code}/'
make_submitted = '{base}submit'
accept = '{base}accept'
Expand Down
1 change: 1 addition & 0 deletions app/eventyay/base/models/tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class Meta:
unique_together = (('event', 'tag'),)

class urls(EventUrls):
"""URL patterns for Tag model views."""
base = edit = '{self.event.orga_urls.tags}{self.pk}/'
delete = '{base}delete/'

Expand Down
1 change: 1 addition & 0 deletions app/eventyay/base/models/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class Meta:
}

class urls(EventUrls):
"""URL patterns for track views."""
base = edit = '{self.event.cfp.urls.tracks}{self.pk}/'
delete = '{base}delete/'
prefilled_cfp = '{self.event.cfp.urls.public}?track={self.slug}'
Expand Down
1 change: 1 addition & 0 deletions app/eventyay/base/models/type.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class Meta:
}

class urls(EventUrls):
"""URL patterns for submission type views."""
base = edit = '{self.event.cfp.urls.types}{self.pk}/'
default = '{base}default'
delete = '{base}delete/'
Expand Down
Loading