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

Commit 6acd751

Browse files
committed
Merge pull request #18 from RunestoneInteractive/master
Updating master
2 parents eda5b64 + 4d5db5b commit 6acd751

Some content is hidden

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

63 files changed

+6690
-3991
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ nosetests.xml
3535
.project
3636
.pydevproject
3737
.idea
38+
bower_componenets/
39+
test/

README.rst

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
RunestoneComponents
22
===================
33

4+
.. image:: https://badges.gitter.im/Join%20Chat.svg
5+
:alt: Join the chat at https://gitter.im/RunestoneInteractive/RunestoneComponents
6+
:target: https://gitter.im/RunestoneInteractive/RunestoneComponents?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
7+
48
Packaging of the Runestone components for publishing educational materials using Sphinx and restructuredText. Check out the `Overview <http://interactivepython.org/runestone/static/overview/overview.html>`_ To see all of the extensions in action.
59
**NOTE** -- If you have used an older version of this repo, please know this is a total restart. I think much better, and it WILL stay up to date as this is now the master copy of the components not just a copy.
610
Check out the `Development Roadmap <https://github.com/bnmnetp/runestone/wiki>`_ to get an understanding of our migration towards webcomponents.
@@ -17,6 +21,13 @@ If you are completely new to pip and github text editors, I have written a more
1721

1822
pip install runestone
1923

24+
On some versions of pip that will fail and you need to use:
25+
26+
::
27+
28+
pip install --pre runestone
29+
30+
2031

2132
Or, if you prefer to live on the development edge, you can check out the very latest from:
2233

@@ -59,6 +70,20 @@ installation every so often. If you are new to using Python on windows I recomm
5970
link on `Using Python with Windows <https://docs.python.org/3.4/using/windows.html>`_
6071

6172

73+
Developing and Hacking
74+
----------------------
75+
76+
So, you would like to help out with developing the Runestone Components. What do you need to know?
77+
78+
1. Make a Fork of this repository.
79+
2. Setup your environment on your development machine
80+
81+
1. Make a virtual environment for testing and working I recommend pyvenv-3.4 as it is baked in to Python 3.4 and higher.
82+
2. Rather than following the instructions above for installing runestone simply run ``pip install .`` from the top level runestone directory. This will install all of the required prerequisites and setup the runestone install as a link to the development directory.
83+
84+
3. When you have some changes to share, make a Pull Request.
85+
86+
6287
Notes for more Advanced Users
6388
-----------------------------
6489

@@ -69,4 +94,4 @@ If you already have an existing `Sphinx <http://sphinx-doc.org>`_ project and y
6994
* Then modify your html_static_path: ``html_static_path = ['_static'] + runestone_static_dirs()`` Again you may have your own set of static paths in the initial list.
7095

7196

72-
See https://github.com/bnmnetp/runestone/wiki/DevelopmentRoadmap to get a sense for how this is all going to come together.
97+
See https://github.com/bnmnetp/runestone/wiki/DevelopmentRoadmap to get a sense for how this is all going to come together.

runestone/activecode/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
### activecode
2+
3+
```html
4+
<pre data-component="activecode" id="example1" data-lang="python">
5+
def main()
6+
print("hello world")
7+
8+
main()
9+
</pre>
10+
```
11+
12+
The body of the ``pre`` tag contains code to be loaded into the editor initially. The following attributes are options and control what pieces and parts of the component will be visible.
13+
14+
* ``data-component`` attribute identifies this as an activecode component
15+
* ``class`` The usual CSS class options
16+
* ``id`` must be unique in the document
17+
* ``data-lang`` for activecode can be python javascript or html
18+
* ``data-autorun`` run this activecode as soon as the page is loaded
19+
* ``data-hidecode`` make the editor hidden initially
20+
* ``data-include`` list of ids of other activecodes. The code form each will be prepended to the code to run
21+
* ``data-timelimit`` either False to turn off runtime limit checking or an integer representing the number of milliseconds until timeout.
22+
* ``data-coach`` add a button to display code coach information
23+
* ``data-codelens`` add a button "Run this in Codelens"
24+
25+
26+
For Python to work in the browser you must also obtain and include via a script tag ``skulpt.min.js`` and
27+
``skulpt-stdlib.js`` along with ``codemirror.js`` and of course ``activecode.js``
28+
29+
Soon, many of these requirements will be incorporated into one handy ``runestone.js`` file.
30+
31+
32+

0 commit comments

Comments
 (0)