Skip to content

Commit

Permalink
Merge pull request #2241 from openedx/repo-tools/upgrade-python-requi…
Browse files Browse the repository at this point in the history
…rements-a8d0136

chore: Upgrade Python requirements
  • Loading branch information
pomegranited authored Oct 31, 2024
2 parents 356543d + a321e60 commit 42e754e
Show file tree
Hide file tree
Showing 58 changed files with 792 additions and 774 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.11"]
python-version: ["3.11", "3.12"]
toxenv: [quality, js, django42]

steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -48,7 +48,7 @@ jobs:
run: tox

- name: Run Coverage
if: matrix.python-version == '3.8' && matrix.toxenv=='django42'
if: matrix.python-version == '3.12' && matrix.toxenv=='django42'
uses: codecov/codecov-action@v4
with:
flags: unittests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.12

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ sphinx:

# Set the version of python needed to build these docs.
build:
os: "ubuntu-22.04"
os: "ubuntu-lts-latest"
tools:
python: "3.8"
python: "3.12"

# Optionally install extra requirements required to build your docs
python:
Expand Down
27 changes: 15 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
extract_translations compile_translations generate_dummy_translations validate_translations \
detect_changed_source_translations pull_translations push_translations check_translations_up_to_date \
quality test-python render-templates test-js test-js-debug test test-acceptance test-a11y test-sandbox \
install-osx-requirements
compile-requirements install-osx-requirements

.DEFAULT_GOAL := help

Expand Down Expand Up @@ -43,23 +43,23 @@ $(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"
echo "$(COMMON_CONSTRAINTS_TEMP_COMMENT)" | cat - $(@) > temp && mv temp $(@)

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
compile-requirements: export CUSTOM_COMPILE_COMMAND=make upgrade
compile-requirements: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
# global common_constraints has this pin.
sed 's/django-simple-history==3.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
pip install -qr requirements/pip-tools.txt
pip-compile --upgrade --allow-unsafe -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in
pip-compile ${COMPILE_OPTS} --allow-unsafe -o requirements/pip.txt requirements/pip.in
pip-compile ${COMPILE_OPTS} -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip-tools.txt
pip-compile --upgrade -o requirements/base.txt requirements/base.in
pip-compile --upgrade -o requirements/test.txt requirements/test.in
pip-compile --upgrade -o requirements/quality.txt requirements/quality.in
pip-compile --upgrade -o requirements/test-acceptance.txt requirements/test-acceptance.in
pip-compile --upgrade -o requirements/tox.txt requirements/tox.in
pip-compile --upgrade -o requirements/ci.txt requirements/ci.in
pip-compile --upgrade -o requirements/docs.txt requirements/docs.in
pip-compile ${COMPILE_OPTS} --allow-unsafe -o requirements/base.txt requirements/base.in
pip-compile ${COMPILE_OPTS} -o requirements/test.txt requirements/test.in
pip-compile ${COMPILE_OPTS} --allow-unsafe -o requirements/quality.txt requirements/quality.in
pip-compile ${COMPILE_OPTS} -o requirements/test-acceptance.txt requirements/test-acceptance.in
pip-compile ${COMPILE_OPTS} -o requirements/tox.txt requirements/tox.in
pip-compile ${COMPILE_OPTS} --allow-unsafe -o requirements/ci.txt requirements/ci.in
pip-compile ${COMPILE_OPTS} -o requirements/docs.txt requirements/docs.in
# Delete django pin from test requirements to avoid tox version collision
sed -i.tmp '/^[d|D]jango==/d' requirements/test.txt
sed -i.tmp '/^djangorestframework==/d' requirements/test.txt
Expand All @@ -70,6 +70,9 @@ upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with
# Delete temporary files
rm requirements/*.txt.tmp

upgrade: ## update the pip requirements files to use the latest releases satisfying our constraints
$(MAKE) compile-requirements COMPILE_OPTS="--upgrade"

##############################
# Generate js/css output files
##############################
Expand Down
2 changes: 1 addition & 1 deletion openassessment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Initialization Information for Open Assessment Module
"""

__version__ = '6.12.2'
__version__ = '6.12.3'
4 changes: 2 additions & 2 deletions openassessment/assessment/api/peer.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def get_score(submission_uuid, peer_requirements, course_settings):
}


def create_assessment(
def create_assessment( # pylint: disable=too-many-positional-arguments
scorer_submission_uuid,
scorer_id,
options_selected,
Expand Down Expand Up @@ -420,7 +420,7 @@ def create_assessment(


@transaction.atomic
def _complete_assessment(
def _complete_assessment( # pylint: disable=too-many-positional-arguments
rubric_dict,
scorer_id,
peer_submission_uuid,
Expand Down
4 changes: 2 additions & 2 deletions openassessment/assessment/api/self.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def get_score(submission_uuid, self_requirements, course_settings): # pylint: d
}


def create_assessment(
def create_assessment( # pylint: disable=too-many-positional-arguments
submission_uuid,
user_id,
options_selected,
Expand Down Expand Up @@ -179,7 +179,7 @@ def create_assessment(


@transaction.atomic
def _complete_assessment(
def _complete_assessment( # pylint: disable=too-many-positional-arguments
submission_uuid,
user_id,
options_selected,
Expand Down
4 changes: 2 additions & 2 deletions openassessment/assessment/api/staff.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def get_staff_grading_statistics(course_id, item_id):
return StaffWorkflow.get_workflow_statistics(course_id, item_id)


def create_assessment(
def create_assessment( # pylint: disable=too-many-positional-arguments
submission_uuid,
scorer_id,
options_selected,
Expand Down Expand Up @@ -389,7 +389,7 @@ def create_assessment(


@transaction.atomic
def _complete_assessment(
def _complete_assessment( # pylint: disable=too-many-positional-arguments
submission_uuid,
scorer_id,
options_selected,
Expand Down
2 changes: 1 addition & 1 deletion openassessment/assessment/api/teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def get_staff_grading_statistics(course_id, item_id):
return TeamStaffWorkflow.get_workflow_statistics(course_id, item_id)


def create_assessment(
def create_assessment( # pylint: disable=too-many-positional-arguments
team_submission_uuid,
scorer_id,
options_selected,
Expand Down
1 change: 1 addition & 0 deletions openassessment/assessment/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ def __str__(self):
return f"Assessment {self.id}"

@classmethod
# pylint: disable=too-many-positional-arguments
def create(cls, rubric, scorer_id, submission_uuid, score_type, feedback=None, scored_at=None):
"""
Create a new assessment.
Expand Down
14 changes: 7 additions & 7 deletions openassessment/conf/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: edx-ora2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-09 08:22-0500\n"
"POT-Creation-Date: 2024-10-31 13:50+1030\n"
"PO-Revision-Date: 2014-06-04 15:41-0400\n"
"Last-Translator: Muhammad Ayub khan <[email protected]>\n"
"Language-Team: openedx-translation <[email protected]>\n"
Expand Down Expand Up @@ -158,7 +158,7 @@ msgstr ""
msgid "No description provided."
msgstr ""

#: data.py:1625 templates/legacy/edit/oa_edit_criterion.html:54
#: data.py:1626 templates/legacy/edit/oa_edit_criterion.html:54
#: xblock/studio_mixin.py:57
msgid "None"
msgstr ""
Expand Down Expand Up @@ -2476,26 +2476,26 @@ msgstr ""
msgid "Error getting staff grade ungraded and checked out counts."
msgstr ""

#: xblock/staff_area_mixin.py:702
#: xblock/staff_area_mixin.py:703
msgid "Please enter valid reason to remove the submission."
msgstr ""

#: xblock/staff_area_mixin.py:713
#: xblock/staff_area_mixin.py:714
msgid "Submission not found"
msgstr ""

#: xblock/staff_area_mixin.py:724
#: xblock/staff_area_mixin.py:725
msgid "Submission for team assignment has no associated team submission"
msgstr ""

#: xblock/staff_area_mixin.py:753
#: xblock/staff_area_mixin.py:754
msgid ""
"The learner submission has been removed from peer assessment. The learner "
"receives a grade of zero unless you delete the learner's state for the "
"problem to allow them to resubmit a response."
msgstr ""

#: xblock/staff_area_mixin.py:788
#: xblock/staff_area_mixin.py:789
msgid ""
"The team’s submission has been removed from grading. The team receives a "
"grade of zero unless you delete a team member’s state for the problem to "
Expand Down
Loading

0 comments on commit 42e754e

Please sign in to comment.