Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch documentation to JSDoc and Sphinx #997

Merged
merged 37 commits into from
Oct 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6b665eb
Basic setup and first conversions for Sphinx docs
raucao Aug 25, 2017
2c3e5fe
Convert all MD docs to RST
raucao Aug 25, 2017
5ab9f84
Add more content
raucao Aug 26, 2017
9d5aee2
Fix typo
raucao Aug 26, 2017
2db716c
Add JSDoc source docs to Sphinx docs (WIP)
raucao Aug 28, 2017
a691752
Add PIP requirements file
raucao Aug 28, 2017
52eb6df
Add a code example to API docs
raucao Aug 28, 2017
6301ff1
Formatting
raucao Sep 1, 2017
be0b48f
Move variable definition to appropriate place
raucao Sep 1, 2017
6cd33ac
Convert src/remotestorage.js to JSDoc
raucao Sep 1, 2017
e4dd930
Add first docs for BaseClient, all of RemoteStorage
raucao Sep 1, 2017
02dcc03
Forgot two functions
raucao Sep 1, 2017
8c0791b
BaseClient docs (WIP)
raucao Sep 2, 2017
c5669a0
todo note
raucao Sep 3, 2017
ef678d8
Add sphinx extension for GitHub issue links
raucao Sep 8, 2017
589ae3a
Remove and ignore doc builds
raucao Sep 8, 2017
3934f71
Add logo to docs frontpage
raucao Sep 8, 2017
3cf04d9
Remove obsolete instructions from release checklist
raucao Sep 21, 2017
03cbd43
Move Git/repo contribution guidelines to its own doc
raucao Sep 26, 2017
5e003d4
Add storeFile docs
raucao Sep 27, 2017
53bbbf4
Refactor BaseClient.Types, BaseClient docs
raucao Sep 28, 2017
4d9e698
BaseClient change event docs
raucao Sep 30, 2017
3d55f1c
Fix typos
raucao Sep 30, 2017
2aa51da
Add doc for how to add docs
raucao Oct 2, 2017
ded1641
Docs require jsdoc installation
raucao Oct 2, 2017
e1e50ac
Add sphinx-autobuild as docs requirement
galfert Oct 4, 2017
89bccc0
Add sphinx_rtd_theme as docs requirement
galfert Oct 4, 2017
f8308f9
Move old docs to their old folder/namespace
raucao Oct 4, 2017
f9d0cd8
Add hint about ignoring files w/ sphinx-autobuild
raucao Oct 4, 2017
07f6afb
Improve code overview doc
raucao Oct 4, 2017
5199e86
JS API docs for class 'Caching'
galfert Oct 5, 2017
4b0853b
JS API docs for class 'Access'
galfert Oct 5, 2017
66ba20d
Remove superfluous headline
raucao Oct 5, 2017
d8d26fc
Improve caching documentation
galfert Oct 5, 2017
2e85fc6
Use double backticks for code formatting
galfert Oct 5, 2017
4673ef9
Remove all but access.claim from documentation
galfert Oct 5, 2017
29460e8
Fix typo
gregkare Oct 5, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ server/server-state
server-state
doc/code
doc/config
doc/_build
!doc/config/Menu.txt
/remotestorage*.js
67 changes: 7 additions & 60 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,9 @@
# Contribution Guidelines
Contribution Guidelines
=======================

## Regarding work on remotestorage/* repositories

### General workflow

* When you start working on an existing GitHub issue (or you plan on doing that in the immediate future), assign it to yourself, so that others can see it and don't start working on it themselves.
* When you create a branch to work on something, use the naming scheme described further down in this document.
* Never push directly to the `master` branch for any changes to the source code itself.
* As soon as you want others to review your changes, or even just discuss them, create a pull request. Don't forget to explain roughly what it is you're doing in that branch, i.e. what the problem/idea is and what the result is supposed to be when merging the changes. If necessary, or helpful, mention related discussions in other issues.
* A pull request can be merged as soon as at least two people with commit access to the repo have given their +1, meaning they reviewed and manually tested the changes and have no further improvements to suggest.

### Git workflow

#### Branching

Branches on our organization repositories should be created using the following scheme:

`[bugfix|feature]/[issue id]-[description_with_underscores]`

So for example, if you want to work on fixing a bug with let's say initial sync, that is described in issue #423, the branch should look something like:

`bugfix/423-race_condition_on_initial_sync`

And if it's an enhancement to the widget it could look like this e.g.:

`feature/321-customizable_widget_content`

If there's no issue yet, create one first!

#### Rebase when pulling changes

Always use `--rebase` when pulling code from the org repo. That way your local changes are added on top of what's on the remote, avoiding merge commits and mixing up the commit history. You can also setup Git to use rebase by default by running `git config --global branch.autosetuprebase always` once.

The easiest way to update your local repository with all remote changes, including all branches – old and new – is a tool called [git-up](https://github.com/aanand/git-up). With that installed you can just run `git up` instead of `git pull [options]`, which will fetch all branches from all remotes and rebase your commits on top of them (as well as stash and unstash uncommitted code, if necessary).

#### Commit messages

* The first line of the message (aptly called "subject line" in Git terminology) should not be longer than 72 characters.
* If the subject line is not enough to describe the changes properly, add a blank line after the subject line and then as much text as you want, using normal language with capitalization, punctuation, etc.
* Always use messages that describe roughly *what* the changes is and, if not obvious, *why* this change leads to the desired result.
* Leave out any text that isn't directly associated with the changes, that the commit introduces. Examples: "as suggested by @chucknorris", "lol wtf was that", "not sure if this fixes it".
* Commit as much and often as possible locally (and with any message that helps you during your work), and then clean up the history and merge commits that belong together before pushing to the org repo. You can do that with `git rebase -i [ref]` ([learn more](http://www.reviewboard.org/docs/codebase/dev/git/clean-commits/#rewriting-history)).
* You can reference issues from commit messages by adding keywords with issue numbers. Certain keywords will even close the issue automatically, once a branch is merged into master. For example `Fix widget flickering when opening bubble (fixes #423)` will close issue #423 when appearing on the master branch at GitHub.

#### Reviewing pull requests

* Check if it works, if it has unit tests, if the tests pass, and if jshint and CodeClimate are happy.
* Check if the code is understandable, with clear and unambiguous names for functions and variables, and that it has (naturaldocs) comments and a changelog entry.
* If you use `git up`, like recommended above, it will automatically create tracked branches for all remote branches. So in order to review/test a branch on the org repo, just do `git checkout [branchname]`. You can then also add new commits to that branch and push them in order to add your changes to the pull request.
* If the pull request was issued from a user's own repository, you'll have to fetch the code from there, of course. If you haven't pulled from that user yet, you can add a new remote for the user with `git remote add [username] [repo-url]`. After that, `git up` will fetch code from that remote as well, so you can then check it out using `git checkout [username]/branchname`.

(This will put you in a so-called 'detached HEAD' state, but don't worry, everything is fine! If you want to work on that code, just create a new branch from there with the command Git shows you then, or just go back to your code with e.g. `git checkout master` later.)

#### Merging pull requests

* Once a pull request has two +1s for the latest changes from collaborators, you can either merge it yourself or wait for somebody to do it for you (which will happen very soon).
* If the new commits and their commit messages in that branch all make sense on their own, you can use the merge button on GitHub directly.
* If there are a lot of small commits, which might not make sense on their own, or pollute the main project history (often the case with long running pull requests with a lot of additions during their lifetime), fetch the latest changes to your local machine, and either do an interactive rebase to clean up branch and merge normally, or use `git merge --squash` to squash them all into one commit during the merge.
* Whenever you squash multiple commits with either `git rebase -i` or `git merge --squash`, make sure to follow the commit message guidelines above. Don't just leave all old commit messages in there (which is the default), but delete them and create a new meaningful message for the whole changeset.
* When squashing/editing/amending other peoples' commits, use `--author` to set them as the original author. You don't need full names for that, but just something that Git can find in the history. It'll tell you if it can't find an author and let you do it again.
TODO
----

* Write welcome paragraph
* Link to new docs' contribution section
* Link to other useful places, like wiki, forums, IRC
20 changes: 20 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = remoteStoragejs
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
23 changes: 0 additions & 23 deletions doc/amd.md

This file was deleted.

62 changes: 0 additions & 62 deletions doc/api.md

This file was deleted.

90 changes: 0 additions & 90 deletions doc/caching.md

This file was deleted.

20 changes: 0 additions & 20 deletions doc/code-overview.md

This file was deleted.

Loading