Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit a102d92

Browse files
Overhaul contribution documentation
1 parent be1ddaa commit a102d92

File tree

10 files changed

+297
-207
lines changed

10 files changed

+297
-207
lines changed

contributing.md

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,9 @@
11
# Contributing
22

3-
**Thank you for your interest in contributing to `lab.js`! You are more than welcome to join** — whether you have new ideas, suggestions, or would just like to muck in, please be warmly invited to do so: This is an open project! We'd be glad to hear from you, to discuss ideas and approaches, and to get you going. Thank you for taking the time!
3+
**Thank you for your interest in contributing to `lab.js`! You are more than welcome to join** — whether you have new ideas, suggestions, or would just like to muck in, please be warmly invited to do so: This is an open project -- We'd be glad to hear from you, to discuss ideas and approaches, and to get you going. Thank you for taking the time!
44

55
Together, **we're building a tool to help scientists understand behavior and cognition in its many forms, and to conduct their research efficiently and transparently**.
66

77
----
88

9-
### Working together
10-
11-
We expect all members of our community to conform to our [**code of conduct**](code-of-conduct.md), and to be excellent to one another. We strive to meet the [Apache Foundation's guidelines](https://www.apache.org/foundation/policies/conduct) in our work together.
12-
13-
### Reaching out
14-
15-
We are happy to answer your questions! The best way to get hold of us is to [join our **Slack channel**](https://slackin-nmbrcrnchrs.herokuapp.com/), where you'll often find somebody around. We'd be thrilled to have your company!
16-
17-
----
18-
19-
## How to contribute
20-
21-
### Reporting bugs or making suggestions
22-
23-
**Notice something amiss, or some room for improvement?** You're already helping by letting us know — we'd love to hear from you, and try to make things work for everyone. We track bugs and tasks using [issues](https://github.com/felixhenninger/lab.js/issues?q=is%3Aopen). Here are some steps you can take to help us fix things and help you quickly:
24-
25-
#### Before submitting an issue
26-
* **Please take a quick [look whether the problem or idea has been reported already](https://github.com/felixhenninger/lab.js/issues?q=is%3Aopen)**. You can try the search function with some related terms for a cursory check. If you find a previous report, please add a comment there instead of opening a new issue. If you're unsure, you're welcome to ask!
27-
28-
#### Submitting a (great) bug report
29-
* **Pick a descriptive title** that clearly identifies the issue.
30-
* **Describe the steps that led to the problem** so that we can go through the same sequence. Does the problem reoccur when you go through the same steps once more? It is a huge help if you can provide us all the information needed to recreate the problem.
31-
* **Briefly describe what you had expected** and how that differed from what happened, and possibly, why.
32-
33-
#### Making a suggestion
34-
* Summarize your idea with a **clear title**.
35-
* **Describe your suggestion in as much detail as possible**. How would it change the usage of the software?
36-
* **Explain how the suggestion would be useful** to most users.
37-
38-
### Contribute to the code
39-
40-
#### Building the project
41-
42-
There's an [**overview of the code and intro to the build process**](https://labjs.readthedocs.io/en/latest/meta/contribute.html) in the documentation if you're interested, but as always, we'd be happy to help you get started.
43-
44-
#### Finding a place to start
45-
46-
**If you're searching for a place to contribute, please do let us know**: There's always things to do, and we'd be glad to help you find something that fits your interests and resources. If you're writing a tool that might interoperate with this one, we're more than happy to link things up; if you're looking to extend or build on this project, we'd be thrilled to provide a stepping stone for you!
47-
48-
You might also find a task that interests and suits you, or an inspiration, in our
49-
* [Good **first bugs**](https://github.com/felixhenninger/lab.js/issues?q=is%3Aopen+is%3Aissue+label%3A"Good+first+bug") to help you get started
50-
* [Upcoming **milestones**](https://github.com/felixhenninger/lab.js/milestones)
9+
As for details, do reach out to us; there's much more information in the [contribution section](https://labjs.readthedocs.io/en/latest/meta/contribute/index.html) of the project documentation. There, you'll find pointers to different ways of contributing (*spoiler*: writing code isn't the only one), how to find your way around the repository, and how to find us so that we can help you get started. **Welcome to our community!**

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ All `contributors`_ are listed in the repository.
4444
:caption: Meta
4545
:hidden:
4646

47-
meta/contribute.rst
47+
meta/contribute/index.rst
4848
meta/teach.rst
4949
meta/roadmap.rst

docs/meta/contribute.rst

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

docs/meta/contribute/build.rst

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
Building things
2+
===============
3+
4+
The project repository contains the code underlying the ``lab.js`` library and the builder interface. To condense both into a single library file for distribution with studies, and an uploadable version of the builder, please follow these additional steps after downloading. You'll need a local installation of `node.js`_ and `npm`_.
5+
6+
You'll notice that many of the commands start with ``npm`` -- that's because we use `npm scripts`_ as shortcuts for most build steps.
7+
8+
----
9+
10+
Bootstrapping the project
11+
-------------------------
12+
13+
The library and builder interface are contained in the same repository because they share several pieces of code. Both are coordinated by `Lerna`_, which can initialize all parts at once by running the following commands in the project directory:
14+
15+
.. code::
16+
17+
npm install && npm run bootstrap
18+
19+
.. _Lerna: https://lernajs.io/
20+
21+
----
22+
23+
Compiling the library
24+
---------------------
25+
26+
Changing to the ``packages/library`` directory and running
27+
28+
.. code::
29+
30+
npm install
31+
32+
will install all dependencies for the ``lab.js`` library, whereafter
33+
34+
.. code::
35+
36+
npm run build:js
37+
38+
will output a transpiled version in the ``packages/library/build`` directory. If you would like the transpiled output to be updated automatically as you make changes, ``npm run watch:js`` will do that for you.
39+
40+
.. code::
41+
42+
npm run build:starterkit
43+
44+
will build the library with all its components (the basic ``HTML`` template, the stylesheet, and several other useful files), and assemble the result into a ``zip`` file for easier distribution. This is the bundle that is included with every release.
45+
46+
There are a few more commands available, which you can see by typing ``npm run`` in the ``packages/library`` folder.
47+
48+
.. _npm scripts: https://docs.npmjs.com/misc/scripts
49+
.. _node.js: https://nodejs.org/
50+
.. _npm: https://www.npmjs.com/
51+
52+
----
53+
54+
Working on the builder
55+
----------------------
56+
57+
The builder interface is created using Facebook's `create-react-app`_ template, and follows the conventions instituted there. If you're looking for details, their documentation provides more information than we ever could.
58+
59+
The main code is found in the ``packages/builder/src`` folder, where the ``components`` subdirectories contain all user-facing interface code, and ``logic`` holds the main application logic.
60+
61+
To install a copy of the builder locally, please download the repository, navigate into the ``packages/builder`` folder, and run ``npm install`` to download all dependencies. Then, typing
62+
63+
.. code::
64+
65+
npm start
66+
67+
will run the builder application in a **local development server**, and open it in a browser.
68+
69+
.. code::
70+
71+
npm run build
72+
73+
bundles all files necessary for **deployment**, and creates an optimized version of the application code in the ``packages/builder/build`` folder for you to upload.
74+
75+
.. _create-react-app: https://github.com/facebookincubator/create-react-app/
76+
77+
----
78+
79+
Building the documentation
80+
--------------------------
81+
82+
The library's documentation is built using `Sphinx`_, which you'll need to `install`_. In addition, it requires the fabulous `Read the Docs Theme`_. Equipped with both, you can run
83+
84+
.. code::
85+
86+
npm run build:docs
87+
88+
within the project root directory, which will output the html documentation in the ``docs/_build`` subdirectory. Running ``npm run watch:docs`` will update the documentation whenever you make changes.
89+
90+
.. _Sphinx: http://sphinx-doc.org/
91+
.. _install: http://sphinx-doc.org/tutorial.html#install-sphinx
92+
.. _Read the Docs Theme: https://github.com/snide/sphinx_rtd_theme

docs/meta/contribute/help.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Reaching out and finding help
2+
=============================
3+
4+
**Please be invited to reach out and discuss any questions or ideas you have, or changes you would like to make**: We are happy to answer your questions!
5+
6+
Our `Slack channel`_ is always available for **quick questions** -- we try to be around as much as possible. For long-term **proposals, more formal technical discussions and bug reports**, please use `GitHub issues`_. You are also welcome to drop the main contributors a line or two by email if you prefer.
7+
8+
.. _Slack channel: https://slackin-nmbrcrnchrs.herokuapp.com/
9+
.. _GitHub issues: https://github.com/felixhenninger/lab.js/issues

docs/meta/contribute/index.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.. _contribute:
2+
3+
Contribute
4+
==========
5+
6+
**Thank you for considering contributing** to ``lab.js``! Whether you have an idea or suggestion, if you have spotted a bug or even have a correction handy, whether you would like to add new features or documentation, or improve what's already there, **your help is very welcome** indeed. Similarly, if you enjoy the project and would like to become a contributor, you are very warmly invited to join; we'd be glad to help you find a contribution that fits your interests and resources.
7+
8+
Together, **we're building a tool to help scientists understand behavior and cognition in its many forms, and to conduct their research efficiently and transparently.**
9+
10+
.. toctree::
11+
:caption: Contents
12+
:maxdepth: 1
13+
14+
together.rst
15+
ways.rst
16+
help.rst
17+
build.rst
18+
navigate.rst
19+
test.rst

0 commit comments

Comments
 (0)