Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
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
configuration
Commits
60aed232
Commit
60aed232
authored
Aug 08, 2017
by
Shirley He
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add overall courses dict to json
parent
41104dab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
util/course-permutation-tool/generate_permutations.py
+6
-3
No files found.
util/course-permutation-tool/generate_permutations.py
View file @
60aed232
...
@@ -66,7 +66,6 @@ def generate_permutations(fields, index, results, current, fields_dict):
...
@@ -66,7 +66,6 @@ def generate_permutations(fields, index, results, current, fields_dict):
current
[
"run"
]
=
"3T2017"
current
[
"run"
]
=
"3T2017"
current
[
"user"
]
=
"edx@example.com"
current
[
"user"
]
=
"edx@example.com"
# fields_dict = {}
# add permutation fields to dict
# add permutation fields to dict
fields_dict
[
permutation_option
]
=
permutations_values
[
i
]
fields_dict
[
permutation_option
]
=
permutations_values
[
i
]
...
@@ -86,10 +85,14 @@ def generate_permutations(fields, index, results, current, fields_dict):
...
@@ -86,10 +85,14 @@ def generate_permutations(fields, index, results, current, fields_dict):
current
[
"fields"
]
=
fields_dict
.
copy
()
current
[
"fields"
]
=
fields_dict
.
copy
()
results
.
append
(
current
.
copy
())
results
.
append
(
current
.
copy
())
# results
.append(fields_dict.copy()
)
# results
["courses"] = current.copy(
)
print
results
wrapper_courses_dict
=
{}
wrapper_courses_dict
[
"courses"
]
=
results
with
open
(
"test_courses.json"
,
"w"
)
as
outfile
:
with
open
(
"test_courses.json"
,
"w"
)
as
outfile
:
json
.
dump
(
results
,
outfile
)
json
.
dump
(
wrapper_courses_dict
,
outfile
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
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