From fb13bed94746c828cacc3112dda79d2afd878a54 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Tue, 10 Dec 2013 11:34:28 -0500 Subject: [PATCH] Updating comments and docs for MITx -> edX transition --- .../management/commands/clone_course.py | 2 +- .../management/commands/delete_course.py | 4 ++-- cms/envs/common.py | 6 +++--- cms/envs/test.py | 2 +- common/djangoapps/static_replace/__init__.py | 2 +- common/lib/xmodule/xmodule/gst_module.py | 2 +- docs/developers/Makefile | 8 ++++---- docs/internal/development.md | 8 ++++---- docs/internal/overview.md | 2 -- docs/internal/remote_gradebook.md | 10 +++++----- i18n/config.py | 14 ++++++++------ i18n/generate.py | 2 +- i18n/make_dummy.py | 2 +- lms/djangoapps/course_wiki/utils.py | 6 +++--- lms/envs/common.py | 8 ++++---- lms/envs/dev.py | 6 +++--- lms/envs/dev_ike.py | 2 +- lms/envs/devplus.py | 2 +- lms/envs/edx4edx_aws.py | 2 +- lms/envs/static.py | 2 +- lms/envs/test.py | 4 ++-- proxy/nginx.conf | 2 +- requirements/edx/local.txt | 2 +- scripts/runone.py | 4 ++-- scripts/setup-test-dirs.sh | 16 ++++++++-------- 25 files changed, 60 insertions(+), 60 deletions(-) diff --git a/cms/djangoapps/contentstore/management/commands/clone_course.py b/cms/djangoapps/contentstore/management/commands/clone_course.py index 5ad0da09d8..04f0c89087 100644 --- a/cms/djangoapps/contentstore/management/commands/clone_course.py +++ b/cms/djangoapps/contentstore/management/commands/clone_course.py @@ -11,7 +11,7 @@ from auth.authz import _copy_course_group # -# To run from command line: rake cms:clone SOURCE_LOC=MITx/111/Foo1 DEST_LOC=MITx/135/Foo3 +# To run from command line: rake cms:clone SOURCE_LOC=edX/111/Foo1 DEST_LOC=edX/135/Foo3 # class Command(BaseCommand): """Clone a MongoDB-backed course to another location""" diff --git a/cms/djangoapps/contentstore/management/commands/delete_course.py b/cms/djangoapps/contentstore/management/commands/delete_course.py index 085fce5fe5..2f2aba12e5 100644 --- a/cms/djangoapps/contentstore/management/commands/delete_course.py +++ b/cms/djangoapps/contentstore/management/commands/delete_course.py @@ -7,7 +7,7 @@ from contentstore.utils import delete_course_and_groups # -# To run from command line: rake cms:delete_course LOC=MITx/111/Foo1 +# To run from command line: rake cms:delete_course LOC=edX/111/Foo1 # class Command(BaseCommand): help = '''Delete a MongoDB backed course''' @@ -23,7 +23,7 @@ class Command(BaseCommand): commit = args[1] == 'commit' if commit: - print 'Actually going to delete the course from DB....' + print('Actually going to delete the course from DB....') if query_yes_no("Deleting course {0}. Confirm?".format(course_id), default="no"): if query_yes_no("Are you sure. This action cannot be undone!", default="no"): diff --git a/cms/envs/common.py b/cms/envs/common.py index 43ffa21df6..daea3a3f0e 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -67,11 +67,11 @@ ENABLE_JASMINE = False ############################# SET PATH INFORMATION ############################# -PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /mitx/cms +PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /edx-platform/cms REPO_ROOT = PROJECT_ROOT.dirname() COMMON_ROOT = REPO_ROOT / "common" LMS_ROOT = REPO_ROOT / "lms" -ENV_ROOT = REPO_ROOT.dirname() # virtualenv dir /mitx is in +ENV_ROOT = REPO_ROOT.dirname() # virtualenv dir /edx-platform is in GITHUB_REPO_ROOT = ENV_ROOT / "data" @@ -230,7 +230,7 @@ USE_I18N = False USE_L10N = True # Localization strings (e.g. django.po) are under this directory -LOCALE_PATHS = (REPO_ROOT + '/conf/locale',) # mitx/conf/locale/ +LOCALE_PATHS = (REPO_ROOT + '/conf/locale',) # edx-platform/conf/locale/ # Messages MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' diff --git a/cms/envs/test.py b/cms/envs/test.py index 8e27032adc..a35824ed52 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -4,7 +4,7 @@ sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file - /mitx # The location of this repo + /edx-platform # The location of this repo /log # Where we're going to write log files """ diff --git a/common/djangoapps/static_replace/__init__.py b/common/djangoapps/static_replace/__init__.py index bd0102272c..a05129d864 100644 --- a/common/djangoapps/static_replace/__init__.py +++ b/common/djangoapps/static_replace/__init__.py @@ -119,7 +119,7 @@ def replace_static_urls(text, data_directory, course_id=None, static_asset_path= # if we're running with a MongoBacked store course_namespace is not None, then use studio style urls elif (not static_asset_path) and course_id and modulestore().get_modulestore_type(course_id) != XML_MODULESTORE_TYPE: # first look in the static file pipeline and see if we are trying to reference - # a piece of static content which is in the mitx repo (e.g. JS associated with an xmodule) + # a piece of static content which is in the edx-platform repo (e.g. JS associated with an xmodule) exists_in_staticfiles_storage = False try: diff --git a/common/lib/xmodule/xmodule/gst_module.py b/common/lib/xmodule/xmodule/gst_module.py index ef69130f84..57f95a17dc 100644 --- a/common/lib/xmodule/xmodule/gst_module.py +++ b/common/lib/xmodule/xmodule/gst_module.py @@ -128,7 +128,7 @@ class GraphicalSliderToolModule(GraphicalSliderToolFields, XModule): html_string with their divs. Html_string is content of tag inside tag. Documentation on how information in tag is organized and processed is located in: - mitx/docs/build/html/graphical_slider_tool.html. + edx-platform/docs/build/html/graphical_slider_tool.html. Args: html_string: content of tag, with controls as xml tags, diff --git a/docs/developers/Makefile b/docs/developers/Makefile index faa8708cd4..3b407439ee 100644 --- a/docs/developers/Makefile +++ b/docs/developers/Makefile @@ -88,17 +88,17 @@ qthelp: @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/MITx.qhcp" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/edX.qhcp" @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/MITx.qhc" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/edX.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/MITx" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/MITx" + @echo "# mkdir -p $$HOME/.local/share/devhelp/edX" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/edX" @echo "# devhelp" epub: diff --git a/docs/internal/development.md b/docs/internal/development.md index 1ce44a938e..f322d00f17 100644 --- a/docs/internal/development.md +++ b/docs/internal/development.md @@ -97,9 +97,9 @@ Instead, hit /migrate/modules to see a list of all modules loaded, and click on github (or other equivalent git-based repository systems) used for course content can be setup to trigger an automatic reload when changes are pushed. Here is how: -1. Each content directory in mitx_all/data should be a clone of a git repo +1. Each content directory in edx_all/data should be a clone of a git repo -2. The user running the mitx gunicorn process should have its ssh key registered with the git repo +2. The user running the edx gunicorn process should have its ssh key registered with the git repo 3. The list settings.ALLOWED_GITRELOAD_IPS should contain the IP address of the git repo originating the gitreload request. By default, this list is ['207.97.227.253', '50.57.128.197', '108.171.174.178'] (the github IPs). @@ -109,9 +109,9 @@ course content can be setup to trigger an automatic reload when changes are push { "repository" : { "name" : reload_dir } - where reload_dir is the directory name of the content to reload (ie mitx_all/data/reload_dir should exist) + where reload_dir is the directory name of the content to reload (ie edx_all/data/reload_dir should exist) - The mitx server will then do "git reset --hard HEAD; git clean -f -d; git pull origin" in that directory. After the pull, + The edx server will then do "git reset --hard HEAD; git clean -f -d; git pull origin" in that directory. After the pull, it will reload the modulestore for that course. Note that the gitreload-based workflow is not meant for deployments on AWS (or elsewhere) which use collectstatic, since collectstatic is not run by a gitreload event. diff --git a/docs/internal/overview.md b/docs/internal/overview.md index 911c93ab24..dc79b7ea67 100644 --- a/docs/internal/overview.md +++ b/docs/internal/overview.md @@ -101,8 +101,6 @@ The LMS is a django site, with root in `lms/`. It runs in many different enviro - ajax calls go to `module_render.py:handle_xblock_callback()`, which passes it to one of the `XBlock`s handler functions - - [This diagram](https://github.com/MITx/mitx/wiki/MITx-Architecture) visually shows how the clients communicate with problems + modules. - - See `lms/urls.py` for the wirings of urls to views. - Tracking: there is support for basic tracking of client-side events in `lms/djangoapps/track`. diff --git a/docs/internal/remote_gradebook.md b/docs/internal/remote_gradebook.md index 644105a76d..d66080ac1c 100644 --- a/docs/internal/remote_gradebook.md +++ b/docs/internal/remote_gradebook.md @@ -2,7 +2,7 @@ Grades can be pushed to a remote gradebook, and course enrollment membership can 1. Definitions -An "xserver" is a web-based server that is part of the MITx eco system. There are a number of "xserver" programs, including one which does python code grading, an xqueue server, and graders for other coding languages. +An "xserver" is a web-based server that is part of the edX ecosystem. There are a number of "xserver" programs, including one which does python code grading, an xqueue server, and graders for other coding languages. "Stellar" is the MIT on-campus gradebook system. @@ -14,10 +14,10 @@ The remote gradebook xserver should be specified in the lms.envs configuration u Each course, in addition, should define the name of the gradebook being used. A class "section" may also be specified. This goes in the policy.json file, eg: - "remote_gradebook": { - "name" : "STELLAR:/project/mitxdemosite", - "section" : "r01" - }, + "remote_gradebook": { + "name" : "STELLAR:/project/edxdemosite", + "section" : "r01" + }, 3. The API for the remote gradebook xserver is an almost RESTful service model, which only employs POSTs, to the xserver url, with form data for the fields: diff --git a/i18n/config.py b/i18n/config.py index 6f3e5d7773..015af84673 100644 --- a/i18n/config.py +++ b/i18n/config.py @@ -1,13 +1,15 @@ -import os, json +import os +import json from path import path # BASE_DIR is the working directory to execute django-admin commands from. -# Typically this should be the 'mitx' directory. +# Typically this should be the 'edx-platform' directory. BASE_DIR = path(__file__).abspath().dirname().joinpath('..').normpath() # LOCALE_DIR contains the locale files. -# Typically this should be 'mitx/conf/locale' -LOCALE_DIR = BASE_DIR.joinpath('conf', 'locale') +# Typically this should be 'edx-platform/conf/locale' +LOCALE_DIR = BASE_DIR.joinpath('conf', 'locale') + class Configuration: """ @@ -61,7 +63,7 @@ class Configuration: def get_messages_dir(self, locale): """ Returns the name of the directory holding the po files for locale. - Example: mitx/conf/locale/fr/LC_MESSAGES + Example: edx-platform/conf/locale/fr/LC_MESSAGES """ return LOCALE_DIR.joinpath(locale, 'LC_MESSAGES') @@ -69,7 +71,7 @@ class Configuration: def source_messages_dir(self): """ Returns the name of the directory holding the source-language po files (English). - Example: mitx/conf/locale/en/LC_MESSAGES + Example: edx-platform/conf/locale/en/LC_MESSAGES """ return self.get_messages_dir(self.source_locale) diff --git a/i18n/generate.py b/i18n/generate.py index 65c65c00d6..cdb2d1e457 100755 --- a/i18n/generate.py +++ b/i18n/generate.py @@ -9,7 +9,7 @@ necessary as part of the build process since these .mofiles are needed by Django when serving the web app. - The configuration file (in mitx/conf/locale/config) specifies which + The configuration file (in edx-platform/conf/locale/config) specifies which languages to generate. """ diff --git a/i18n/make_dummy.py b/i18n/make_dummy.py index 20eac03522..0c6983db8d 100755 --- a/i18n/make_dummy.py +++ b/i18n/make_dummy.py @@ -20,7 +20,7 @@ # $ ./make_dummy.py ../conf/locale/en/LC_MESSAGES/django.po # # generates output to -# mitx/conf/locale/eo/LC_MESSAGES/django.po +# edx-platform/conf/locale/eo/LC_MESSAGES/django.po import os, sys import polib diff --git a/lms/djangoapps/course_wiki/utils.py b/lms/djangoapps/course_wiki/utils.py index 5f75dcad94..2fb5412d35 100644 --- a/lms/djangoapps/course_wiki/utils.py +++ b/lms/djangoapps/course_wiki/utils.py @@ -9,14 +9,14 @@ def user_is_article_course_staff(user, article): """ The root of a course wiki is /. This means in case there are two courses which have the same course_number they will end up with - the same course wiki root e.g. MITX/Phy101/Spring and HarvardX/Phy101/Fall + the same course wiki root e.g. MITx/Phy101/Spring and HarvardX/Phy101/Fall will share /Phy101. This looks at the course wiki root of the article and returns True if the user belongs to a group whose name starts with 'instructor_' or 'staff_' and contains '//'. So if the user is - staff on course MITX/Phy101/Spring they will be in - 'instructor_MITX/Phy101/Spring' or 'staff_MITX/Phy101/Spring' groups and + staff on course MITx/Phy101/Spring they will be in + 'instructor_MITx/Phy101/Spring' or 'staff_MITx/Phy101/Spring' groups and so this will return True. """ diff --git a/lms/envs/common.py b/lms/envs/common.py index 9f86c546b7..893e537f77 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -216,7 +216,7 @@ XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds PROJECT_ROOT = path(__file__).abspath().dirname().dirname() # /edx-platform/lms REPO_ROOT = PROJECT_ROOT.dirname() COMMON_ROOT = REPO_ROOT / "common" -ENV_ROOT = REPO_ROOT.dirname() # virtualenv dir /mitx is in +ENV_ROOT = REPO_ROOT.dirname() # virtualenv dir /edx-platform is in COURSES_ROOT = ENV_ROOT / "data" DATA_DIR = COURSES_ROOT @@ -245,7 +245,7 @@ STATUS_MESSAGE_PATH = ENV_ROOT / "status_message.json" ############################ OpenID Provider ################################## OPENID_PROVIDER_TRUSTED_ROOTS = ['cs50.net', '*.cs50.net'] -################################## MITXWEB ##################################### +################################## EDX WEB ##################################### # This is where we stick our compiled template files. Most of the app uses Mako # templates from tempdir import mkdtemp_clean @@ -490,7 +490,7 @@ MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' # gitreload is used in LMS-workflow to pull content from github # gitreload requests are only allowed from these IP addresses, which are # the advertised public IPs of the github WebHook servers. -# These are listed, eg at https://github.com/MITx/mitx/admin/hooks +# These are listed, eg at https://github.com/edx/edx-platform/admin/hooks ALLOWED_GITRELOAD_IPS = ['207.97.227.253', '50.57.128.197', '108.171.174.178'] @@ -821,7 +821,7 @@ STATICFILES_IGNORE_PATTERNS = ( PIPELINE_YUI_BINARY = 'yui-compressor' -# Setting that will only affect the MITx version of django-pipeline until our changes are merged upstream +# Setting that will only affect the edX version of django-pipeline until our changes are merged upstream PIPELINE_COMPILE_INPLACE = True ################################# CELERY ###################################### diff --git a/lms/envs/dev.py b/lms/envs/dev.py index a825a24408..dc56ec22e5 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -4,7 +4,7 @@ sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file - /mitx # The location of this repo + /edx-platform # The location of this repo /log # Where we're going to write log files """ @@ -158,9 +158,9 @@ if os.path.isdir(DATA_DIR): ] -################################# mitx revision string ##################### +################################# edx-platform revision string ##################### -MITX_VERSION_STRING = os.popen('cd %s; git describe' % REPO_ROOT).read().strip() +EDX_PLATFORM_VERSION_STRING = os.popen('cd %s; git describe' % REPO_ROOT).read().strip() ############################ Open ended grading config ##################### diff --git a/lms/envs/dev_ike.py b/lms/envs/dev_ike.py index 92c40b53e1..cad2726939 100644 --- a/lms/envs/dev_ike.py +++ b/lms/envs/dev_ike.py @@ -4,7 +4,7 @@ sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file - /mitx # The location of this repo + /edx-platform # The location of this repo /log # Where we're going to write log files """ diff --git a/lms/envs/devplus.py b/lms/envs/devplus.py index bfd0788165..adda94ff08 100644 --- a/lms/envs/devplus.py +++ b/lms/envs/devplus.py @@ -9,7 +9,7 @@ Assumptions: Dir structure: /envroot/ - /mitx # The location of this repo + /edx-platform # The location of this repo /log # Where we're going to write log files """ diff --git a/lms/envs/edx4edx_aws.py b/lms/envs/edx4edx_aws.py index 247fa866bc..a78c477797 100644 --- a/lms/envs/edx4edx_aws.py +++ b/lms/envs/edx4edx_aws.py @@ -10,7 +10,7 @@ COURSE_TITLE = "edx4edx: edX Author Course" EDX4EDX_ROOT = ENV_ROOT / "data/edx4edx" ### Dark code. Should be enabled in local settings for devel. -ENABLE_MULTICOURSE = True # set to False to disable multicourse display (see lib.util.views.mitxhome) +ENABLE_MULTICOURSE = True # set to False to disable multicourse display (see lib.util.views.edxhome) ### PIPELINE_CSS_COMPRESSOR = None PIPELINE_JS_COMPRESSOR = None diff --git a/lms/envs/static.py b/lms/envs/static.py index 5d72829235..ce3d8d610f 100644 --- a/lms/envs/static.py +++ b/lms/envs/static.py @@ -4,7 +4,7 @@ sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file - /mitx # The location of this repo + /edx-platform # The location of this repo /log # Where we're going to write log files """ diff --git a/lms/envs/test.py b/lms/envs/test.py index b6ef94e5d3..31636f6aad 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -4,7 +4,7 @@ sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file - /mitx # The location of this repo + /edx-platform # The location of this repo /log # Where we're going to write log files """ @@ -221,7 +221,7 @@ STATICFILES_DIRS.append(("uploads", MEDIA_ROOT)) new_staticfiles_dirs = [] # Strip out any static files that aren't in the repository root -# so that the tests can run with only the mitx directory checked out +# so that the tests can run with only the edx-platform directory checked out for static_dir in STATICFILES_DIRS: # Handle both tuples and non-tuple directory definitions try: diff --git a/proxy/nginx.conf b/proxy/nginx.conf index 2b48e17d03..282f3486ec 100644 --- a/proxy/nginx.conf +++ b/proxy/nginx.conf @@ -1,6 +1,6 @@ # Mapping of # -# From the /mitx directory: +# From the /edx-platform directory: # /usr/local/Cellar/nginx/1.2.2/sbin/nginx -p `pwd`/ -c nginx.conf worker_processes 1; diff --git a/requirements/edx/local.txt b/requirements/edx/local.txt index 7941f9fa5e..8a9568fdd5 100644 --- a/requirements/edx/local.txt +++ b/requirements/edx/local.txt @@ -1,4 +1,4 @@ -# Python libraries to install that are local to the mitx repo +# Python libraries to install that are local to the edx-platform repo -e common/lib/calc -e common/lib/capa -e common/lib/chem diff --git a/scripts/runone.py b/scripts/runone.py index 3c2b312723..e4dcce8dea 100755 --- a/scripts/runone.py +++ b/scripts/runone.py @@ -5,7 +5,7 @@ import os import sys # I want this: -# ERROR: test_update_and_fetch (mitx.cms.djangoapps.contentstore.tests.test_course_settings.CourseDetailsViewTest) +# ERROR: test_update_and_fetch (edx-platform.cms.djangoapps.contentstore.tests.test_course_settings.CourseDetailsViewTest) # to become: # test --settings=cms.envs.test --pythonpath=. -s cms/djangoapps/contentstore/tests/test_course_settings.py:CourseDetailsViewTest.test_update_and_fetch @@ -38,7 +38,7 @@ def main(argv): else: test_method = words[0] test_path = words[1].split('.') - if test_path[0] == 'mitx': + if test_path[0] == 'edx-platform': del test_path[0] test_class = test_path[-1] del test_path[-1] diff --git a/scripts/setup-test-dirs.sh b/scripts/setup-test-dirs.sh index c4db61ec16..efd18fa493 100755 --- a/scripts/setup-test-dirs.sh +++ b/scripts/setup-test-dirs.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# Create symlinks from ~/mitx_all/data or $ROOT/data, with root passed as first arg -# to all the test courses in mitx/common/test/data/ +# Create symlinks from ~/edx_all/data or $ROOT/data, with root passed as first arg +# to all the test courses in edx-platform/common/test/data/ # posix compliant sanity check if [ -z $BASH ] || [ $BASH = "/bin/sh" ]; then @@ -9,20 +9,20 @@ echo "Please use the bash interpreter to run this script" exit 1 fi -ROOT="${1:-$HOME/mitx_all}" +ROOT="${1:-$HOME/edx_all}" if [[ ! -d "$ROOT" ]]; then echo "'$ROOT' is not a directory" exit 1 fi -if [[ ! -d "$ROOT/mitx" ]]; then - echo "'$ROOT' is not the root mitx_all directory" +if [[ ! -d "$ROOT/edx-platform" ]]; then + echo "'$ROOT' is not the root edx_all directory" exit 1 fi if [[ ! -d "$ROOT/data" ]]; then - echo "'$ROOT' is not the root mitx_all directory" + echo "'$ROOT' is not the root edx_all directory" exit 1 fi @@ -30,7 +30,7 @@ echo "ROOT is $ROOT" cd $ROOT/data -for course in $(/bin/ls ../mitx/common/test/data/) +for course in $(/bin/ls ../edx-platform/common/test/data/) do # Get rid of the symlink if it already exists if [[ -L "$course" ]]; then @@ -39,7 +39,7 @@ do fi echo "Make link to '$course'" # Create it - ln -s "../mitx/common/test/data/$course" + ln -s "../edx-platform/common/test/data/$course" done # go back to where we came from