Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-video-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-video-pipeline
Commits
255fd487
Commit
255fd487
authored
Aug 28, 2017
by
muhammad-ammar
Committed by
muzaffaryousaf
Sep 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cielo24 fixes
parent
2fa85511
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
17 deletions
+16
-17
VEDA_OS01/tests/test_transcripts.py
+4
-4
VEDA_OS01/transcripts.py
+1
-1
control/tests/test_deliver_cielo.py
+1
-1
control/veda_deliver_cielo.py
+7
-8
control/veda_val.py
+3
-3
No files found.
VEDA_OS01/tests/test_transcripts.py
View file @
255fd487
...
...
@@ -114,12 +114,12 @@ class Cielo24TranscriptTests(APITestCase):
self
.
transcript_process_metadata
=
TranscriptProcessMetadata
.
objects
.
create
(
**
metadata
)
self
.
transcript_create_data
=
{
'
transcript
_format'
:
transcripts
.
TRANSCRIPT_SJSON
,
'
file
_format'
:
transcripts
.
TRANSCRIPT_SJSON
,
'video_id'
:
self
.
video
.
studio_id
,
'
transcript_url
'
:
'{directory}{uuid}.sjson'
.
format
(
'
name
'
:
'{directory}{uuid}.sjson'
.
format
(
directory
=
CONFIG_DATA
[
'transcript_bucket_directory'
],
uuid
=
self
.
uuid_hex
),
'language'
:
'en'
,
'language
_code
'
:
'en'
,
'provider'
:
TranscriptProvider
.
CIELO24
}
...
...
@@ -227,7 +227,7 @@ class Cielo24TranscriptTests(APITestCase):
# verify sjson data uploaded to s3
bucket
=
conn
.
get_bucket
(
CONFIG_DATA
[
'transcript_bucket_name'
])
key
=
Key
(
bucket
)
key
.
key
=
transcript_create_request_data
[
'
transcript_url
'
]
key
.
key
=
transcript_create_request_data
[
'
name
'
]
sjson
=
json
.
loads
(
key
.
get_contents_as_string
())
self
.
assertEqual
(
sjson
,
TRANSCRIPT_SJSON_DATA
)
...
...
VEDA_OS01/transcripts.py
View file @
255fd487
...
...
@@ -137,7 +137,7 @@ def cielo24_transcript_callback(sender, **kwargs):
provider
=
TranscriptProvider
.
CIELO24
,
process_id
=
job_id
,
lang_code
=
lang_code
)
.
latest
(
'modified'
)
)
.
latest
()
except
TranscriptProcessMetadata
.
DoesNotExist
:
LOGGER
.
exception
(
'[CIELO24 TRANSCRIPTS] Unable to get transcript process metadata for job_id=
%
s'
,
...
...
control/tests/test_deliver_cielo.py
View file @
255fd487
...
...
@@ -126,7 +126,7 @@ class Cielo24TranscriptTests(TestCase):
'method'
:
'GET'
},
{
'url'
:
'https://api.cielo24.com/api/job/perform_transcription?transcription_fidelity=PROFESSIONAL&job_id=000-111-222&v=1&priority=PRIORITY&api_token=cielo24_api_key&callback_url=https
%
253
A
%252
F
%252
Fveda.edx.org
%252
Fcielo24
%252
Ftranscript_completed
%252
F1234567890
%253
Flang_code
%253
D{}
%2526
video_id
%253
D12345
%2526
job_id
%253
D000-111-222
%2526
org
%25
3
DMAx&target_language={}'
,
'url'
:
'https://api.cielo24.com/api/job/perform_transcription?transcription_fidelity=PROFESSIONAL&job_id=000-111-222&v=1&priority=PRIORITY&api_token=cielo24_api_key&callback_url=https
%
3
A
%2
F
%2
Fveda.edx.org
%2
Fcielo24
%2
Ftranscript_completed
%2
F1234567890
%3
Flang_code
%3
D{}
%26
video_id
%3
D12345
%26
job_id
%3
D000-111-222
%26
org
%
3
DMAx&target_language={}'
,
'body'
:
None
,
'method'
:
'GET'
}
...
...
control/veda_deliver_cielo.py
View file @
255fd487
...
...
@@ -105,15 +105,14 @@ class Cielo24Transcript(object):
"""
Request cielo24 to generate transcripts for a video.
"""
callback_url
=
urllib
.
quote_plus
(
build_url
(
self
.
callback_base_url
,
job_id
=
job_id
,
lang_code
=
lang_code
,
org
=
self
.
org
,
video_id
=
self
.
video
.
studio_id
)
callback_url
=
build_url
(
self
.
callback_base_url
,
job_id
=
job_id
,
lang_code
=
lang_code
,
org
=
self
.
org
,
video_id
=
self
.
video
.
studio_id
)
response
=
requests
.
get
(
build_url
(
self
.
cielo24_site
,
...
...
control/veda_val.py
View file @
255fd487
...
...
@@ -398,10 +398,10 @@ class VALAPICall():
post_data
=
{
'video_id'
:
video_id
,
'language'
:
lang_code
,
'transcript_url'
:
name
,
'transcript_format'
:
transcript_format
,
'name'
:
name
,
'provider'
:
provider
,
'language_code'
:
lang_code
,
'file_format'
:
transcript_format
,
}
response
=
requests
.
post
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment