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

Commit d192101

Browse files
authored
Merge branch 'RunestoneInteractive:master' into master
2 parents 09c837d + e036381 commit d192101

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.github/workflows/python-package.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,22 @@ jobs:
2828
if: always()
2929

3030
- name: Setup npm and build runestone.js
31-
id: create-runestone-bundle
3231
run: |
3332
npm install
34-
npm run build
3533
- name: Set up Python ${{ matrix.python-version }}
36-
id: install-python
3734
uses: actions/setup-python@v2
3835
with:
3936
python-version: ${{ matrix.python-version }}
4037
- name: Install dependencies
41-
id: install-deps
4238
run: |
4339
python -m pip install --upgrade pip
4440
python -m pip install flake8 pytest
45-
pip install .
41+
# Install as editable so that tests run in cwd, instead of in wherever Python puts system lib. This is important because tests are run on the local (not system lib) files. Therefore, the npm run build produces its files locally, not in system libs; if installed in system libs, then the components won't be able to find these files.
42+
pip install -e .
4643
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
47-
- name: Test with pytest
48-
id: pytest
44+
- name: Tests
4945
run: |
50-
pytest
46+
pytest
5147
5248
- uses: act10ns/slack@v1
5349
with:

runestone/showeval/showeval.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ def run(self):
129129
is_dynamic = env.config.html_context.get("dynamic_pages", False)
130130
is_dynamic = True if is_dynamic == "True" else False
131131
step = False
132-
count = 0
133132
for line in self.content:
134133
if step == True:
135134
if line != "":
@@ -144,4 +143,7 @@ def run(self):
144143
self.options["preReqLines"] += line + "<br />\n"
145144
se_node = ShowEvalNode()
146145
se_node["runestone_options"] = self.options
146+
se_node["source"], se_node["line"] = self.state_machine.get_source_and_line(
147+
self.lineno
148+
)
147149
return [se_node]

0 commit comments

Comments
 (0)