Skip to content

Upgrade wagtail to 3.x - #2934

Merged
frjo merged 32 commits into
mainfrom
maintenance/theskumar/update-wagtail-3
Aug 15, 2022
Merged

Upgrade wagtail to 3.x#2934
frjo merged 32 commits into
mainfrom
maintenance/theskumar/update-wagtail-3

Conversation

@theskumar

@theskumartheskumar commented Jul 22, 2022

Copy link
Copy Markdown
Member

Fixes#2880
Fixes#2874
Closes#2881

TODOs:

  • Fix the test randomly failing
  • Review and fix wagtail admin HTML overrides

@theskumar
theskumarforce-pushed the maintenance/theskumar/update-wagtail-3 branch from a86795c to 70fbccfCompareJuly 22, 2022 06:31
@theskumar
theskumar changed the base branch from main to maintenance/update-wagtail-3July 22, 2022 07:24
@codecov

codecovBot commented Jul 23, 2022

Copy link
Copy Markdown

Codecov Report

Merging #2934 (65445e5) into main (ce1b22a) will increase coverage by 0.07%.
The diff coverage is 88.27%.

@@ Coverage Diff @@## main #2934 +/- ##
==========================================
+ Coverage 81.89% 81.96% +0.07% 
==========================================
Files 683 704 +21 Lines 24809 24950 +141 ==========================================
+ Hits 20317 20450 +133 - Misses 4492 4500 +8 
Impacted FilesCoverage Δ
...projects/migrations/0034_multi_input_char_block.py100.00% <ø> (ø)
...ons/0035_add_heading_block_to_form_fields_block.py100.00% <ø> (ø)
hypha/apply/projects/migrations/0036_add_vendor.py100.00% <ø> (ø)
...jects/migrations/0052_alter_project_form_fields.py100.00% <ø> (ø)
...ly/projects/migrations/0053_projectapprovalform.py100.00% <ø> (ø)
...jects/migrations/0054_alter_project_form_fields.py100.00% <ø> (ø)
hypha/apply/projects/models/project.py92.27% <ø> (ø)
hypha/apply/projects/models/vendor.py95.06% <ø> (ø)
hypha/apply/projects/tests/test_models.py100.00% <ø> (ø)
hypha/apply/projects/views/vendor.py23.26% <ø> (ø)
... and 189 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@theskumar
theskumar marked this pull request as ready for review July 25, 2022 05:32
@theskumar
theskumarforce-pushed the maintenance/theskumar/update-wagtail-3 branch 2 times, most recently from 8cb8ca5 to e822419CompareJuly 25, 2022 09:36
@theskumar
theskumarforce-pushed the maintenance/update-wagtail-3 branch from 36c2e89 to fe7f442CompareJuly 25, 2022 09:37
@theskumar
theskumar changed the base branch from maintenance/update-wagtail-3 to mainJuly 25, 2022 09:37
Comment threadhypha/apply/api/v1/screening/tests/test_views.py Outdated
Comment threadhypha/apply/api/v1/screening/tests/test_views.py Outdated
@theskumar
theskumar marked this pull request as draft July 26, 2022 09:45
@theskumartheskumar mentioned this pull request Jul 26, 2022
@theskumartheskumar changed the title Patch upgrade wagtail 3.x (Saurabh)Upgrade wagtail to 3.x (Saurabh)Jul 26, 2022
@frjofrjo changed the title Upgrade wagtail to 3.x (Saurabh)Upgrade wagtail to 3.xJul 27, 2022
@theskumar
theskumarforce-pushed the maintenance/theskumar/update-wagtail-3 branch from af43f16 to b923832CompareJuly 28, 2022 08:20
@theskumar
theskumar marked this pull request as ready for review July 28, 2022 10:22
@theskumar

Copy link
Copy Markdown
MemberAuthor

The test_add_screening_status is failing for me locally. The reason seems to be there is no pre-defined ordering on the tables, but you are expecting an ordering in the returned response objects.

image

I’m not sure how it’s passing in the circle CI, but it’s failing on my machine. @frjo@sandeepsajan0

@theskumar
theskumarforce-pushed the maintenance/theskumar/update-wagtail-3 branch from 95317a0 to 2361652CompareJuly 28, 2022 10:29
Changelog: wagtail/wagtail-factories@2.0.1...2.1.0
2.1.0
=====
- Add support for Wagtail 3.0 and drop support for all Wagtail versions
before 2.15
- Add support for Django 4.0
- Add support for Python 3.10
- Removed support for Python 3.6
- Removed support for Django 2.2 and 3.1
- Removed support for factory boy <3.2
Do not depend on sorting IDs for checks
Use `django.test.TestCase` instead of `unittest.TestCase` to enable DB access
See: https://django-filter.readthedocs.io/en/stable/guide/migration.html#view-attributes-renamed-867
```
hypha/apply/api/v1/screening/tests/test_views.py::ScreeningStatusViewSetTests::test_staff_can_list_screening_statuses
hypha/apply/api/v1/screening/tests/test_views.py::ScreeningStatusViewSetTests::test_staff_can_view_screening_statuses_detail
/Users/theskumar/work/hyphaapp/hypha/venv/lib/python3.9/site-packages/django_filters/rest_framework/backends.py:31: MigrationNotice: `ScreeningStatusViewSet.filter_class` attribute should be renamed `filterset_class`. See: https://django-filter.readthedocs.io/en/master/guide/migration.html See: https://django-filter.readthedocs.io/en/master/guide/migration.html
filterset_class = self.get_filterset_class(view, queryset)
```
…ed in favor of {% if %}
```
hypha/apply/determinations/tests/test_views.py: 20 warnings
/Users/theskumar/work/hyphaapp/hypha/venv/lib/python3.9/site-packages/django/template/defaulttags.py:862: RemovedInDjango40Warning: The {% ifequal %} template tag is deprecated in favor of {% if %}.
warnings.warn(
```
@frjo
frjoforce-pushed the maintenance/theskumar/update-wagtail-3 branch from 2361652 to dc5c948CompareAugust 1, 2022 12:36
@frjo
frjo temporarily deployed to test-hypha-app August 1, 2022 12:48 Inactive
frjo
frjo approved these changes Aug 1, 2022

@frjofrjo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work! Deploying to test now.

Related to #2882
The messaging.py has quite a lot of code with multiple concerns, which can be easily divided into individual independent modules.
This refractor puts different messaging adapters into its modules for better maintainability and readability.
The test checks for the ordering of the item returned.
The view function or the model class doesn’t have any
order specified.
This cause the tests to fail randomly on different machines.
This commit removes that ordering the check and just checks for
the availability of the ids.
@frjo
frjo merged commit e464e91 into mainAug 15, 2022
@theskumar
theskumar deleted the maintenance/theskumar/update-wagtail-3 branch August 16, 2022 06:28
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: MaintenanceType: MajorMajor change, used in release drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to Wagtail 3.x Roles checkboxes aren't aligned with labels

4 participants

@theskumar@frjo@sandeepsajan0@sks444