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

Commit 8991af6

Browse files
authored
Merge branch 'RunestoneInteractive:master' into master
2 parents 519f86f + dd75ea5 commit 8991af6

Some content is hidden

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

49 files changed

+387
-208
lines changed

CONTRIBUTING.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ Coding Standards
1515

1616
* All components must be Python 3 compatible. The ``six`` module is already
1717
in the requirements.txt file, so feel free to use that.
18-
* No Tabs for Python files (4 spaces = 1 indentation)
18+
* No Tabs for Python files (4 spaces = 1 indentation)
19+
* We use black to format all of our Python code.
20+
* No Tabs in Javascript files (4 spaces = 1 indentation)
21+
* We use Prettier to format our Javascript - please make sure you configure prettier to use 4 spaces as the tab size.
1922
* Avoid proliferation of jQuery versions. Make your stuff compatible with the version
2023
of jQuery in the common folder.
2124
* Avoid proliferation of additional third party javascript modules. We are already out of

index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Components
2828
runestone/__main__.py
2929
runestone/conftest.py
3030
runestone/shared_conftest.py
31-
runestone/unittest_base.py
3231

3332

3433
Packaging

pytest.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# ****************************
2+
# |docname| - Configure pytest
3+
# ****************************
4+
[pytest]
5+
# See `Registering marks <https://docs.pytest.org/en/stable/how-to/mark.html>`_; this mark is defined in `selenium_module_fixture`.
6+
markers =
7+
exit_status_success: Determine if the runestone build exit code is checked by ``selenium_module_fixture``.

requirements-dev.txt

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
alabaster==0.7.12
88
# via sphinx
9-
astroid==2.9.3
9+
astroid==2.11.2
1010
# via pylint
1111
async-generator==1.10
1212
# via
@@ -40,11 +40,13 @@ cogapp==3.3.0
4040
# via -r requirements.in
4141
colorama==0.4.4
4242
# via twine
43-
cryptography==36.0.1
43+
cryptography==36.0.2
4444
# via
4545
# pyopenssl
4646
# urllib3
47-
docutils==0.16
47+
dill==0.3.4
48+
# via pylint
49+
docutils==0.17.1
4850
# via
4951
# codechat
5052
# myst-parser
@@ -59,16 +61,18 @@ idna==3.3
5961
# urllib3
6062
imagesize==1.3.0
6163
# via sphinx
62-
importlib-metadata==4.11.2
64+
importlib-metadata==4.11.3
6365
# via
6466
# keyring
67+
# sphinx
6568
# twine
6669
iniconfig==1.1.1
6770
# via pytest
6871
isort==5.10.1
6972
# via pylint
7073
jinja2==3.0.3
7174
# via
75+
# -r requirements.in
7276
# myst-parser
7377
# sphinx
7478
keyring==23.5.0
@@ -81,9 +85,9 @@ markdown-it-py==2.0.1
8185
# via
8286
# mdit-py-plugins
8387
# myst-parser
84-
markupsafe==2.1.0
88+
markupsafe==2.1.1
8589
# via jinja2
86-
mccabe==0.6.1
90+
mccabe==0.7.0
8791
# via pylint
8892
mdit-py-plugins==0.3.0
8993
# via myst-parser
@@ -121,23 +125,23 @@ pygments==2.11.2
121125
# codechat
122126
# readme-renderer
123127
# sphinx
124-
pylint==2.12.2
128+
pylint==2.13.1
125129
# via -r requirements-dev.in
126130
pyopenssl==22.0.0
127131
# via urllib3
128132
pyparsing==3.0.7
129133
# via packaging
130134
pysocks==1.7.1
131135
# via urllib3
132-
pytest==7.0.1
136+
pytest==7.1.1
133137
# via -r requirements-dev.in
134-
pytz==2021.3
138+
pytz==2022.1
135139
# via babel
136140
pyvirtualdisplay==3.0
137141
# via -r requirements-dev.in
138142
pyyaml==6.0
139143
# via myst-parser
140-
readme-renderer==32.0
144+
readme-renderer==34.0
141145
# via
142146
# -r requirements-dev.in
143147
# twine
@@ -150,7 +154,7 @@ requests-toolbelt==0.9.1
150154
# via twine
151155
rfc3986==2.0.0
152156
# via twine
153-
selenium==4.1.2
157+
selenium==4.1.3
154158
# via -r requirements-dev.in
155159
six==1.16.0
156160
# via
@@ -182,15 +186,14 @@ sphinxcontrib-qthelp==1.0.3
182186
# via sphinx
183187
sphinxcontrib-serializinghtml==1.1.5
184188
# via sphinx
185-
sqlalchemy==1.4.31
189+
sqlalchemy==1.4.32
186190
# via -r requirements.in
187-
toml==0.10.2
188-
# via pylint
189191
tomli==2.0.1
190192
# via
191193
# pep517
194+
# pylint
192195
# pytest
193-
tqdm==4.63.0
196+
tqdm==4.63.1
194197
# via twine
195198
trio==0.20.0
196199
# via
@@ -205,7 +208,7 @@ typing-extensions==4.1.1
205208
# astroid
206209
# myst-parser
207210
# pylint
208-
urllib3[secure,socks]==1.26.8
211+
urllib3[secure,socks]==1.26.9
209212
# via
210213
# requests
211214
# selenium
@@ -216,7 +219,7 @@ wheel==0.37.1
216219
# via
217220
# -r requirements-dev.in
218221
# pip-tools
219-
wrapt==1.13.3
222+
wrapt==1.14.0
220223
# via astroid
221224
wsproto==1.1.0
222225
# via trio-websocket

requirements.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
click>=8.0
55
Paver>=1.2.4
66
six>1.12
7-
Sphinx<4.0.0
7+
Sphinx>=4.4.0
88
sphinxcontrib-paverutils>=1.17
99
cogapp>=2.5
1010
SQLAlchemy>=1.4.0
1111
CodeChat>=1.8.6
12+
jinja2<3.1.0

requirements.txt

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,23 @@ codechat==1.9.0
1818
# via -r requirements.in
1919
cogapp==3.3.0
2020
# via -r requirements.in
21-
docutils==0.16
21+
docutils==0.17.1
2222
# via
2323
# codechat
2424
# sphinx
2525
idna==3.3
2626
# via requests
2727
imagesize==1.3.0
2828
# via sphinx
29-
jinja2==3.0.3
29+
importlib-metadata==4.11.3
3030
# via sphinx
31+
jinja2==3.0.3
32+
# via
33+
# -r requirements.in
34+
# sphinx
3135
lxml==4.8.0
3236
# via codechat
33-
markupsafe==2.1.0
37+
markupsafe==2.1.1
3438
# via jinja2
3539
packaging==21.3
3640
# via sphinx
@@ -44,7 +48,7 @@ pygments==2.11.2
4448
# sphinx
4549
pyparsing==3.0.7
4650
# via packaging
47-
pytz==2021.3
51+
pytz==2022.1
4852
# via babel
4953
requests==2.27.1
5054
# via sphinx
@@ -72,10 +76,9 @@ sphinxcontrib-qthelp==1.0.3
7276
# via sphinx
7377
sphinxcontrib-serializinghtml==1.1.5
7478
# via sphinx
75-
sqlalchemy==1.4.31
79+
sqlalchemy==1.4.32
7680
# via -r requirements.in
77-
urllib3==1.26.8
81+
urllib3==1.26.9
7882
# via requests
79-
80-
# The following packages are considered to be unsafe in a requirements file:
81-
# setuptools
83+
zipp==3.7.0
84+
# via importlib-metadata

runestone/activecode/activecode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def setup(app):
7373
"""
7474

7575
TEMPLATE_START = """
76-
<div class="%(divclass)s">
76+
<div class="%(divclass)s %(optclass)s">
7777
<div data-component="activecode" id=%(divid)s data-question_label="%(question_label)s">
7878
<div id=%(divid)s_question class="ac_question col-md-12">
7979
"""

runestone/activecode/css/activecode.css

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,28 +49,20 @@
4949
border: 0;
5050
}
5151

52-
.ac_section {
52+
#main-content section .runestone.ac_section .ac_section {
5353
position: relative;
5454
margin-right: auto;
5555
margin-left: auto;
5656
max-width: 800px;
5757
clear: both;
5858
}
5959

60-
.ac_section > *:not(.ac_section) {
61-
max-width: 500pt;
62-
margin-left: auto;
63-
margin-right: auto;
64-
position: relative;
65-
}
66-
6760
.ac_section .clearfix {
6861
position: initial;
6962
}
7063

7164
.ac_output {
7265
display: none;
73-
max-width: 450px;
7466
background-color: inherit;
7567
}
7668
.ac_output pre {

runestone/activecode/js/activecode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ export class ActiveCode extends RunestoneBase {
893893
var embedUrlStr = `${srcURL}#${srcVars}`;
894894
var myIframe = document.createElement("iframe");
895895
myIframe.setAttribute("id", this.divid + "_codelens");
896-
myIframe.setAttribute("width", "800");
896+
myIframe.setAttribute("width", "100%");
897897
myIframe.setAttribute("height", "500");
898898
myIframe.setAttribute("style", "display:block");
899899
myIframe.style.background = "#fff";
@@ -924,7 +924,7 @@ export class ActiveCode extends RunestoneBase {
924924
srcURL = eBookConfig.app + "/admin/diffviewer?divid=" + div_id;
925925
myIframe = document.createElement("iframe");
926926
myIframe.setAttribute("id", div_id + "_coach");
927-
myIframe.setAttribute("width", "800px");
927+
myIframe.setAttribute("width", "100%");
928928
myIframe.setAttribute("height", "500px");
929929
myIframe.setAttribute("style", "display:block");
930930
myIframe.style.background = "#fff";

runestone/animation/animation.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def setup(app):
2929

3030

3131
SRC = """
32-
<div id="%(divid)s">
32+
<div id="%(divid)s" class="%(optclass)s">
3333
<canvas id="%(divid)s_canvas" width="400" height="400" style="border:4px solid blue"></canvas>
3434
<br />
3535
<button onclick="%(divid)s_anim = %(divid)s_init('%(divid)s')">Initialize</button>
@@ -60,12 +60,15 @@ class Animation(RunestoneIdDirective):
6060
optional_arguments = 1
6161
final_argument_whitespace = True
6262
has_content = False
63-
option_spec = {
64-
"modelfile": directives.unchanged,
65-
"viewerfile": directives.unchanged,
66-
"model": directives.unchanged,
67-
"viewer": directives.unchanged,
68-
}
63+
option_spec = RunestoneIdDirective.option_spec.copy()
64+
option_spec.update(
65+
{
66+
"modelfile": directives.unchanged,
67+
"viewerfile": directives.unchanged,
68+
"model": directives.unchanged,
69+
"viewer": directives.unchanged,
70+
}
71+
)
6972

7073
def run(self):
7174
"""

0 commit comments

Comments
 (0)