Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment #478

Merged
merged 64 commits into from
Jul 17, 2022
Merged

Deployment #478

merged 64 commits into from
Jul 17, 2022

Conversation

dependabot bot and others added 30 commits June 13, 2022 18:37
Bumps [phonenumbers](https://github.com/daviddrysdale/python-phonenumbers) from 8.12.49 to 8.12.50.
- [Release notes](https://github.com/daviddrysdale/python-phonenumbers/releases)
- [Commits](daviddrysdale/python-phonenumbers@v8.12.49...v8.12.50)

---
updated-dependencies:
- dependency-name: phonenumbers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3.1.2 to 4.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v3.1.2...v4.0.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [django-phonenumber-field](https://github.com/stefanfoulis/django-phonenumber-field) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/stefanfoulis/django-phonenumber-field/releases)
- [Changelog](https://github.com/stefanfoulis/django-phonenumber-field/blob/main/CHANGELOG.rst)
- [Commits](stefanfoulis/django-phonenumber-field@6.1.0...6.2.0)

---
updated-dependencies:
- dependency-name: django-phonenumber-field
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [django-phonenumber-field](https://github.com/stefanfoulis/django-phonenumber-field) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/stefanfoulis/django-phonenumber-field/releases)
- [Changelog](https://github.com/stefanfoulis/django-phonenumber-field/blob/main/CHANGELOG.rst)
- [Commits](stefanfoulis/django-phonenumber-field@6.2.0...6.3.0)

---
updated-dependencies:
- dependency-name: django-phonenumber-field
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bleach[css]](https://github.com/mozilla/bleach) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/main/CHANGES)
- [Commits](https://github.com/mozilla/bleach/commits)

---
updated-dependencies:
- dependency-name: bleach[css]
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [phonenumbers](https://github.com/daviddrysdale/python-phonenumbers) from 8.12.50 to 8.12.51.
- [Release notes](https://github.com/daviddrysdale/python-phonenumbers/releases)
- [Commits](daviddrysdale/python-phonenumbers@v8.12.50...v8.12.51)

---
updated-dependencies:
- dependency-name: phonenumbers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.1.1 to 9.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](python-pillow/Pillow@9.1.1...9.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [channels](https://github.com/django/channels) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/django/channels/releases)
- [Changelog](https://github.com/django/channels/blob/main/CHANGELOG.txt)
- [Commits](django/channels@3.0.4...3.0.5)

---
updated-dependencies:
- dependency-name: channels
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [django](https://github.com/django/django) from 4.0.5 to 4.0.6.
- [Release notes](https://github.com/django/django/releases)
- [Commits](django/django@4.0.5...4.0.6)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
⬆(deps): Bump channels from 3.0.4 to 3.0.5
Bumps [python-ldap](https://github.com/python-ldap/python-ldap) from 3.4.0 to 3.4.2.
- [Release notes](https://github.com/python-ldap/python-ldap/releases)
- [Commits](python-ldap/python-ldap@python-ldap-3.4.0...python-ldap-3.4.2)

---
updated-dependencies:
- dependency-name: python-ldap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [django-extensions](https://github.com/django-extensions/django-extensions) from 3.1.5 to 3.2.0.
- [Release notes](https://github.com/django-extensions/django-extensions/releases)
- [Changelog](https://github.com/django-extensions/django-extensions/blob/main/CHANGELOG.md)
- [Commits](django-extensions/django-extensions@3.1.5...3.2.0)

---
updated-dependencies:
- dependency-name: django-extensions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [channels-redis](https://github.com/django/channels_redis) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/django/channels_redis/releases)
- [Changelog](https://github.com/django/channels_redis/blob/main/CHANGELOG.txt)
- [Commits](django/channels_redis@3.4.0...3.4.1)

---
updated-dependencies:
- dependency-name: channels-redis
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Otherwise, deleting a user would always fail due to the foreign key constraint.
Removed the thumbnail images, as we can afford to display the full-resolution image when only one image is shown
(as opposed to multiple images in a list).
It now uses the raw image instead of a thumbnail, as it's not particularly necessary to use (storage space for) thumbnails when displaying just one
image, and it's often desirable as a user to be able to download the full-quality image - for whatever usage.

Also made the image width 600px (max) and made the height never exceed 50% of the viewport height.
* Removed the `trimmed` keyword from `blocktrans` template tags when the tag's contents were placed on the same line,
  as trimming only has an effect when there are leading or trailing whitespace or line breaks inside the translation string
* [checkin/views.py] Added `PreventGetRequestsMixin` to views that are only supposed to be POSTed to,
  and removed `VoteSuggestionView.template_name`, as it's not used
* [committee_list.html] Removed the `if committee.clickbait` code, as the description is not supposed to replace missing clickbait
* [internal/forms.py] The `required` attribute of `AddMemberForm.user` is already inserted by Django, so no need to specify it manually
* [models/reservation.py] Removed the unused `can_edit_quota` permission
* [course_registration_edit.html] Renamed `form_utility` -> `form_tags`; see point below
* [machine_card.html] Removed code using the previously removed `color_bottom` template variable,
  and removed `if calendar_link` as the `calendar_link` template variable was always true (or `1`)
* [machine_list.html] Removed passing the `calendar_link` variable to `machine_card.html`; see point above
* [reservation_extra.py] Moved the `invert` template tag to `string_tags.py`
* [news/test_article_views.py + news/test_event_time_place_views.py] Removed some tests that were testing the exact same things as the tests in
  `news/test_urls.py`
* Renamed `form_utility.py` -> `form_tags.py`
* [string_tags.py] Moved the `invert` template tag from `reservation_extra.py`
* [multi_lingual_text_field.html] Removed a duplicate block of JavaScript code (beginning with `$tabs.find(".django-ckeditor-widget")`)
* [web/urls.py] Replaced the `media/<path:path>` path with unpacking the return value of `static()`, to match the Django docs' suggested code
  (see https://docs.djangoproject.com/en/4.0/howto/static-files/#serving-files-uploaded-by-a-user-during-development)
Also renamed some CSS and JavaScript files to match the changed name of their templates.
Its previous purpose was instead replaced with utilizing Django's messages framework.
Also made `SystemAccess.change_url` use `reverse_internal()` instead of Django's `reverse()`.

Also, made `i` the default subdomain of URLs returned by `reverse_internal()`, for the same reason as in a2314a2.
Also renamed the `related_name` of `Page.current_content` to a more fitting name.

Also, made the current page (content) version on the history page link to the content's absolute (history) URL, instead of the page's URL,
as it enables users to get a "permalink" to that specific page version.
ddabble and others added 25 commits July 17, 2022 19:30
Also removed the now unused `has_any_permissions()` template filter, and cleaned up the tests in `test_permission_tags.py`.
The `attrs` widget attribute should only be used for standard HTML attributes set on the widget's input tag
(like `<input>`, `<select>` or `<textarea>`), which are then inserted using the `django/forms/widgets/attrs.html` template.

Also removed manually setting the `error` class in `semantic_search_select.html`, since all required fields will have that class set
(through `generic_form.html`) after submitting empty values for them, and the form page is shown again (to let the user correct the errors).
Also changed the `language` field to use the more appropriate `SemanticChoiceInput` widget.
It was previously not showing, both due to the "language"/"languages" translations not being inserted into a JavaScript string,
which caused an exception, and because `event.preventDefault()` was not present,
which made the form submit the data the same instant as the error message was shown.

The call to `ngettext()` currently has no translation, as it's not recognized by `gettext` when outside of a `.js` file.
This will be fixed in an upcoming commit by extracting the JavaScript code to its own file.
It now appears just above the language tabs, and the viewport is scrolled so that the error message comes into view when it appears.
Also removed suffixing the `data-tab` attribute with `subwidget.attrs.language`, as the language is already part of `subwidget.name`.
Now they also use the built-in logic in Django's default error handler views (`page_not_found` and `server_error` in this case).
Also moved linking the stream files to the `<head>` tag in `machine_detail.html`,
and made sure that they're not unnecessarily included when the machine does not have a stream.

Also removed a block scope in `stream.js` as it's no longer necessary
(it actually hasn't been necessary since d781360).
Instead of using WebSockets, we can now directly query the Raspberry Pis through Nginx running on the website server,
which serve actual streams (which are viewed through `<img>` tags, curiously)
- instead of a continuous series of images, like before.
Now, only the visible streams are connected to;
once the page is scrolled so that a stream image is no longer rendered, the stream for that machine is disconnected.

The machine detail page does not adopt this new behavior, as it's not really necessary when there is always only one stream on the page.
Specifically `ERR_CONNECTION_RESET` disconnection with a status code of 200.

Also made the stream image larger on the machine detail page, when viewing on desktop or mobile.
...on the machine list page, using the close ("X") button.

This happened as the button icon (with ID `close-fullscreen-button`) was included for every machine with a stream on the machine list page,
and defining the same ID more than once in a document leads to undefined behavior, which is likely what caused this bug.
Make streams work with the new RPi setup
@ddabble ddabble added the deployment Pull requests from another branch (usually `dev`) into the `main` branch label Jul 17, 2022
@codecov
Copy link

codecov bot commented Jul 17, 2022

Codecov Report

Merging #478 (d35c1e6) into main (56654c4) will increase coverage by 0.46%.
The diff coverage is 85.57%.

❗ Current head d35c1e6 differs from pull request most recent head adf40ce. Consider uploading reports for the commit adf40ce to get more accurate results

@@            Coverage Diff             @@
##             main     #478      +/-   ##
==========================================
+ Coverage   88.03%   88.50%   +0.46%     
==========================================
  Files         134      132       -2     
  Lines        5451     5507      +56     
==========================================
+ Hits         4799     4874      +75     
+ Misses        652      633      -19     
Impacted Files Coverage Δ
checkin/urls.py 100.00% <ø> (ø)
internal/forms.py 86.91% <ø> (ø)
internal/signals.py 42.85% <0.00%> (ø)
mail/email.py 36.58% <0.00%> (-2.06%) ⬇️
make_queue/forms.py 87.71% <ø> (ø)
make_queue/views/api/calendar.py 97.61% <ø> (-0.06%) ⬇️
users/models.py 94.28% <ø> (ø)
util/templatetags/form_tags.py 100.00% <ø> (ø)
contentbox/models.py 78.78% <30.00%> (-21.22%) ⬇️
news/forms.py 94.28% <40.00%> (-2.78%) ⬇️
... and 46 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56654c4...adf40ce. Read the comment docs.

@ddabble
Copy link
Member Author

ddabble commented Jul 17, 2022

Merging without approval, as the Dev committee is slightly understaffed 🤠

@ddabble ddabble merged commit 9016a87 into main Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Pull requests from another branch (usually `dev`) into the `main` branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant