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

Release 0.24.0 #358

Merged
merged 3 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [py38-django32]
toxenv: [py38-django32, py38-django42]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

python-version: ${{ matrix.python-version }}
- name: tox install
run: pip install tox

Expand All @@ -36,9 +36,18 @@ jobs:
TOXENV: ${{ matrix.toxenv }}
run: tox

- name: Run Integration Tests
run: |
cd ..
git clone https://github.com/openedx/devstack
cd devstack
sed -i 's/:cached//g' ./docker-compose-host.yml
make dev.clone.https
DEVSTACK_WORKSPACE=$PWD/.. docker-compose -f docker-compose.yml -f docker-compose-host.yml run -v $PWD/../edx-sga:/edx-sga lms /edx-sga/run_devstack_integration_tests.sh

- name: Upload coverage to CodeCov
if: matrix.python-version == '3.8' && matrix.toxenv == 'py38-django32'
if: matrix.python-version == '3.8' && matrix.toxenv == 'py38-django42'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: true
fail_ci_if_error: false
11 changes: 11 additions & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Release Notes
=============

Version 0.24.0
--------------

- chore: enabling integration tests (#355)
- feat: add support for django4.2 & update lint (#347)

Version 0.24.0 (Unreleased)
--------------

- feat: add support for Django 4.2

Version 0.23.1 (Released January 26, 2024)
--------------

Expand Down
2 changes: 1 addition & 1 deletion edx_sga/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Module for StaffGradedAssignmentXBlock.
"""

__version__ = "0.23.1"
__version__ = "0.24.0"
16 changes: 4 additions & 12 deletions edx_sga/sga.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class StaffGradedAssignmentXBlock(
default=_("Staff Graded Assignment"),
scope=Scope.settings,
help=_(
"This name appears in the horizontal navigation at the top of " "the page."
"This name appears in the horizontal navigation at the top of the page."
),
)

Expand All @@ -119,7 +119,7 @@ class StaffGradedAssignmentXBlock(
staff_score = Integer(
display_name=_("Score assigned by non-instructor staff"),
help=_(
"Score will need to be approved by instructor before being " "published."
"Score will need to be approved by instructor before being published."
),
default=None,
scope=Scope.settings,
Expand Down Expand Up @@ -182,6 +182,7 @@ def file_size_over_limit(cls, file_obj):

@classmethod
def parse_xml(cls, node, runtime, keys, id_generator):
# pylint: disable=arguments-differ,unused-argument
"""
Override default serialization to handle <solution /> elements
"""
Expand All @@ -190,7 +191,7 @@ def parse_xml(cls, node, runtime, keys, id_generator):
for child in node:
if child.tag == "solution":
# convert child elements of <solution> into HTML for display
block.solution = "".join(etree.tostring(subchild) for subchild in child)
block.solution = "".join(etree.tostring(subchild, encoding=str) for subchild in child)

# Attributes become fields.
# Note that a solution attribute here will override any solution XML element
Expand Down Expand Up @@ -484,7 +485,6 @@ def prepare_download_submissions(
"""
Runs a async task that collects submissions in background and zip them.
"""
# pylint: disable=no-member
require(self.is_course_staff())
user = self.get_real_user()
require(user)
Expand Down Expand Up @@ -539,7 +539,6 @@ def download_submissions(
"""
Api for downloading zip file which consist of all students submissions.
"""
# pylint: disable=no-member
require(self.is_course_staff())
user = self.get_real_user()
require(user)
Expand Down Expand Up @@ -575,7 +574,6 @@ def download_submissions_status(
return Response(json_body={"zip_available": self.is_zip_file_available(user)})

def student_view(self, context=None):
# pylint: disable=no-member
"""
The primary view of the StaffGradedAssignmentXBlock, shown to students
when viewing courses.
Expand Down Expand Up @@ -727,7 +725,6 @@ def get_or_create_student_module(self, user):
Returns:
StudentModule: A StudentModule object
"""
# pylint: disable=no-member
student_module, created = StudentModule.objects.get_or_create(
course_id=self.course_id,
module_state_key=self.location,
Expand Down Expand Up @@ -772,7 +769,6 @@ def student_state(self):
solution = replace_urls_service.replace_urls(force_str(self.solution))
else:
solution = ""
# pylint: disable=no-member
return {
"display_name": force_str(self.display_name),
"uploaded": uploaded,
Expand Down Expand Up @@ -895,7 +891,6 @@ def download(self, path, mime_type, filename, require_staff=False):
def validate_score_message(
self, course_id, username
): # lint-amnesty, pylint: disable=missing-function-docstring
# pylint: disable=no-member
log.error(
"enter_grade: invalid grade submitted for course:%s module:%s student:%s",
course_id,
Expand Down Expand Up @@ -962,7 +957,6 @@ def upload_allowed(self, submission_data=None):
)

def file_storage_path(self, file_hash, original_filename):
# pylint: disable=no-member
"""
Helper method to get the path of an uploaded file
"""
Expand All @@ -972,7 +966,6 @@ def is_zip_file_available(self, user):
"""
returns True if zip file exists.
"""
# pylint: disable=no-member
zip_file_path = get_zip_file_path(
user.username, self.block_course_id, self.block_id, self.location
)
Expand All @@ -982,7 +975,6 @@ def count_archive_files(self, user):
"""
returns number of files archive in zip.
"""
# pylint: disable=no-member
zip_file_path = get_zip_file_path(
user.username, self.block_course_id, self.block_id, self.location
)
Expand Down
Loading
Loading