Skip to content

Commit

Permalink
Merge pull request #2731 from carpentries/feature/2044-2094-2726
Browse files Browse the repository at this point in the history
Multiple changes
  • Loading branch information
pbanaszkiewicz authored Dec 31, 2024
2 parents cf83e8c + c33004c commit 19348e7
Show file tree
Hide file tree
Showing 39 changed files with 173 additions and 88 deletions.
2 changes: 2 additions & 0 deletions amy/api/v1/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ class Meta:
"country",
"github",
"twitter",
"bluesky",
"url",
"orcid",
"affiliation",
Expand Down Expand Up @@ -492,6 +493,7 @@ class Meta:
"country",
"github",
"twitter",
"bluesky",
"url",
"orcid",
"affiliation",
Expand Down
1 change: 1 addition & 0 deletions amy/api/v1/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ def test_all_related_objects_shown(self):
"gender",
"github",
"twitter",
"bluesky",
"url",
"user_notes",
"affiliation",
Expand Down
3 changes: 1 addition & 2 deletions amy/api/v2/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ class Meta:
"airport",
"github",
"twitter",
"bluesky",
"url",
"user_notes",
"affiliation",
Expand Down Expand Up @@ -304,8 +305,6 @@ class Meta:
"event",
"person",
"role",
"title",
"url",
"seat_membership",
"seat_public",
"seat_open_training",
Expand Down
2 changes: 1 addition & 1 deletion amy/autoemails/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ def get_additional_context(self, objects, *args, **kwargs):

task_emails = [t.person.email for t in tasks]
contacts = event.contact.split(TAG_SEPARATOR)
context["all_emails"] = list(filter(bool, task_emails + contacts))
context["all_emails"] = sorted(filter(bool, task_emails + contacts))

context["assignee"] = (
event.assigned_to.full_name if event.assigned_to else "Regional Coordinator"
Expand Down
14 changes: 7 additions & 7 deletions amy/autoemails/tests/test_instructorshostintroductionaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ def testContext(self):
supporting_instructor2=supporting_instructor2.person,
hosts=[host.person],
all_emails=[
"hp@magic.uk",
"rw@magic.uk",
"hg@magic.uk",
"peter@webslinger.net",
"hp@magic.uk",
"me@stark.com",
"test@hogwart.com",
"peter@webslinger.net",
"rw@magic.uk",
"test2@magic.uk",
"test@hogwart.com",
],
assignee="Regional Coordinator",
tags=["automated-email", "LC"],
Expand Down Expand Up @@ -314,11 +314,11 @@ def testRecipients(self):
self.assertEqual(
email.to,
[
"hg@magic.uk",
"hp@magic.uk",
"rw@magic.uk",
"hg@magic.uk",
"test@hogwart.com",
"test2@magic.uk",
"test@hogwart.com",
],
)

Expand Down Expand Up @@ -409,6 +409,6 @@ def test_drop_empty_contacts(self):
)

ctx = a.get_additional_context(objects=dict(event=e))
expected = ["rw@magic.uk", "hg@magic.uk"]
expected = ["hg@magic.uk", "rw@magic.uk"]
self.assertEqual(ctx["all_emails"], expected)
self.assertEqual(a.all_recipients(), "rw@magic.uk, hg@magic.uk")
1 change: 1 addition & 0 deletions amy/dashboard/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class Meta:
"airport",
"github",
"twitter",
"bluesky",
"url",
"username",
"affiliation",
Expand Down
1 change: 1 addition & 0 deletions amy/dashboard/tests/test_autoupdate_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def test_update_profile(self):
"airport": self.airport_0_0.pk,
"github": "changed",
"twitter": "",
"bluesky": "",
"url": "",
"username": "changed",
"affiliation": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand Down
2 changes: 2 additions & 0 deletions amy/emails/tests/actions/test_ask_for_website_receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand All @@ -240,6 +241,7 @@ def test_integration(self) -> None:
airport=self.airport_0_50,
github="deckow_jayden",
twitter="deckow_jayden",
bluesky="@deckow_jayden.bsky.social",
url="http://jaydendeckow.com/",
affiliation="UFlo",
occupation="Staff",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand All @@ -272,6 +273,7 @@ def test_integration(self) -> None:
airport=self.airport_0_50,
github="deckow_jayden",
twitter="deckow_jayden",
bluesky="@deckow_jayden.bsky.social",
url="http://jaydendeckow.com/",
affiliation="UFlo",
occupation="Staff",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand All @@ -270,6 +271,7 @@ def test_integration(self) -> None:
airport=self.airport_0_50,
github="deckow_jayden",
twitter="deckow_jayden",
bluesky="@deckow_jayden.bsky.social",
url="http://jaydendeckow.com/",
affiliation="UFlo",
occupation="Staff",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand All @@ -365,6 +366,7 @@ def test_integration(self) -> None:
airport=self.airport_0_50,
github="deckow_jayden",
twitter="deckow_jayden",
bluesky="@deckow_jayden.bsky.social",
url="http://jaydendeckow.com/",
affiliation="UFlo",
occupation="Staff",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="",
twitter="",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="",
twitter="",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand All @@ -267,6 +268,7 @@ def test_integration(self) -> None:
airport=self.airport_0_50,
github="deckow_jayden",
twitter="deckow_jayden",
bluesky="@deckow_jayden.bsky.social",
url="http://jaydendeckow.com/",
affiliation="UFlo",
occupation="Staff",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand All @@ -261,6 +262,7 @@ def test_integration(self) -> None:
airport=self.airport_0_50,
github="deckow_jayden",
twitter="deckow_jayden",
bluesky="@deckow_jayden.bsky.social",
url="http://jaydendeckow.com/",
affiliation="UFlo",
occupation="Staff",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand All @@ -349,6 +350,7 @@ def test_integration(self) -> None:
airport=self.airport_0_50,
github="deckow_jayden",
twitter="deckow_jayden",
bluesky="@deckow_jayden.bsky.social",
url="http://jaydendeckow.com/",
affiliation="UFlo",
occupation="Staff",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand Down Expand Up @@ -141,6 +142,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand Down Expand Up @@ -240,6 +242,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand Down
3 changes: 3 additions & 0 deletions amy/emails/tests/actions/test_persons_merged.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand All @@ -197,6 +198,7 @@ def test_integration(self) -> None:
airport=self.airport_0_50,
github="deckow_jayden",
twitter="deckow_jayden",
bluesky="@deckow_jayden.bsky.social",
url="http://jaydendeckow.com/",
affiliation="UFlo",
occupation="Staff",
Expand All @@ -218,6 +220,7 @@ def test_integration(self) -> None:
"airport": "obj_a",
"github": "obj_b",
"twitter": "obj_a",
"bluesky": "obj_a",
"url": "obj_b",
"affiliation": "obj_b",
"occupation": "obj_a",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand All @@ -263,6 +264,7 @@ def test_integration(self) -> None:
airport=self.airport_0_50,
github="deckow_jayden",
twitter="deckow_jayden",
bluesky="@deckow_jayden.bsky.social",
url="http://jaydendeckow.com/",
affiliation="UFlo",
occupation="Staff",
Expand Down
2 changes: 2 additions & 0 deletions amy/emails/tests/actions/test_post_workshop_7days_receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand All @@ -256,6 +257,7 @@ def test_integration(self) -> None:
airport=self.airport_0_50,
github="deckow_jayden",
twitter="deckow_jayden",
bluesky="@deckow_jayden.bsky.social",
url="http://jaydendeckow.com/",
affiliation="UFlo",
occupation="Staff",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand All @@ -351,6 +352,7 @@ def test_integration(self) -> None:
airport=self.airport_0_50,
github="deckow_jayden",
twitter="deckow_jayden",
bluesky="@deckow_jayden.bsky.social",
url="http://jaydendeckow.com/",
affiliation="UFlo",
occupation="Staff",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand All @@ -259,6 +260,7 @@ def test_integration(self) -> None:
airport=self.airport_0_50,
github="deckow_jayden",
twitter="deckow_jayden",
bluesky="@deckow_jayden.bsky.social",
url="http://jaydendeckow.com/",
affiliation="UFlo",
occupation="Staff",
Expand Down
2 changes: 2 additions & 0 deletions amy/emails/tests/actions/test_recruit_helpers_receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ def test_integration(self) -> None:
airport=self.airport_0_0,
github="purdy_kelsi",
twitter="purdy_kelsi",
bluesky="@purdy_kelsi.bsky.social",
url="http://kelsipurdy.com/",
affiliation="University of Arizona",
occupation="TA at Biology Department",
Expand All @@ -252,6 +253,7 @@ def test_integration(self) -> None:
airport=self.airport_0_50,
github="deckow_jayden",
twitter="deckow_jayden",
bluesky="@deckow_jayden.bsky.social",
url="http://jaydendeckow.com/",
affiliation="UFlo",
occupation="Staff",
Expand Down
Loading

0 comments on commit 19348e7

Please sign in to comment.