Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 804887c

Browse files
committed
Merge branch 'master' into peer_support
2 parents 3ef9540 + e1d8327 commit 804887c

56 files changed

Lines changed: 2241 additions & 227 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Our goal is to have unit tests which rely on Selenium (a library that helps simu
162162

163163
**To run tests:**
164164

165-
* Make sure the directory containing the PhantomJS executable is in your ``PATH`` environment variable. e.g. ``PATH=$PATH:path/to/virtualenv/directory/where/it/is/here`` at your command line (or edit your ``.bash_profile``). It should live in the site-packages/selenium/webdriver/ directory of your virtualenv.
165+
* Make sure the directory containing the ChromeDriver executable is in your ``PATH`` environment variable. e.g. ``PATH=$PATH:path/to/chromedriver`` at your command line (or edit your ``.bash_profile``).
166166

167167
* Check out the existing tests, e.g. the ``test_question.py`` file that tests the Question directive, which you can find at the path ``/runestone/question/test/test_question.py``, for an example.
168168

codechat_config.json

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

codechat_config.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# .. Copyright (C) 2012-2020 Bryan A. Jones.
2+
#
3+
# This file is part of the CodeChat System.
4+
#
5+
# The CodeChat System is free software: you can redistribute it and/or
6+
# modify it under the terms of the GNU General Public License as
7+
# published by the Free Software Foundation, either version 3 of the
8+
# License, or (at your option) any later version.
9+
#
10+
# The CodeChat System is distributed in the hope that it will be
11+
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12+
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
# General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU General Public License
16+
# along with the CodeChat System. If not, see
17+
# <http://www.gnu.org/licenses/>.
18+
#
19+
# ************************************************
20+
# |docname| - Configuration for a CodeChat project
21+
# ************************************************
22+
# This file defines the configuration for a CodeChat project. It contains a working `Sphinx <https://www.sphinx-doc.org/>`_ configuration.
23+
#
24+
# ``source_path``: optional; defaults to ``.`` (the current directory). A path to the root of the source tree. Relative paths are rooted in the directory containing this configuration file.
25+
source_path: .
26+
27+
# ``output_path``: required. A path to the root of the HTML output produced by this renderer. Relative paths are rooted in the directory containing this configuration file.
28+
output_path: build/RunestoneComponents
29+
30+
# ``args``: required string or sequence of strings. This provides the arguments to invoke the renderer. These strings may optionally contain the following replacement values:
31+
#
32+
# - ``{project_path}``: an absolute path to the directory containing this file.
33+
# - ``{source_path}``: the ``source_path`` above, but as an absolute path.
34+
# - ``{output_path}``: the ``output_path`` above, but as an absolute path.
35+
#
36+
args: runestone build
37+
38+
# ``html_ext``: optional; defaults to ``.html``. The extension used by this renderer when generating HTML files.
39+
#html_ext: .html

index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Misc
4646
.gitignore
4747
.readthedocs.yml
4848
conf.py
49-
codechat_config.json
49+
codechat_config.yaml
5050
requirements-dev.in
5151
requirements.in
5252
webpack.config.js

requirements-dev.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile
2+
# This file is autogenerated by pip-compile with python 3.9
33
# To update, run:
44
#
55
# pip-compile --output-file=requirements-dev.txt requirements-dev.in requirements.in
@@ -28,7 +28,7 @@ cogapp==3.0.0
2828
# via -r requirements.in
2929
colorama==0.4.4
3030
# via twine
31-
docutils==0.17.1
31+
docutils==0.16
3232
# via
3333
# codechat
3434
# readme-renderer
@@ -47,7 +47,7 @@ importlib-metadata==4.6.1
4747
# twine
4848
iniconfig==1.1.1
4949
# via pytest
50-
isort==5.9.2
50+
isort==5.9.3
5151
# via pylint
5252
jinja2==3.0.1
5353
# via sphinx
@@ -85,7 +85,7 @@ pygments==2.9.0
8585
# codechat
8686
# readme-renderer
8787
# sphinx
88-
pylint==2.9.5
88+
pylint==2.9.6
8989
# via -r requirements-dev.in
9090
pyparsing==2.4.7
9191
# via packaging
@@ -99,13 +99,13 @@ readme-renderer==29.0
9999
# via
100100
# -r requirements-dev.in
101101
# twine
102-
requests-toolbelt==0.9.1
103-
# via twine
104102
requests==2.26.0
105103
# via
106104
# requests-toolbelt
107105
# sphinx
108106
# twine
107+
requests-toolbelt==0.9.1
108+
# via twine
109109
rfc3986==1.5.0
110110
# via twine
111111
selenium==3.141.0
@@ -118,7 +118,7 @@ six==1.16.0
118118
# readme-renderer
119119
snowballstemmer==2.1.0
120120
# via sphinx
121-
sphinx==4.1.2
121+
sphinx==3.5.4
122122
# via
123123
# -r requirements.in
124124
# sphinxcontrib-paverutils
@@ -142,7 +142,7 @@ toml==0.10.2
142142
# via
143143
# pylint
144144
# pytest
145-
tomli==1.1.0
145+
tomli==1.2.0
146146
# via pep517
147147
tqdm==4.61.2
148148
# via twine

requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
click
55
Paver>=1.2.4
66
six>1.12
7-
Sphinx>=2.0.0
7+
Sphinx<4.0.0
88
sphinxcontrib-paverutils>=1.17
99
cogapp>=2.5
1010
SQLAlchemy>=1.4.0

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile
2+
# This file is autogenerated by pip-compile with python 3.9
33
# To update, run:
44
#
55
# pip-compile --output-file=requirements.txt requirements.in
@@ -18,7 +18,7 @@ codechat==1.8.8
1818
# via -r requirements.in
1919
cogapp==3.0.0
2020
# via -r requirements.in
21-
docutils==0.17.1
21+
docutils==0.16
2222
# via
2323
# codechat
2424
# sphinx
@@ -56,7 +56,7 @@ six==1.16.0
5656
# paver
5757
snowballstemmer==2.1.0
5858
# via sphinx
59-
sphinx==4.1.2
59+
sphinx==3.5.4
6060
# via
6161
# -r requirements.in
6262
# sphinxcontrib-paverutils

runestone/__init__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def runestone_static_dirs():
4848
module_static_js.append(os.path.join(basedir, "codelens", "js"))
4949
module_static_js.append(os.path.join(basedir, "webgldemo", "js"))
5050
module_static_js.append(os.path.join(basedir, "matrixeq", "js"))
51-
module_static_css = [os.path.join(basedir, "common", "css", "sphinx")]
51+
module_static_css = []
5252
module_static_css.append(os.path.join(basedir, "accessibility", "css"))
5353
module_static_css.append(os.path.join(basedir, "webgldemo", "css"))
5454
module_static_css.append(os.path.join(basedir, "matrixeq", "css"))
@@ -145,7 +145,12 @@ def setup(app):
145145
print("No custom CSS files")
146146
try:
147147
for c in setup.custom_js_files:
148-
app.add_js_file(c)
148+
if isinstance(c, dict):
149+
#peel off filename, pass rest of key/values on as kwargs
150+
filename = c.pop("file")
151+
app.add_autoversioned_javascript(filename, **c)
152+
else:
153+
app.add_autoversioned_javascript(c)
149154
print("Adding custom Javascript")
150155
except AttributeError:
151156
print("No custom js files")
@@ -225,8 +230,6 @@ def build(options):
225230
css_files = [
226231
# Generated from a template, so it can't be directly included in the webpack.
227232
"bootstrap-sphinx.css",
228-
# Deliberately excluded, so it can be overridden by a user-supplied CSs file.
229-
"theme-overrides.css",
230233
]
231234

232235

runestone/activecode/js/activecode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export class ActiveCode extends RunestoneBase {
132132
);
133133
if (this.autorun) {
134134
// Simulate pressing the run button, since this will also prevent the user from clicking it until the initial run is complete, and also help the user understand why they're waiting.
135-
$(document).ready(this.runButtonHandler.bind(this));
135+
$(this.runButtonHandler.bind(this));
136136
}
137137
this.indicate_component_ready();
138138
}

runestone/activecode/js/activecode_sql.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,13 @@ export default class SQLActiveCode extends ActiveCode {
4040
} else {
4141
if (allDburls[self.dburl].status == "loading") {
4242
allDburls[self.dburl].xWaitFor.done(function () {
43-
self.db = new SQL.Database(
44-
allDburls[self.dburl].db
45-
);
43+
self.db = allDburls[self.dburl].dbObject;
4644
$(self.runButton).removeAttr("disabled");
4745
$(self.runButton).text(buttonText);
4846
});
4947
return;
5048
}
51-
self.db = new SQL.Database(allDburls[self.dburl].db);
49+
self.db = allDburls[self.dburl].dbObject;
5250
$(self.runButton).removeAttr("disabled");
5351
$(self.runButton).text(buttonText);
5452
return;
@@ -60,6 +58,7 @@ export default class SQLActiveCode extends ActiveCode {
6058
xhr.onload = (e) => {
6159
var uInt8Array = new Uint8Array(xhr.response);
6260
self.db = new SQL.Database(uInt8Array);
61+
allDburls[self.dburl].dbObject = self.db;
6362
$(self.runButton).text(buttonText);
6463
$(self.runButton).removeAttr("disabled");
6564
allDburls[self.dburl].db = uInt8Array;

0 commit comments

Comments
 (0)