Skip to content

Commit

Permalink
Merge branch 'develop' into feature/member-codes
Browse files Browse the repository at this point in the history
  • Loading branch information
elichad committed Nov 16, 2023
2 parents c5c883f + 105dda0 commit ab37e21
Show file tree
Hide file tree
Showing 65 changed files with 4,477 additions and 1,019 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ $ python docs/generate_changelog.py v4.1
Then paste output from that script here.

-----------------------------------------------------------------
## v4.2.3 - 2023-11-07

### Bugfixes
* Escape trainee notes in progress_description tag - [#2567](https://github.com/carpentries/amy/pull/2567) by @elichad

## v4.2.1 - 2023-08-15

Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ verify_ssl = true
name = "pypi"

[packages]
django = "~=3.2.20"
django = "~=3.2.23"
argon2-cffi = "~=21.3.0"
django-anymail = "~=8.4"
django-contrib-comments = "~=2.1.0"
Expand Down
935 changes: 548 additions & 387 deletions Pipfile.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions amy/api/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ class TrainingRequestCSVColumns:
"previous_experience_other": "Previous Experience (other)",
"previous_experience_explanation": "Previous Experience (explanation)",
"programming_language_usage_frequency": "Programming Language Usage",
"checkout_intent": "Intent to complete checkout",
"teaching_intent": "Intent to teach workshops",
"teaching_frequency_expectation": "Teaching Frequency Expectation",
"teaching_frequency_expectation_other": "Teaching Frequency Expectation (other)", # noqa: line too long
"max_travelling_frequency": "Max Travelling Frequency",
"max_travelling_frequency_other": "Max Travelling Frequency (other)",
"reason": "Reason for undertaking training",
"user_notes": "User notes",
"training_completion_agreement": "Training completion agreement (yes/no)",
"workshop_teaching_agreement": "Workshop teaching agreement (yes/no)",
"data_privacy_agreement": "Data privacy agreement (yes/no)",
"code_of_conduct_agreement": "Code of Conduct agreement (yes/no)",
}
Expand Down
12 changes: 8 additions & 4 deletions amy/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ class TrainingRequestSerializer(serializers.ModelSerializer):
programming_language_usage_frequency = serializers.CharField(
source="get_programming_language_usage_frequency_display"
)
checkout_intent = serializers.CharField(source="get_checkout_intent_display")
teaching_intent = serializers.CharField(source="get_teaching_intent_display")
teaching_frequency_expectation = serializers.CharField(
source="get_teaching_frequency_expectation_display"
)
Expand Down Expand Up @@ -246,14 +248,14 @@ class Meta:
"previous_experience_other",
"previous_experience_explanation",
"programming_language_usage_frequency",
"checkout_intent",
"teaching_intent",
"teaching_frequency_expectation",
"teaching_frequency_expectation_other",
"max_travelling_frequency",
"max_travelling_frequency_other",
"reason",
"user_notes",
"training_completion_agreement",
"workshop_teaching_agreement",
"data_privacy_agreement",
"code_of_conduct_agreement",
)
Expand Down Expand Up @@ -333,14 +335,14 @@ class Meta:
"previous_experience_other",
"previous_experience_explanation",
"programming_language_usage_frequency",
"checkout_intent",
"teaching_intent",
"teaching_frequency_expectation",
"teaching_frequency_expectation_other",
"max_travelling_frequency",
"max_travelling_frequency_other",
"reason",
"user_notes",
"training_completion_agreement",
"workshop_teaching_agreement",
"data_privacy_agreement",
"code_of_conduct_agreement",
)
Expand Down Expand Up @@ -368,6 +370,8 @@ class Meta:
"previous_experience",
"previous_experience_other",
"previous_experience_explanation",
"checkout_intent",
"teaching_intent",
"teaching_frequency_expectation",
"teaching_frequency_expectation_other",
"max_travelling_frequency",
Expand Down
9 changes: 5 additions & 4 deletions amy/api/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ def prepare_data(self, user):
previous_experience="ta",
previous_experience_other="",
previous_experience_explanation="After the course I became a TA",
checkout_intent="yes",
teaching_intent="yes-central",
programming_language_usage_frequency="weekly",
teaching_frequency_expectation="monthly",
max_travelling_frequency="not-at-all",
max_travelling_frequency_other="",
reason="I want to became an instructor",
user_notes="I like trains",
training_completion_agreement=True,
workshop_teaching_agreement=True,
)
training_request.domains.set([KnowledgeDomain.objects.first()])
training_request.previous_involvement.set(
Expand Down Expand Up @@ -497,14 +497,15 @@ def test_relational_fields_structure(self):
"previous_experience_other": "",
"previous_experience_explanation": "After the course I became a TA",
"programming_language_usage_frequency": "A few times a week",
"checkout_intent": "Yes",
"teaching_intent": "Yes - I plan to volunteer with The Carpentries "
"to teach workshops for other communities",
"teaching_frequency_expectation": "Several times a year",
"teaching_frequency_expectation_other": "",
"max_travelling_frequency": "Not at all",
"max_travelling_frequency_other": "",
"reason": "I want to became an instructor",
"user_notes": "I like trains",
"training_completion_agreement": True,
"workshop_teaching_agreement": True,
"data_privacy_agreement": True,
"code_of_conduct_agreement": True,
}
Expand Down
24 changes: 13 additions & 11 deletions amy/api/tests/test_trainingrequests.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ def setUp(self):
previous_experience_other="",
previous_experience_explanation="I taught other Gummies",
programming_language_usage_frequency="not-much",
checkout_intent="yes",
teaching_intent="yes-local",
teaching_frequency_expectation="monthly",
teaching_frequency_expectation_other="",
max_travelling_frequency="not-at-all",
max_travelling_frequency_other="",
reason="I hope to pass on the Gummi Wisdom one day, and to do that"
" I must know how to do it efficiently.",
user_notes="",
training_completion_agreement=True,
workshop_teaching_agreement=True,
data_privacy_agreement=True,
code_of_conduct_agreement=True,
)
Expand Down Expand Up @@ -120,15 +120,15 @@ def setUp(self):
previous_experience_other="",
previous_experience_explanation="I taught other Gummies",
programming_language_usage_frequency="not-much",
checkout_intent="yes",
teaching_intent="yes-local",
teaching_frequency_expectation="monthly",
teaching_frequency_expectation_other="",
max_travelling_frequency="not-at-all",
max_travelling_frequency_other="",
reason="I need to pass on the Gummiberry juice recipe one day, and"
" to do that I must know how to do it efficiently.",
user_notes="",
training_completion_agreement=True,
workshop_teaching_agreement=True,
data_privacy_agreement=True,
code_of_conduct_agreement=True,
)
Expand Down Expand Up @@ -203,15 +203,16 @@ def setUp(self):
"previous_experience_other": "",
"previous_experience_explanation": "I taught other Gummies",
"programming_language_usage_frequency": "Never or almost never",
"checkout_intent": "Yes",
"teaching_intent": "Yes - I plan to teach Carpentries workshops "
"in my local community or personal networks",
"teaching_frequency_expectation": "Several times a year",
"teaching_frequency_expectation_other": "",
"max_travelling_frequency": "Not at all",
"max_travelling_frequency_other": "",
"reason": "I hope to pass on the Gummi Wisdom one day, and to do "
"that I must know how to do it efficiently.",
"user_notes": "",
"training_completion_agreement": True,
"workshop_teaching_agreement": True,
"data_privacy_agreement": True,
"code_of_conduct_agreement": True,
},
Expand Down Expand Up @@ -257,15 +258,16 @@ def setUp(self):
"previous_experience_other": "",
"previous_experience_explanation": "I taught other Gummies",
"programming_language_usage_frequency": "Never or almost never",
"checkout_intent": "Yes",
"teaching_intent": "Yes - I plan to teach Carpentries workshops "
"in my local community or personal networks",
"teaching_frequency_expectation": "Several times a year",
"teaching_frequency_expectation_other": "",
"max_travelling_frequency": "Not at all",
"max_travelling_frequency_other": "",
"reason": "I need to pass on the Gummiberry juice recipe one day,"
" and to do that I must know how to do it efficiently.",
"user_notes": "",
"training_completion_agreement": True,
"workshop_teaching_agreement": True,
"data_privacy_agreement": True,
"code_of_conduct_agreement": True,
},
Expand Down Expand Up @@ -305,11 +307,11 @@ def test_CSV_renderer(self):
"Previous Training in Teaching,Previous Training (other),"
"Previous Training (explanation),Previous Experience in Teaching,"
"Previous Experience (other),Previous Experience (explanation),"
"Programming Language Usage,Teaching Frequency Expectation,"
"Programming Language Usage,Intent to complete checkout,"
"Intent to teach workshops,Teaching Frequency Expectation,"
"Teaching Frequency Expectation (other),Max Travelling Frequency,"
"Max Travelling Frequency (other),Reason for undertaking training,"
"User notes,Training completion agreement (yes/no),"
"Workshop teaching agreement (yes/no),"
"User notes,"
"Data privacy agreement (yes/no),"
"Code of Conduct agreement (yes/no)"
)
Expand Down
5 changes: 5 additions & 0 deletions amy/autoemails/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ def check(task: Task): # type: ignore
and task.event.administrator
and task.event.administrator.domain != "self-organized"
and task.event.administrator.domain != "carpentries.org"
# 2023-09-20: also exclude CLDT
and task.event.administrator.domain != "carpentries.org/community-lessons/"
)

def get_additional_context(self, objects, *args, **kwargs):
Expand Down Expand Up @@ -357,6 +359,7 @@ def check(task: Task): # type: ignore
and task.event.administrator
and task.event.administrator.domain != "self-organized"
and task.event.administrator.domain != "carpentries.org"
and task.event.administrator.domain != "carpentries.org/community-lessons/"
)

def get_additional_context(self, objects, *args, **kwargs):
Expand Down Expand Up @@ -488,6 +491,8 @@ def check(event: Event): # type: ignore
# Instructor Training
and event.administrator
and event.administrator.domain != "carpentries.org"
# 2023-09-20: also exclude CLDT
and event.administrator.domain != "carpentries.org/community-lessons/"
)

def get_additional_context(self, objects, *args, **kwargs):
Expand Down
Loading

0 comments on commit ab37e21

Please sign in to comment.