refactor: move xmodule folder to root
- Moving xmodule folder to root as we're dissolving sub-projects of common folder in edx-platform
- More info: https://openedx.atlassian.net/browse/BOM-2579
- -e common/lib/xmodule has been removed from the requirements as xmodule has itself become the part of edx-platform and not being installed through requirements
- The test files common/lib/xmodule/test_files/ have been removed as they are not being used anymore
This commit is contained in:
@@ -21,7 +21,7 @@ root = Path('../..').abspath()
|
||||
sys.path.insert(0, root)
|
||||
sys.path.append(root / "docs/guides")
|
||||
sys.path.append(root / "common/lib/capa")
|
||||
sys.path.append(root / "common/lib/xmodule")
|
||||
|
||||
|
||||
# Use a settings module that allows all LMS and Studio code to be imported
|
||||
# without errors. If running sphinx-apidoc, we already set a different
|
||||
@@ -222,9 +222,9 @@ autodoc_mock_imports = [
|
||||
modules = {
|
||||
'cms': 'cms',
|
||||
'common/lib/capa/capa': 'common/lib/capa',
|
||||
'common/lib/xmodule/xmodule': 'common/lib/xmodule',
|
||||
'lms': 'lms',
|
||||
'openedx': 'openedx',
|
||||
'xmodule': 'xmodule',
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,4 +9,3 @@ out from edx-platform into separate packages at some point.
|
||||
:maxdepth: 2
|
||||
|
||||
common/lib/capa/modules
|
||||
common/lib/xmodule/modules
|
||||
|
||||
@@ -8,3 +8,4 @@ Python Docstrings
|
||||
common_index
|
||||
lms_index
|
||||
openedx/modules
|
||||
xmodule/modules
|
||||
|
||||
@@ -74,7 +74,7 @@ Test Locations
|
||||
located in ``common/lib/capa/capa/tests``.
|
||||
|
||||
- Javascript unit tests: Located in ``spec`` folders. For example,
|
||||
``common/lib/xmodule/xmodule/js/spec`` and
|
||||
``xmodule/js/spec`` and
|
||||
``{cms,lms}/static/js/spec`` For consistency, you should use the
|
||||
same directory structure for implementation and test. For example,
|
||||
the test for ``src/views/module.js`` should be written in
|
||||
@@ -122,7 +122,7 @@ Various ways to run tests using pytest::
|
||||
|
||||
For example, this command runs a single python unit test file::
|
||||
|
||||
pytest common/lib/xmodule/xmodule/tests/test_stringify.py
|
||||
pytest xmodule/tests/test_stringify.py
|
||||
|
||||
Note -
|
||||
edx-platorm has multiple services (lms, cms) in it. The environment for each service is different enough that we run some tests in both environments in jenkins. To make sure tests will pass in each of these environments (especially for tests in "common" directory), you will need to test in each seperately. Add --rootdir flag at end of your pytest call and specify the env you are testing in::
|
||||
@@ -133,7 +133,7 @@ Various tools like ddt create tests with very complex names, rather than figurin
|
||||
|
||||
1. Select tests to run based on their name, provide an expression to the `pytest -k option`_ which performs a substring match on test names::
|
||||
|
||||
pytest common/lib/xmodule/xmodule/tests/test_stringify.py -k test_stringify
|
||||
pytest xmodule/tests/test_stringify.py -k test_stringify
|
||||
|
||||
.. _pytest -k option: https://docs.pytest.org/en/latest/example/markers.html#using-k-expr-to-select-tests-based-on-their-name
|
||||
.. _node ID: https://docs.pytest.org/en/latest/example/markers.html#node-id
|
||||
@@ -141,7 +141,7 @@ Various tools like ddt create tests with very complex names, rather than figurin
|
||||
|
||||
2. Alternatively, you can the get the name of all test methods in a class, file, or project, including all ddt.data variations, by running pytest with `--collectonly`::
|
||||
|
||||
pytest common/lib/xmodule/xmodule/tests/test_stringify.py --collectonly
|
||||
pytest xmodule/tests/test_stringify.py --collectonly
|
||||
|
||||
Testing with migrations
|
||||
***********************
|
||||
@@ -215,7 +215,7 @@ Use this command to generate an HTML report::
|
||||
|
||||
coverage html
|
||||
|
||||
The report is then saved in reports/common/lib/xmodule/cover/index.html
|
||||
The report is then saved in reports/xmodule/cover/index.html
|
||||
|
||||
To run tests for stub servers, for example for `YouTube stub server`_, you can
|
||||
run one of these commands::
|
||||
|
||||
@@ -1345,7 +1345,7 @@ paths:
|
||||
percent_graded: (float) the percentage of total points the user has received a grade for in a given subsection
|
||||
show_correctness: (str) a str representing whether to show the problem/practice scores based on due date
|
||||
('always', 'never', 'past_due', values defined in
|
||||
common/lib/xmodule/xmodule/modulestore/inheritance.py)
|
||||
xmodule/modulestore/inheritance.py)
|
||||
show_grades: (bool) a bool for whether to show grades based on the access the user has
|
||||
url: (str) the absolute path url to the Subsection
|
||||
enrollment_mode: (str) a str representing the enrollment the user has ('audit', 'verified', ...)
|
||||
|
||||
Reference in New Issue
Block a user