Commit Graph

27 Commits

Author SHA1 Message Date
M. Zulqarnain
41e5403f4e BOM-2369 (D): pyupgrade on contentstore/views (#26767)
* pyupgrade on contentstore/views

* Apply suggestions from code review

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2021-03-05 14:55:14 +05:00
usamasadiq
7bbde8f0f5 Applied pylint-amnesty 2021-02-08 13:00:22 +05:00
Régis Behmo
97399cf97c Fix TypeError during transcript upload to S3
On a platform that is configured to upload video transcripts to S3
(`DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"`),
uploads from the studio fail with a TypeError: "Unicode-objects must be
encoded before hashing"

A full stacktrace of the issue can be found here:
https://sentry.overhang.io/share/issue/2249b6f67d794c7e986cc288758f4ebe/

This error is triggered by md5 hashing in the botocore library, which
itself is used by the S3Boto3Storage storage class. This error does not
occur with filesystem-based uploads because it does not perform checksum
verification. The reason why this error would not occur on edx.org is
unknown. Similar issues were already fixed from edxval.

To address this issue, we encode the transcript file content prior to
sending it to s3.
2021-01-25 12:23:31 +01:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Kyle McCormick
a3deb6e317 Sort imports in cms/
Command: `isort --recursive cms/`
2020-10-19 09:34:31 -04:00
Kyle McCormick
538dbf696b Import CMS code using fully qualified module names
or, using proper the proper Python 3 relative imports
(e.g., 'from .views import x') which are standard and
unambiguous.
2020-10-19 09:34:31 -04:00
Zainab Amir
0b80987ba0 Add vem_enabled_courses_percentage (#24294)
Add a field to VEM config model that will decide the percentage of
courses allowed to go to VEM pipeline. The courses that don't meet the
criteria will go to VEDA.

PROD-1722
2020-06-26 14:30:42 +05:00
Zainab Amir
cdc1c91980 Integrate Video Encode Manager (#24093)
* Add VEMPipelineIntegration config model
* Add course waffle flag to enable vem pipeline selectively

PROD-1636
2020-06-04 11:45:34 +05:00
Zainab Amir
bfd95c7fbb Remove transcript credential saving in VAL (#24066) 2020-05-27 18:38:01 +05:00
Syed Muhammad Dawoud Sheraz Ali
cd6549748b add credentials saving in VAL (#23561) 2020-04-02 11:21:09 +05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Feanil Patel
66382961a7 Fix all transcript related tests.
Treat transcript content as unicode strings and convert them at any edge
where we encounter them.  One decision made here was to not update
edx-val it treats transcripts as byte but is much closer to the actual
files so it makes more sense over there. But within the platform they
are generally passed around as serialized json and so it's much better
for them to be unicode.
2019-10-07 13:49:25 -04:00
arbisoft
933a55d92e BOM-399
Fixing encode/decode issues for python3.
2019-08-22 15:35:01 +05:00
Ayub khan
b06fcd27d2 INCR-334 python3 compatibility 2019-07-09 15:43:24 +05:00
Matthew Piatetsky
7df30938c4 fix unicode strings in cms/ 2019-02-04 13:01:51 -05:00
Ned Batchelder
3353e7425e Remove unused imports 2018-11-03 16:07:05 -04:00
muhammad-ammar
aaaafee2b2 remove video transcript enabled flag 2018-04-30 15:59:32 +05:00
Qubad786
c90aa33cb8 Integrate with the updated VAL api utils. 2018-02-16 19:06:44 +05:00
Qubad786
55001ca81a Transcript delete on Video Upload Page - EDUCATOR-1961 2018-01-11 13:08:07 +05:00
Mushtaq Ali
10d79b0047 Update user strings 2018-01-09 17:03:46 +05:00
Qubad786
4f422e37d9 Refactor transcript upload handler to add language-overwrite support - EDUCATOR-2022 2018-01-09 17:03:45 +05:00
Qubad786
090e5dc534 Transcript upload backend for Video Upload Page – EDUCATOR-1854 2018-01-09 17:03:44 +05:00
Qubad786
c760c6a01b Download transcript on video upload page - EDUCATOR-1853 2018-01-09 17:03:44 +05:00
Muzaffar yousaf
7157ec2e2f Revert "Revert "Transcript secure credentials"" 2017-11-08 21:18:00 +05:00
Feanil Patel
9a35a5439e Revert "Transcript secure credentials" 2017-11-07 13:07:32 -05:00
Mushtaq Ali
9d40404206 Modify reset button and invalid credential error text 2017-11-07 13:18:59 +05:00
Qubad786
2310614bb6 Save credentials in edx-video-pipeline
EDUCATOR-1335 - This Adds a dedicated app which is responsible for communication with edx-video-pipeline service. It also adds the backend for saving 3rd party transcription service credentials on edx-video-pipline and cache it in edx-val.
2017-11-07 13:18:58 +05:00