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
30 changes: 13 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,38 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6

- name: Set up Python 3.11
uses: actions/setup-python@v4
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.11"
python-version: "3.12"

- name: Cache pip
uses: actions/cache@v3
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
enable-cache: true

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel setuptools twine check-manifest
XDG_CACHE_HOME=/cache pip install -e ".[dev]"
uv sync
uv pip install build twine check-manifest

- name: Check manifest
run: check-manifest
run: uv run check-manifest

- name: Build package
run: |
python setup.py sdist bdist_wheel
uv run python -m build
ls -l dist

- name: Upload to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine check dist/*
twine upload dist/*
uv run twine check dist/*
uv run twine upload dist/*

artifacts:
paths:
Expand Down
56 changes: 24 additions & 32 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,59 @@ on:
push:
branches: [main, master]
paths-ignore:
- "exhibitors/locale/**"
- "exhibitors/static/**"
- "eventyay_exhibition/locale/**"
- "eventyay_exhibition/static/**"
pull_request:
branches: [main, master]
paths-ignore:
- "exhibitors/locale/**"
- "exhibitors/static/**"
- "eventyay_exhibition/locale/**"
- "eventyay_exhibition/static/**"

jobs:
ruff:
name: ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6

- name: Set up Python 3.11
uses: actions/setup-python@v4
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.11"
python-version: "3.12"

- name: Cache pip
uses: actions/cache@v3
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
enable-cache: true

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]" psycopg2-binary
pip install ruff
uv sync
uv pip install psycopg2-binary ruff

- name: Run ruff (import sorting)
run: ruff check --select I .
run: uv run ruff check --select I .

flake:
name: flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6

- name: Set up Python 3.11
uses: actions/setup-python@v4
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.11"
python-version: "3.12"

- name: Cache pip
uses: actions/cache@v3
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
enable-cache: true

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]" psycopg2-binary
pip install flake8
uv sync
uv pip install psycopg2-binary

- name: Run flake8
run: flake8 .
run: uv run flake8 .
63 changes: 41 additions & 22 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,72 @@ on:
push:
branches: [main, master]
paths-ignore:
- "exhibitors/locale/**"
- "exhibition/locale/**"
pull_request:
branches: [main, master]
paths-ignore:
- "exhibitors/locale/**"
- "exhibition/locale/**"

jobs:
test:
runs-on: ubuntu-latest
name: Exhibitors Plugin Tests

services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: eventyay-db
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Checkout exhibitors plugin
uses: actions/checkout@v3
- name: Checkout eventyay_exhibition plugin
uses: actions/checkout@v6

- name: Clone eventyay-tickets
- name: Clone eventyay
run: |
git clone https://github.com/fossasia/eventyay-tickets.git ../eventyay-tickets
git clone https://github.com/fossasia/eventyay.git ../eventyay

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.11"
python-version: "3.12"

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y gettext libjpeg-dev zlib1g-dev libpq-dev

- name: Set up virtual environment
- name: Set up eventyay environment
run: |
python -m venv venv
source venv/bin/activate
pip install --upgrade pip

# Install eventyay-tickets with dev dependencies
cd ../eventyay-tickets
pip install -e ".[dev]"
cd ../eventyay/app
uv sync --all-extras --all-groups

# Go back to plugin directory and install it
cd ../eventyay-tickets-exhibitors
pip install -e .
# Install exhibition plugin in the eventyay environment
uv pip install -e ../../eventyay-exhibition

- name: Compile translations
run: |
source venv/bin/activate
make

- name: Run tests
env:
EVY_RUNNING_ENVIRONMENT: testing
EVY_POSTGRES_HOST: localhost
EVY_POSTGRES_PORT: 5432
EVY_POSTGRES_USER: postgres
EVY_POSTGRES_PASSWORD: postgres
EVY_POSTGRES_DB: eventyay-db
run: |
source venv/bin/activate
pytest tests --reruns 3
cd ../eventyay/app
uv run pytest ../../eventyay-exhibition/tests --reruns 3
4 changes: 2 additions & 2 deletions .update-locales.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ if ! command -v wlc >/dev/null 2>&1; then
exit 1
fi

COMPONENTS=pretix/pretix-plugin-exhibitors
DIR=exhibitors/locale
COMPONENTS=eventyay/eventyay-exhibition
DIR=eventyay_exhibition/locale
# Renerates .po files used for translating the plugin
set -e
set -x
Expand Down
6 changes: 3 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
recursive-include exhibitors/static *
recursive-include exhibitors/templates *
recursive-include exhibitors/locale *
recursive-include eventyay_exhibition/static *
recursive-include eventyay_exhibition/templates *
recursive-include eventyay_exhibition/locale *
include LICENSE
exclude .gitlab-ci.yml
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
all: localecompile
LNGS:=`find exhibitors/locale/ -mindepth 1 -maxdepth 1 -type d -printf "-l %f "`
LNGS:=`find eventyay_exhibition/locale/ -mindepth 1 -maxdepth 1 -type d -printf "-l %f "`

localecompile:
django-admin compilemessages
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Exhibitors
==========================

This is a plugin for `eventyay-tickets`_.
This is a plugin for `eventyay`_.

This plugin enables to add and control exhibitors in eventyay
This plugin enables you to add and control exhibitors in eventyay

Development setup
-----------------

1. Make sure that you have a working `eventyay-tickets development setup`_.

2. Clone this repository, eg to ``local/exhibitors``.
2. Clone this repository, e.g., to ``local/eventyay-exhibition``.

3. Activate the virtual environment you use for eventyay-tickets development.

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion exhibitors/apps.py → exhibition/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class ExhibitorApp(PluginConfig):
default = True
name = "exhibitors"
name = "eventyay_exhibition"
verbose_name = _("Exhibitors")

class EventyayPluginMeta:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Generated by Django 5.2.5 on 2026-01-19 17:22

import django.db.models.deletion
from django.db import migrations, models

import exhibitors.models
from django.db import migrations, models


class Migration(migrations.Migration):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
20 changes: 14 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[project]
name = "exhibitors"
name = "eventyay-exhibition"
dynamic = ["version"]
description = "Eventyay-tickets plugin to add and manage exhibitors"
readme = "README.rst"
requires-python = ">=3.11"
requires-python = ">=3.12, <3.13"
license = {file = "LICENSE"}
keywords = ["Eventyay-tickets"]
authors = [
Expand All @@ -17,8 +17,16 @@ dependencies = [
"flake8>=7.3.0",
]

[project.optional-dependencies]
test = [
"pytest>=9.0.2",
"pytest-django>=4.9.0",
"pytest-env>=1.2.0",
"pytest-rerunfailures>=16.1",
]

[project.entry-points."pretix.plugin"]
exhibitors = "exhibitors:PretixPluginMeta"
eventyay_exhibition = "eventyay_exhibition.apps:ExhibitorApp"

[project.entry-points."distutils.commands"]
build = "pretix_plugin_build.build:CustomBuild"
Expand All @@ -30,14 +38,14 @@ requires = [
]

[project.urls]
homepage = "https://github.com/fossasia/eventyay-tickets-exhibitors"
homepage = "https://github.com/fossasia/eventyay-exhibition"

[tool.setuptools]
include-package-data = true

[tool.setuptools.dynamic]
version = {attr = "exhibitors.__version__"}
version = {attr = "eventyay_exhibition.__version__"}

[tool.setuptools.packages.find]
include = ["exhibitors*"]
include = ["eventyay_exhibition*"]
namespaces = false
13 changes: 11 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,19 @@ not_skip = __init__.py
skip = setup.py

[tool:pytest]
DJANGO_SETTINGS_MODULE = pretix.testutils.settings
DJANGO_SETTINGS_MODULE = eventyay.config.settings
testpaths = tests

[pytest_env]
EVY_RUNNING_ENVIRONMENT = testing
EVY_POSTGRES_HOST = localhost
EVY_POSTGRES_PORT = 5432
EVY_POSTGRES_USER = postgres
EVY_POSTGRES_PASSWORD = postgres
EVY_POSTGRES_DB = eventyay-db

[coverage:run]
source = exhibitors
source = eventyay_exhibition
omit = */migrations/*,*/urls.py,*/tests/*

[coverage:report]
Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import pytest
from django.utils.timezone import now
from pretix.base.models import Event, Organizer
from eventyay.base.models import Event, Organizer


@pytest.fixture
def event(db):
"""Create a test event with an organizer."""
organizer = Organizer.objects.create(name="Test Organizer", slug="test-organizer")
event = Event.objects.create(
organizer=organizer,
Expand Down
1 change: 0 additions & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import pytest
from django.core.files.uploadedfile import SimpleUploadedFile

from exhibitors.models import ExhibitorInfo


Expand Down
Loading
Loading