Skip to content

Commit

Permalink
Merge remote-tracking branch 'pretalx/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
norbusan committed Feb 15, 2024
2 parents 0daee04 + 534f59c commit c67b677
Show file tree
Hide file tree
Showing 142 changed files with 39,363 additions and 11,852 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- 'doc/**'
pull_request:
branches: [ main ]
paths-ignore:
paths:
- 'doc/**'

concurrency:
Expand All @@ -17,7 +17,7 @@ concurrency:
jobs:
spelling:
name: Spellcheck
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/strings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Strings

on:
push:
branches: [ main ]
paths:
- 'src/pretalx/locale/**'
pull_request:
branches: [ main ]
paths:
- 'src/pretalx/locale/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
compile:
runs-on: ubuntu-latest
name: Check that translation files compile
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version-file: ".github/workflows/python-version.txt"
cache: "pip"
- name: Install system dependencies
run: |
sudo apt update
sudo apt install gettext
- name: Install Python dependencies
run: python -m pip install -e ".[dev]"
- name: Compile locales
run: python manage.py compilemessages
working-directory: ./src
17 changes: 2 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ jobs:
- name: Run checks
run: python manage.py check --deploy
working-directory: ./src
- name: Compile locales
- name: Run checks
run: python manage.py compilemessages
working-directory: ./src
- name: Run tests
working-directory: ./src
run: python -m pytest -nauto -p no:sugar --reruns 3 tests
run: python -m pytest -nauto -p no:sugar --reruns 3 --cov-report=term-missing:skip-covered tests
env:
PRETALX_CONFIG_FILE: 'tests/ci_${{ matrix.database }}.cfg'
- name: Show coverage as build info
Expand All @@ -103,19 +103,6 @@ jobs:
python -m coverage report
if: matrix.database == 'postgres' && matrix.python-version == '3.10'

- name: Create HTML report if tests failed.
id: html_report
working-directory: ./src
run: python -m coverage html
if: ${{ failure() }} && matrix.database == 'postgres' && matrix.python-version == '3.10'

- name: Upload HTML report if tests failed.
uses: actions/upload-artifact@v4
with:
name: html-report
path: ./src/htmlcov
if: ${{ failure() }} && steps.html_report.conclusion != "skipped"

- name: "Make badge"
uses: schneegans/[email protected]
with:
Expand Down
12 changes: 1 addition & 11 deletions doc/administrator/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,6 @@ This command requires an event slug as an argument. You can provide the
``--zip`` flag to produce a zip archive instead of a directory structure. The
command will print the location of the HTML export upon successful exit.

``python -m pretalx import_schedule``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The ``import_schedule`` allows you to import a conference schedule xml file.
It takes the path to the xml file as its argument. If pretalx can find no event
with the specified slug in the database, it will create a new event and a new
organiser.

For existing events, pretalx will release a new schedule version instead.

``python -m pretalx create_test_event``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -172,7 +162,7 @@ in the slug, otherwise you won't be able to see the event in the web interface.

This command will move a given event (with the ``--event <event_slug>``
parameter) event. By default, the event start date will be set to the current
day, but youc can configure any date using the ``--date 2021-12-26`` argument.
day, but you can configure any date using the ``--date 2021-12-26`` argument.

Data moved includes event start and end dates and the dates of all talks, both
current and historical. No new schedule versions will need to be created.
Expand Down
5 changes: 3 additions & 2 deletions doc/administrator/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ and configuration here, but please have a look at the linked pages.
production. Given the choice, we'd recommend to use PostgreSQL.
* A `redis`_ server, if you want to use pretalx with an asynchronous task
runner or improved caching.
* If you are installing pretalx from source rather than from a pre-built
wheel on PyPI, you will also need `nodejs`_.
* `nodejs`_ and npm (usually bundled with nodejs). You'll need a currently
`supported version of nodejs`_.

We assume that you also have the usual security measures in place, such as a
firewall. If you're new to Linux and firewalls, we recommend that you start
Expand Down Expand Up @@ -331,3 +331,4 @@ If you want to read about updates, backups, and monitoring, head over to our
.. _docker-compose setup: https://github.com/pretalx/pretalx-docker
.. _pretalx.com: https://pretalx.com
.. _nodejs: https://github.com/nodesource/distributions/blob/master/README.md
.. _supported version of nodejs: https://nodejs.org/en/about/previous-releases
2 changes: 1 addition & 1 deletion doc/api/resources/answers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Answers
Resource description
--------------------

The answers resource represents all data collected by organizers via the flexible questions model, that
The answers resource represents all data collected by organisers via the flexible questions model, that
allows for nearly arbitrary data collection from speakers or reviewers. The answers endpoint includes
minimal information on the question answered: just the ID and the question. For further details, please
refer to the ``questions/`` endpoint.
Expand Down
7 changes: 4 additions & 3 deletions doc/api/resources/questions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ variant string The kind of que
target string The question scope. Can be ``speaker`` (each speaker is asked once), ``submission`` (speakers are asked per submission), or ``reviewer`` (the question is used in the review process).
question multi-lingual string The question
help_text multi-lingual string Additional text shown to help with the question. Can be Markdown.
question_required string Can be any of ``optional``, ``required``, ``after_deadline``, in which case the deadline field will be filled.
question_required string Can be any of ``optional``, ``required``, ``after_deadline``, in which case the deadline field will be filled.
deadline datetime The deadline after which speakers are required to answer the question.
required boolean Is the question required to be answered at the moment (based on ``question_required`` and the deadline)?
read_only boolean Is the question read-only at the moment (based on ``freeze_after``)?
Expand Down Expand Up @@ -108,10 +108,11 @@ Endpoints
:param event: The ``slug`` field of the event to fetch
:query page: The page number in case of a multi-page result set, default is 1
:query q: Search for a string in the questions
:query target: Filter for questions of a specific target kind, eg reviewer questions
:query variant: Filter for questions of a specific variant, eg number questions
:query target: Filter for questions of a specific target kind, e.g. reviewer questions
:query variant: Filter for questions of a specific variant, e.g. number questions
:query is_public: Filter for questions that are or are not public
:query is_visible_to_reviewers: Filter for questions that are or are not visible to reviewers

The page number in case of a multi-page result set, default is 1

.. http:get:: /api/events/(event)/questions/{id}/
Expand Down
15 changes: 14 additions & 1 deletion doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ Release Notes
=============

- :feature:`orga:sidebar` Renamed CfP to Call for Speakers for clarity
- :feature:`orga,820` Restricted tracks now link to the page where you can create access codes for that track.
- :announcement:`admin,1678` Due to its incomplete and complex nature, the ``import_schedule`` admin command has been removed. If you want to import a schedule, despite all the complexities, please use the pretalx-downstream plugin instead.
- :feature:`orga,1672` The organiser area now has a search box located in the side bar, opened after clicking the event name. It searches all events the current user has full access to (that is, not a limited reviewer account) for events, sessions and speakers.
- :feature:`orga:review,1633` Resources uploaded or linked by speakers are now shown in the review view (unless anonymous reviews are used, as resources can currently not be anonymised).
- :feature:`orga:review,1675` In order to make large events more manageable, the review dashboard is now by default paginated to 100 sessions per page. The page size can be adjusted up to showing all sessions as before (and the page size is remembered on a per-user basis).
- :feature:`orga` The default page size for paginated pages has been increased to 50.
- :feature:`orga:review` Reviewers can now review all proposals at the same time in bulk, as an alternative to reviewing them one by one.
- :feature:`orga` Organisers can now upload question options in bulk, which is particularly handy for questions with many options, like country lists.
- :feature:`orga:email,1351` pretalx now provides two new email placeholders, ``speaker_schedule_new`` (all talks changed in the current schedule, like in the notification email generated on schedule release) and ``speaker_schedule_full`` (a list of **all** scheduled sessions for that user).
- :bug:`schedule,1666` When building the social media preview card, pretalx would display a session's description rather than its abstract.
- :bug:`cfp,1660` When setting character limits on text questions, pretalx would count line breaks as two characters.
- :bug:`orga:submission,1613` The session page dropdown would sometimes include the "public link" even though it wasn't public yet. This has been fixed, and in the case of accepted or confirmed proposals that don't have a public page yet (e.g. because they're not scheduled yet), the link is marked as "public link (not public yet)".
- :bug:`cfp` When rendering email addresses in Markdown, shorter TLDs won out against longer ones (e.g. .co instead of .com, or .ro instead of .rocks). This was already fixed for normal links, just not for email addresses. Until you update to include this fix, you can instead turn emails into a link yourself: ``[[email protected]](mailto:[email protected])``.
- :feature:`orga,1619` Organisers can now add new team members in bulk instead of one by one.
- :feature:`orga:schedule,1587` A hint now shows when users click the "New break" box, informing them that they have to drag it to the schedule instead.
- :feature:`orga:schedule` Breaks now also show their start time and duration in the schedule editor.
Expand Down Expand Up @@ -50,7 +63,7 @@ Release Notes
- :bug:`admin,1579` There was a bug in the `pretalx init` command, and also too verbose output.
- :bug:`orga,1577` The printable proposal cards showed broken characters for anything outside latin1.
- :bug:`orga` Reordering questions while some of them were inactive could lead to 404 errors.
- :bug:`orga:submission` pretalx wasn't able to filter out pending state changes from the organiser proposal list.
- :bug:`orga:submission` pretalx wasn't able to filter pending state changes from the organiser proposal list.
- :bug:`lang` The schedule editor was not operational with some languages, particularly with different language code versions (pt-BR vs pt_br).
- :bug:`orga:schedule` The schedule editor would not show some specific time selectors when people expanded the timeline to see five-minute steps.
- :release:`2023.1.0 <2023-08-30>`
Expand Down
2 changes: 1 addition & 1 deletion doc/developer/interfaces/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Submissions are the most central model to pretalx, and everything else is
connected to submissions.

.. autoclass:: pretalx.submission.models.submission.Submission(*args, **kwargs)
:members: get_duration,update_duration,update_talk_slots,make_submitted,confirm,accept,reject,cancel,withdraw,delete,uuid,public_slots,slot,display_speaker_names,median_score,availabilities
:members: get_duration,update_duration,update_talk_slots,make_submitted,confirm,accept,reject,cancel,withdraw,delete,uuid,public_slots,slot,display_speaker_names,median_score,availabilities,uuid

.. autoclass:: pretalx.submission.models.review.Review(*args, **kwargs)
:members: find_missing_reviews, display_score
Expand Down
2 changes: 2 additions & 0 deletions doc/developer/plugins/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Exporters
---------

.. automodule:: pretalx.common.signals
:no-index:
:members: register_data_exporters


Expand All @@ -38,6 +39,7 @@ Organiser area
:members: nav_event, nav_global, html_head, activate_event, nav_event_settings, event_copy_data

.. automodule:: pretalx.common.signals
:no-index:
:members: activitylog_display, activitylog_object_link

Display
Expand Down
2 changes: 1 addition & 1 deletion doc/developer/plugins/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This will ask you some questions and then create a project folder for your plugi
Afterwards install your plugin into pretalx:

(env)$ cd pretalx-pluginname
(env)$ python setup.py develop
(env)$ python -m pip install -e .

If you already had it running, you'll now have to restart your pretalx dev-server
for it to recognize the new plugin.
Expand Down
56 changes: 29 additions & 27 deletions doc/maintainer/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,46 @@ You are a pretalx maintainer and want to release a new version? Hold on to your
Boarding checks
---------------

1. Are there pending migrations from `Weblate <https://translate.pretalx.com/projects/pretalx/pretalx/#repository>`_? Merge them.
2. Are the translation files up to date?
3. Are there pending checks for bad translations on Weblate?
4. If new translations were added, add new fullcalendar locales (you have to download the `release archive <https://github.com/fullcalendar/fullcalendar/releases/download/v6.1.5/fullcalendar-6.1.5.zip>`_) and extract the locales from there), and make sure that flags (in input fields) for the new locale are shown.
5. Are there warnings about missing migrations?
6. Any blockers to see `here <https://github.com/pretalx/pretalx/issues?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+bug%22+>`_?
7. Are there any TODOs that you have to be resolve?
8. Are there any ``@pytest.mark.xfail`` that you have to resolve?
9. Are the :ref:`changelog` well-phrased and complete?
10. Are there `open pull requests <https://github.com/pretalx/pretalx/pulls>`_ that you should merge?
1. Are the translation files up to date?
2. Are there pending checks for bad translations on Weblate?
3. Are there pending translations from `Weblate <https://translate.pretalx.com/projects/pretalx/pretalx/#repository>`_? Merge them.
4. Are all locales with more than 75% coverage included in the release?
5. Update the translation percentages from `translate.pretalx.com <https://translate.pretalx.com/projects/pretalx/pretalx/#translations>`_.
6. If new translations were added, add new fullcalendar locales (you have to download the `release archive <https://github.com/fullcalendar/fullcalendar/releases/download/v6.1.5/fullcalendar-6.1.5.zip>`_) and extract the locales from there), and make sure that flags (in input fields) for the new locale are shown.
7. Are there warnings about missing migrations?
8. Any blockers to see `in our issues <https://github.com/pretalx/pretalx/issues?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+bug%22+>`_?
9. Are there any TODOs that you have to resolve?
10. Are there any ``@pytest.mark.xfail`` that you have to resolve?
11. Are the :ref:`changelog` well-phrased and complete?
12. Are there `open pull requests <https://github.com/pretalx/pretalx/pulls>`_ that you should merge?

System checks
-------------

1. Are you in the branch and commit you think you are in?
2. Are all tests passing?
3. Have you deployed the release-ready commit to an instance? Did the upgrade work?
4. Have you written (and not pushed) a blog post? It should contain at least major features and all contributors involved in the release. ``git shortlog -ns vx.y.z..main``.
4. Have you written (and not pushed) a blog post? It should contain at least major features and all contributors involved in the release.
5. Have you told people who may need to know about the release ahead of time? (Plugin developers, clients, self-hosting instances, etc.)
6. Is your virtualenv active?

Take-off and landing
--------------------

1. Clone pretalx into a clean repo: ``git clone [email protected]:pretalx/pretalx pretalx-release && workon pretalx``
1. Clone pretalx into a clean repo: ``git clone [email protected]:pretalx/pretalx pretalx-release && mkvirtualenv pretalx-release && pip install -e .[dev]``
2. Run ``check-manifest`` **locally**.
3. Bump version in ``src/pretalx/__init__.py``.
4. Update the translation percentages from `here <https://translate.pretalx.com/projects/pretalx/pretalx/#translations>`_.
5. Add the release to the :ref:`changelog`.
6. Make a commit with the message ``Release vx.y.z``
7. Tag the commit: ``git tag vx.y.z -m``
8. Remove old build artefacts: ``rm -rf dist/ build/ pretalx.egg-info``
9. Build a new release: ``python -m build -n``
10. Upload the release: ``twine upload dist/pretalx-x.y.z.tar.gz``
11. Push the release: ``git push && git push --tags``
12. Install/update the package somewhere.
13. Add the release on `GitHub <https://github.com/pretalx/pretalx/releases>`_ (upload the archive you uploaded to PyPI, and add a link to the correct section of the :ref:`changelog`)
14. Push the blog post.
15. Upgrade `the docker repository <https://github.com/pretalx/pretalx-docker>`_ to the current commit **and tag the commit as vx.y.z**.
16. Increment version number to version+1.dev0 in ``src/pretalx/__init__.py``.
17. Update version numbers in update checker and deploy.
4. Add the release to the :ref:`changelog`.
5. Make a commit with the message ``Release vx.y.z``
6. Tag the commit: ``git tag vx.y.z -m``
7. Remove old build artefacts: ``rm -rf dist/ build/ pretalx.egg-info``
8. Build a new release: ``python -m build -n``
9. Upload the release: ``twine upload dist/pretalx-x.y.z.tar.gz``
10. Push the release: ``git push && git push --tags``
11. Install/update the package somewhere.
12. Add the release on `GitHub <https://github.com/pretalx/pretalx/releases>`_ (upload the archive you uploaded to PyPI, and add a link to the correct section of the :ref:`changelog`)
13. Push the blog post.
14. Upgrade `the docker repository <https://github.com/pretalx/pretalx-docker>`_ to the current commit **and tag the commit as vx.y.z**.
15. Increment version number to version+1.dev0 in ``src/pretalx/__init__.py``.
16. Update version numbers in update checker and deploy.
17. ``rm -rf pretalx-release && deactivate && rmvirtualenv pretalx-release``
18. Update any plugins waiting for the new release.
2 changes: 2 additions & 0 deletions doc/spelling_wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
anonymisation
anonymise
anonymised
Ansible
Expand Down Expand Up @@ -52,6 +53,7 @@ middleware
mixin
namespace
nginx
npm
plugin
plugins
prepend
Expand Down
13 changes: 7 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies = [
"beautifulsoup4[lxml]~=4.12.0",
"bleach~=6.1.0",
"celery~=5.3.0",
"css_inline~=0.11.0",
"css_inline~=0.13.0",
"csscompressor~=0.9.0",
"cssutils~=2.9.0",
"defusedcsv~=2.0.0",
Expand All @@ -40,24 +40,24 @@ dependencies = [
"django-context-decorator",
"django-countries~=7.0",
"django-csp~=3.7.0",
"django-filter==23.4",
"django-filter==23.5",
"django-formset-js-improved==0.5.0.3",
"django-formtools~=2.3.0",
"django-formtools~=2.5.1",
"django-hierarkey~=1.1.0",
"django-i18nfield~=1.9.0",
"django-libsass~=0.8",
"django-scopes~=2.0.0",
"djangorestframework~=3.14.0",
"libsass~=0.22.0",
"libsass~=0.23.0",
"Markdown~=3.5.0", # https://python-markdown.github.io/change_log/
# We can upgrade markdown again once django-bootstrap4 upgrades or once we drop Python 3.6 and 3.7
# 3.3.5 requires importlib-metadata>=4.4, but django-bootstrap3 requires importlib-metadata<3.
# see also https://github.com/zostera/django-bootstrap4/issues/380
"Pillow~=10.1.0",
"Pillow~=10.2.0",
"publicsuffixlist~=0.10.0",
"python-dateutil~=2.8.0",
"qrcode~=7.0",
"reportlab~=4.0.0",
"reportlab~=4.1.0",
"requests~=2.31.0",
"rules~=3.3.0",
"urlman~=2.0.1",
Expand All @@ -78,6 +78,7 @@ dev = [
"flake8-bugbear",
"freezegun",
"isort",
"jsonschema",
"lxml",
"pytest",
"pytest-cov",
Expand Down
Loading

0 comments on commit c67b677

Please sign in to comment.