Skip to content

Commit 68efa60

Browse files
committed
Update docs
1 parent 5adec72 commit 68efa60

14 files changed

Lines changed: 583 additions & 157 deletions

docs/environment.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: py35
2+
dependencies:
3+
- python=3.5.1=0
4+
- sphinx>1.4.0
5+
- sphinx_rtd_theme>=0.1.9

docs/source/Processes.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
Processes
2-
=========
1+
Expressions
2+
===========
3+
4+
[TODO: Managing Processes taken from wiki, will update with spec2 functions]
5+
6+
`has_equal` Syntax
7+
------------------
8+
9+
`call` Syntax
10+
-------------
11+
12+
Managing Processes
13+
-----------------
314

415
As mentioned on the [wiki Homepage](https://github.com/datacamp/pythonwhat/wiki), DataCamp uses two separate processes. One process to run the solution code, and one process to run the student's submission. This way, `pythonwhat` has access to the 'ideal ending scenario' of an exercises; this makes it easier to write SCTs. Instead of having to specify which value an object should be, we can have `test_object()` look into the solution process and compare the object in that process with the object in the student process.
516

docs/source/conf.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,22 @@
1515
import sys
1616
import os
1717

18+
# Mock heavy duty pythonwhat dependencies for autodoc
19+
import mock
20+
21+
MOCK_MODULES = ['numpy', 'pandas', 'dill', 'markdown2']
22+
for mod_name in MOCK_MODULES:
23+
sys.modules[mod_name] = mock.Mock()
1824
# If extensions (or modules to document with autodoc) are in another directory,
1925
# add these directories to sys.path here. If the directory is relative to the
2026
# documentation root, use os.path.abspath to make it absolute, like shown here.
21-
#sys.path.insert(0, os.path.abspath('.'))
27+
sys.path.insert(0, os.path.abspath('../..'))
28+
2229

2330
# -- General configuration ------------------------------------------------
2431

2532
# If your documentation needs a minimal Sphinx version, state it here.
26-
#needs_sphinx = '1.0'
33+
#needs_sphinx = '1.3.5'
2734

2835
# Add any Sphinx extension module names here, as strings. They can be
2936
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom

docs/source/index.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ Contents:
88
:maxdepth: 2
99

1010
Home
11-
quickstart_guide
12-
test_functions
13-
parts_cheatsheet
11+
quickstart_guide.md
12+
simple_tests.md
13+
parts_cheatsheet.rst
1414
Processes
15-
Sub-SCTs
15+
logic
16+
spec2_summary
17+
test_functions
1618

1719
Indices and tables
1820
==================
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
Composite SCTs
1+
Logic
22
==============
33

4+
[TODO: this is a previous version, will update with spec2 functions]
5+
46
Several functions, such as `test_correct()`, `test_or()`, `test_function_definition()`, among others, also have arguments that expect another set of tests. This article will explain the different ways of specifying these 'sub-tests'.
57

68
Let's take the example of `test_correct()`; this function takes two sets of tests. The first set is executed, and if it's fine, the second set is left alone. If the first set of tests results in an error, the second set is executed and the feedback is logged.

docs/source/parts_cheatsheet.md

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)