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

Commit 6ed8785

Browse files
committed
Merge branch 'master' of github.com:RunestoneInteractive/RunestoneComponents
2 parents 2c912e6 + 4665dca commit 6ed8785

113 files changed

Lines changed: 4655 additions & 27424 deletions

File tree

Some content is hidden

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

CONTRIBUTING.md

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

CONTRIBUTING.rst

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Contributing to the Runestone Components
2+
========================================
3+
4+
We welcome contributions large and small to the Runestone Components. We welcome contributions from newcomers as well as seasoned Runestone hackers. You don't need to be an expert to make a contribution here. When I started this project I had barely written a line of Javascript, Runestone is a project that is all about helping people learn, if you learn by helping us improve Runestone that is even better!
5+
6+
Understand the RoadMap
7+
----------------------
8+
9+
You should look at the `development road map <https://github.com/bnmnetp/runestone/wiki/DevelopmentRoadmap>`_
10+
and especially RSE-0001 which gives you a clear idea of the current philosophy behind the components. Any
11+
Sphinx directives should create very simple html and let Javascript take care of the rest.
12+
13+
Coding Standards
14+
----------------
15+
16+
* All components must be Python 3 compatible. The ``six`` module is already
17+
in the requirements.txt file, so feel free to use that.
18+
* No Tabs for Python files (4 spaces = 1 indention)
19+
* Avoid profliferation of jQuery versions. Make your stuff compatible with the version
20+
of jQuery in the common folder.
21+
* Avoid proliferation of additional third party javascript modules. We are already out of
22+
control in this regard and it would be nice to rein it in.
23+
* When creating a new directive, assign a unique class name to the outermost HTML division. That will allow you to easily confine your CSS declarations to apply only within your directive. Since there are many directives, chances for CSS namespace conflicts are high without that.
24+
* When making a new directive Also put the outer div in the runestone class, this makes it easy for us to select all runestone components on a page.
25+
* When making any changes, make sure the docstring for the class that implements the Sphinx directive is up to date. These docstrings are used in several places for templates and quick help.
26+
* Make sure your new directive class inherits and uses RunestoneBase
27+
* Avoid writing a directive that returns a raw node. Creating appropriate nodes that inherit from Runestone gives us much more flexibility to auto number and cross reference and store source in the database.
28+
* Make sure any buttons you create have their type specified. Unless you know you want it to be submit or reset make sure it is 'button' otherwise it causes problems for previewing.
29+
* Keep Pull Requests small, and limit them to the feature you are adding or bug you are fixing.
30+
* Please don't make gratuitous changes to the code to fit your own personal style or sense of what is correct or incorrect. In other words If it ain't broke, don't fix it. These kinds of changes make it harder for reviewers to figure out what you are trying to do.
31+
32+
Unit Testing
33+
------------
34+
35+
We are using Selenium to create unit tests for each of the components. Nearly every component has selenium tests now. If you add a feature or a new component, please make sure to include a selenium test that verifies it works.
36+
37+
Provide an example
38+
------------------
39+
40+
The folder ``runestone/<component>/test/index.rst`` is a great place to add code
41+
that demonstrates your new feature or component in action.
42+
43+
In fact you should provide two examples whenever possible to demonstrate that you can have
44+
multiple instances of your component on a single web page.
45+
46+
Internationalization
47+
--------------------
48+
49+
It is recomended to implement internationalization as described in `I18N` even if you plan to support only English currently. Besides making easy to support other languages in the future, internationalization helps you to better separate natural language text fragments from the rest of your code.
50+
51+
52+
Major Feature Contributions
53+
===========================
54+
55+
There are many ways that we can continue to improve and make the Runestone platform great, and I am exctied to see the platform evolve. What I would ask is that if you have a large new feature that you would like to propose / contribute please start by creating an issue. This will allow us to discuss it together up front, consider the design implications, and make it more likely that the PR will be accepted with a minimum of fuss.
56+
57+
Runestone has grown organically over the years but that has led to duplicated tables in the database duplicated code and lots of inconsistency. We need to start working to change all of that if we are going to continue to grow runestone efficiently.
58+
59+
60+
JavaScript
61+
----------
62+
All the JavaScript files in the Runestone Components are analzyed by webpack. If you add or remove JavaScript files, update the `webpack.index.js`.

conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,5 +354,12 @@
354354
# An optional local file location -- useful when updating both Sphinx builds before the updates are pushed to the server.
355355
##"C:/Users/bjones/Documents/git/web2py/applications/runestone/_build/objects.inv",
356356
)
357+
),
358+
"Overview": (
359+
"https://runestone.academy/runestone/books/published/overview/index.html", (
360+
None,
361+
# An optional local file location -- useful when updating both Sphinx builds before the updates are pushed to the server.
362+
##"C:/Users/bjones/Documents/git/web2py/applications/runestone/books/overview/build/overview/objects.inv",
363+
)
357364
)
358365
}

index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ Runestone Components
33
********************
44
This site documents the working of the Runestone Components. See the `Runestone Interactive Overview <https://runestone.academy/runestone/books/published/overview/overview.html>`_ or the `Runestone instructor's guide <https://runestone.academy/runestone/static/instructorguide/index.html>`_.
55

6-
Demo linking to the Runestone Server docs: `assignments/grades_report endpoint`.
7-
86

97
Getting started
108
===============

0 commit comments

Comments
 (0)