Merge lp:~teknico/juju-gui/1086512-revise-docs into lp:juju-gui/experimental

Proposed by Nicola Larosa
Status: Merged
Merged at revision: 276
Proposed branch: lp:~teknico/juju-gui/1086512-revise-docs
Merge into: lp:juju-gui/experimental
Diff against target: 713 lines (+290/-251)
8 files modified
HACKING (+197/-0)
Makefile (+4/-2)
README (+37/-197)
docs/architecture.rst (+29/-30)
docs/d3-component-framework.rst (+8/-8)
docs/index.rst (+1/-0)
docs/process.rst (+6/-6)
docs/style-guide.rst (+8/-8)
To merge this branch: bzr merge lp:~teknico/juju-gui/1086512-revise-docs
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+139226@code.launchpad.net

Description of the change

Put deploy docs in README, add HACKING.

Move the development instructions from the README file to a newly created HACKING one, update them, link the HACKING into the docs. Put deploying instructions in the README file. Revise all docs updating them, and fixing markup and links.

https://codereview.appspot.com/6924047/

To post a comment you must log in.
Revision history for this message
Nicola Larosa (teknico) wrote :

Reviewers: mp+139226_code.launchpad.net,

Message:
Please take a look.

Description:
Put deploy docs in README, add HACKING.

Move the development instructions from the README file to a newly
created HACKING one, update them, link the HACKING into the docs. Put
deploying instructions in the README file. Revise all docs updating
them, and fixing markup and links.

https://code.launchpad.net/~teknico/juju-gui/1086512-revise-docs/+merge/139226

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/6924047/

Affected files:
   A HACKING
   M README
   A [revision details]
   M docs/architecture.rst
   M docs/d3-component-framework.rst
   M docs/index.rst
   M docs/process.rst
   M docs/style-guide.rst

Revision history for this message
Francesco Banconi (frankban) wrote :

Land as is.

Thanks Nicola, this branch looks good.

https://codereview.appspot.com/6924047/

Revision history for this message
Gary Poster (gary) wrote :

Land with changes

Hi Nicola. Thank you for this branch. It has many improvements.

Please either accept my suggested changes (which I'd prefer ;-) ) or let
me know why you don't want to.

Thanks

Gary

https://codereview.appspot.com/6924047/diff/1/HACKING
File HACKING (right):

https://codereview.appspot.com/6924047/diff/1/HACKING#newcode67
HACKING:67: the container, and is launched using whichever branch you're
using.
...and it is launched...

https://codereview.appspot.com/6924047/diff/1/HACKING#newcode94
HACKING:94: After which, the gui should be functional (it automatically
polls the
After this, the gui...

https://codereview.appspot.com/6924047/diff/1/docs/d3-component-framework.rst
File docs/d3-component-framework.rst (right):

https://codereview.appspot.com/6924047/diff/1/docs/d3-component-framework.rst#newcode2
docs/d3-component-framework.rst:2: D3 component framework
English rules are usually to capitalize the words of titles, as long as
they are not articles or prepositions. Why did you change that here?
It's not particularly important, but I don't like to see things that
seem to me to be steps backwards. I suggest reverting the three title
capitalization changes in this file.

https://codereview.appspot.com/6924047/diff/1/docs/d3-component-framework.rst#newcode25
docs/d3-component-framework.rst:25: Module writers guide
Revert capitalization change, as discussed above.

https://codereview.appspot.com/6924047/diff/1/docs/d3-component-framework.rst#newcode231
docs/d3-component-framework.rst:231: Complete example
revert, per above discussion.

https://codereview.appspot.com/6924047/diff/1/docs/process.rst
File docs/process.rst (right):

https://codereview.appspot.com/6924047/diff/1/docs/process.rst#newcode2
docs/process.rst:2: Process notes
Revert: It was standard English title style before

https://codereview.appspot.com/6924047/diff/1/docs/process.rst#newcode5
docs/process.rst:5: Checklist for starting a branch
revert

https://codereview.appspot.com/6924047/diff/1/docs/process.rst#newcode21
docs/process.rst:21: Checklist for preparing for a review
revert

https://codereview.appspot.com/6924047/diff/1/docs/process.rst#newcode63
docs/process.rst:63: Checklist for reviewing
revert

https://codereview.appspot.com/6924047/diff/1/docs/process.rst#newcode95
docs/process.rst:95: Checklist for making a stable release
revert

https://codereview.appspot.com/6924047/diff/1/docs/process.rst#newcode148
docs/process.rst:148: Checklist for making a developer release
revert

https://codereview.appspot.com/6924047/diff/1/docs/process.rst#newcode205
docs/process.rst:205: Checklist for running a daily meeting
revert

https://codereview.appspot.com/6924047/diff/1/docs/process.rst#newcode246
docs/process.rst:246: Checklist for running a weekly retrospective
revert

https://codereview.appspot.com/6924047/diff/1/docs/process.rst#newcode303
docs/process.rst:303: Slack project policy
revert

https://codereview.appspot.com/6924047/diff/1/docs/style-guide.rst
File docs/style-guide.rst (right):

https://codereview.appspot.com/6924047/diff/1/docs/style-guide.rst#newcode2
docs/style-guide.rst:2: Style guide
revert

https://codereview.appspot.com/6924047/

Revision history for this message
Nicola Larosa (teknico) wrote :

gary.poster wrote:
> Please either accept my suggested changes (which I'd prefer ;-) ) or
let me know
> why you don't want to.

Gary, I will apply your changes.

https://codereview.appspot.com/6924047/diff/1/docs/d3-component-framework.rst#newcode2
> docs/d3-component-framework.rst:2: D3 component framework
> English rules are usually to capitalize the words of titles, as long
as they are
> not articles or prepositions. Why did you change that here?

There is a mismatch in title style between the README and Style Guide
files, that do not capitalize them, and the D3 Component Framework and
Process Notes, that do. It becomes apparent when you look at the index
in the generated pages.

Being not very well versed with formal English rules, I felt
capitalization as unusual and kind of "heavy", so decided to remove it.
Since you prefer abiding to those rules I'll revert the changes, and
apply capitalization to the former files too.

https://codereview.appspot.com/6924047/

279. By Nicola Larosa

Merged from trunk.

280. By Nicola Larosa

Revert capitalization changes, make new capitalization changes, add 'sphinx' target to Makefile.

Revision history for this message
Nicola Larosa (teknico) wrote :

*** Submitted:

Put deploy docs in README, add HACKING.

Move the development instructions from the README file to a newly
created HACKING one, update them, link the HACKING into the docs. Put
deploying instructions in the README file. Revise all docs updating
them, and fixing markup and links.

R=frankban, gary.poster
CC=
https://codereview.appspot.com/6924047

https://codereview.appspot.com/6924047/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'HACKING'
--- HACKING 1970-01-01 00:00:00 +0000
+++ HACKING 2012-12-12 10:07:21 +0000
@@ -0,0 +1,197 @@
1===========
2Development
3===========
4
5Here is how to develop on this codebase.
6
7Developer Install
8=================
9
10Juju GUI uses nodejs based development tools.
11
12You'll need nodejs & npm from the ppa::
13
14 $ sudo add-apt-repository ppa:chris-lea/node.js
15 $ sudo apt-get update
16 $ sudo apt-get install nodejs npm
17
18You also need ImageMagick::
19
20 $ sudo apt-get install imagemagick
21
22The linter will be installed locally per branch, but if you want editor
23integration, you may want to install jshint globally in your system::
24
25 $ sudo npm install -g jshint
26
27For building the docs, you also need sphinx::
28
29 $ sudo apt-get install python-sphinx
30
31To make releases, you'll need pytz::
32
33 $ sudo apt-get install python-tz
34
35The gui frontend can be installed with::
36
37 $ bzr branch lp:juju-ui trunk
38 $ cd trunk
39 $ make server
40
41It may take a while for the server to start the first time as npm will
42need to download packages. When ready, the server will print:
43
44Server listening on 8888
45
46You can then access the GUI at <http://localhost:8888/>.
47
48You'll also need to deploy a juju environment with REST api access.
49Currently that work resides in a pipeline of juju branches. The
50recommended branch to use as a server is ``lp:~hazmat/juju/rapi-rollup``.
51
52You can use it with any environment, but for dev purposes, a local
53environment works well. One environment option specific to this branch
54is the api-port. An appropriate sample configuration::
55
56 default: dev
57 environments:
58 dev:
59 type: local
60 data-dir: /home/kapil/.juju/local
61 admin-secret: b3a5dee4fb8c4fc9a4db04751e5936f4
62 default-series: precise
63 juju-origin: ppa
64 api-port: 8081
65
66Note that juju-origin is set to the ppa, the api server runs outside of
67the container, and is launched using whichever branch you're using.
68
69Also note that the api-port should be set at 8081, which the gui's
70initial environment connection currently defaults to.
71
72You'll need to bootstrap the local environment, and deploy one service.
73The api server needs access to the provisioning credentials which are
74lazily initialized in juju upon usage.
75
76Juju-gui and rapi-rollup can communicate via an encrypted WebSockets
77connection: to enable it, add the following line to the config above::
78
79 api-secure: true
80
81You will also need to edit your ``app/config.js`` replacing
82``ws://localhost:8081/ws`` with ``wss://localhost:8081/ws``.
83
84By default, rapi-rollup uses a self-signed certificate; because of that you
85will need to visit the <https://localhost:8081/ws> WebSockets URL with your
86browser and accept the included self-signed certificate, or the WebSockets
87encrypted connection will not work.
88
89In order to use a different certificate, you add an api-keys option to the
90config above: its value will be the path of the directory containing the
91certificate and the private key, whose filenames will have to be respectively
92``juju.crt`` and ``juju.key``.
93
94After which, the gui should be functional (it automatically polls the
95api server for establishing a websocket).
96
97Running Unit Tests
98==================
99
100 $ make test
101
102Running Lint
103============
104
105 $ make lint
106
107API Documentation
108=================
109
110Generated JavaScript documentation is available in the yuidoc directory after
111running the command ``make yuidoc``. You can view the docs by running::
112
113 $ xdg-open yuidoc/index.html
114
115The `documentation <http://yui.github.com/yuidoc/syntax/>`_ for YUIDoc markup
116is available.
117
118Project Documentation
119=====================
120
121The project documentation is available in the ``docs/`` directory. It needs
122Sphinx::
123
124 $ sudo apt-get install python-sphinx
125
126Build the documentation::
127
128 $ make doc
129
130(This will also generate the above mentioned yuidoc documentation.)
131
132View it::
133
134 $ xdg-open docs/_build/html/index.html
135
136Making Releases
137===============
138
139To make a release, you must either be in a checkout of lp:juju-gui
140without uncommitted changes, or you must override one of the
141`pertinent variable names`_ to force a release.
142
143.. _`pertinent variable names`: `Potentially Useful Release-Oriented Makefile Variables`_
144
145You also need to have a gpg key, and the python-pytz package installed (as
146well as launchpadlib, but that is installed by default in Ubuntu).
147
148See the Process document (docs/process.rst) for step-by-step checklists to
149make developer and stable releases.
150
151Potentially Useful Release-Oriented Makefile Variables
152------------------------------------------------------
153
154The following is a list of pertinent Makefile variables.
155
156FINAL
157 Set FINAL to any non-empty value to make a final release. This will cause
158 the bzr revno to be omitted from the tarball name, and (if you use the
159 release target) will cause the release to be uploaded to the stable series
160 rather than the trunk series. Example usage::
161
162 $ FINAL=1 make release
163
164PROD
165 By default, releases will be uploaded to staging.launchpad.net, which is a
166 separate version of Launchpad that uses a temporary database. This can be
167 convenient for trying out the release process in the Makefile without
168 affecting our actual production releases. Set PROD to any non-empty value
169 to send uploads to launchpad.net, the production version of Launchpad, when
170 you are ready to make a real release.
171
172 Note that you may need to ask the webops to turn off the two-factor
173 authentication on your Launchpad staging account in order for the staging to
174 work. Go to the #launchpad-ops channel on the Canonical IRC server and ask
175 something like "webops, could you disable 2FA on my staging account?"
176
177 Example usage::
178
179 $ PROD=1 make release
180
181IS_TRUNK_CHECKOUT
182 Set this to any non-empty value to force the Makefile to believe it is
183 working with a trunk checkout. Example usage::
184
185 $ IS_TRUNK_CHECKOUT=1 make release
186
187HAS_NO_CHANGES
188 Set this to any non-empty value to force the Makefile to believe that the
189 current code tree has no changes. Example usage::
190
191 $ HAS_NO_CHANGES=1 make release
192
193IS_SAFE_RELEASE
194 Set this to any non-empty value to force the Makefile to bypass checks of
195 IS_TRUNK_CHECKOUT and HAS_NO_CHANGES. Example usage::
196
197 $ IS_SAFE_RELEASE=1 make release
0198
=== modified file 'Makefile'
--- Makefile 2012-12-11 15:54:02 +0000
+++ Makefile 2012-12-12 10:07:21 +0000
@@ -128,10 +128,12 @@
128yuidoc/index.html: node_modules/yuidocjs $(JSFILES)128yuidoc/index.html: node_modules/yuidocjs $(JSFILES)
129 node_modules/.bin/yuidoc -o yuidoc -x assets app129 node_modules/.bin/yuidoc -o yuidoc -x assets app
130130
131sphinx:
132 make -C docs html
133
131yuidoc: yuidoc/index.html134yuidoc: yuidoc/index.html
132135
133doc: yuidoc136doc: sphinx yuidoc
134 make -C docs html
135137
136$(SPRITE_GENERATED_FILES): node_modules/grunt node_modules/node-spritesheet \138$(SPRITE_GENERATED_FILES): node_modules/grunt node_modules/node-spritesheet \
137 $(SPRITE_SOURCE_FILES)139 $(SPRITE_SOURCE_FILES)
138140
=== modified file 'README'
--- README 2012-12-10 14:20:35 +0000
+++ README 2012-12-12 10:07:21 +0000
@@ -1,197 +1,37 @@
1======1========
2README2Juju-GUI
3======3========
44
5Developer Install5Welcome. Juju-GUI is a web-based GUI for `Juju <https://juju.ubuntu.com/>`_.
6=================6Juju lets you deploy connected services to the cloud in a convenient,
77vendor-neutral, and powerful way. The GUI lets you visualize and manage
8Juju GUI uses nodejs based development tools.8your work more intuitively from a web browser.
99
10You'll need nodejs & npm from the ppa::10See also:
1111
12 $ sudo add-apt-repository ppa:chris-lea/node.js12- `The new Juju GUI: because a picture paints a thousand words
13 $ sudo apt-get update13 <http://blog.canonical.com/2012/10/29/the-new-juju-gui-because-a-picture-paints-a-thousand-words/>`_
14 $ sudo apt-get install nodejs npm14- a `demo of trunk <http://uistage.jujucharms.com:8080/>`_, which is reset
1515 every 15 minutes.
16You also need ImageMagick::16
1717Deploy
18 $ sudo apt-get install imagemagick18======
1919
20The linter will be installed locally per branch, but if you want editor20There are no official releases of Juju-GUI yet, so you have to get the source
21integration, you may want to install jshint globally in your system::21code from Launchpad::
2222
23 $ sudo npm install -g jshint23 $ bzr branch lp:juju-gui
2424
25For building the docs, you also need sphinx::25The most useful available commands are shown by the command::
2626
27 $ sudo apt-get install python-sphinx27 $ make help
2828
29To make releases, you'll need pytz::29You'll typically want to run one of ``make prod``, ``make debug`` or ``make
3030devel`` to deploy an environment. You might also run ``make test`` to check
31 $ sudo apt-get install python-tz31that everything is ok. You may also run ``make doc`` to generate the available
3232documentation.
33The gui frontend can be installed with::33
3434Configure
35 $ bzr branch lp:juju-ui trunk35=========
36 $ cd trunk36
37 $ make server37TBD
38
39It may take a while for the server to start the first time as npm will
40need to download packages. When ready, the server will print:
41
42Server listening on 8888
43
44You can then access the GUI at http://localhost:8888
45
46You'll also need to deploy a juju environment with REST api access.
47Currently that work resides in a pipeline of juju branches. The
48recommended branch to use as a server is ``lp:~hazmat/juju/rapi-delta``.
49
50You can use it with any environment, but for dev purposes, a local
51environment works well. One environment option specific to this branch
52is the api-port. An appropriate sample configuration::
53
54 default: dev
55 environments:
56 dev:
57 type: local
58 data-dir: /home/kapil/.juju/local
59 admin-secret: b3a5dee4fb8c4fc9a4db04751e5936f4
60 default-series: precise
61 juju-origin: ppa
62 api-port: 8081
63
64Note that juju-origin is set to the ppa, the api server runs outside of
65the container, and is launched using whichever branch you're using.
66
67Also note that the api-port should be set at 8081, which the gui's
68initial environment connection currently defaults to.
69
70You'll need to bootstrap the local environment, and deploy one service.
71The api server needs access to the provisioning credentials which are
72lazily initialized in juju upon usage.
73
74Juju-gui and rapi-delta can communicate via an encrypted WebSockets
75connection: to enable it, add the following line to the config above::
76
77 api-secure: true
78
79You will also need to edit your ``app/config.js`` replacing
80``ws://localhost:8081/ws`` with ``wss://localhost:8081/ws``.
81
82By default, rapi-delta uses a self-signed certificate; because of that you
83will need to visit the https://localhost:8081/ws WebSockets URL with your
84browser and accept the included self-signed certificate, or the WebSockets
85encrypted connection will not work.
86
87In order to use a different certificate, you add an api-keys option to the
88config above: its value will be the path of the directory containing the
89certificate and the private key, whose filenames will have to be respectively
90``juju.crt`` and ``juju.key``.
91
92After which, the gui should be functional (it automatically polls the
93api server for establishing a websocket).
94
95Running unit tests
96==================
97
98 $ xdg-open test/index.html
99
100Documentation
101=============
102
103Generated JavaScript documentation is available in the yuidoc directory.
104Start with the index.html file. You can view the docs by running::
105
106 $ xdg-open yuidoc/index.html
107
108To regenerate the docs run::
109
110 $ make yuidoc
111
112The documentation for YUIDoc markup is at
113http://yui.github.com/yuidoc/syntax/ .
114
115Running lint
116============
117
118 $ jshint --config=jshint.config `bzr ls -RV -k file | grep -v assets/`
119
120Making releases
121===============
122
123To make a release, you must either be in a checkout of lp:juju-gui
124without uncommitted changes, or you must override one of the
125`pertinent variable names`_ to force a release.
126
127.. _`pertinent variable names`: `Potentially Useful Release-Oriented Makefile Variables`_
128
129You also need to have a gpg key, and the python-pytz package installed (as
130well as launchpadlib, but that is installed by default in Ubuntu).
131
132See the Process document (docs/process.rst) for step-by-step checklists to
133make developer and stable releases.
134
135Potentially Useful Release-Oriented Makefile Variables
136------------------------------------------------------
137
138The following is a list of pertinent Makefile variables.
139
140FINAL
141 Set FINAL to any non-empty value to make a final release. This will cause
142 the bzr revno to be omitted from the tarball name, and (if you use the
143 release target) will cause the release to be uploaded to the stable series
144 rather than the trunk series. Example usage::
145
146 $ FINAL=1 make release
147
148PROD
149 By default, releases will be uploaded to staging.launchpad.net, which is a
150 separate version of Launchpad that uses a temporary database. This can be
151 convenient for trying out the release process in the Makefile without
152 affecting our actual production releases. Set PROD to any non-empty value
153 to send uploads to launchpad.net, the production version of Launchpad, when
154 you are ready to make a real release.
155
156 Note that you may need to ask the webops to turn off the two-factor
157 authentication on your Launchpad staging account in order for the staging to
158 work. Go to the #launchpad-ops channel on the Canonical IRC server and ask
159 something like "webops, could you disable 2FA on my staging account?"
160
161 Example usage::
162
163 $ PROD=1 make release
164
165IS_TRUNK_CHECKOUT
166 Set this to any non-empty value to force the Makefile to believe it is
167 working with a trunk checkout. Example usage::
168
169 $ IS_TRUNK_CHECKOUT=1 make release
170
171HAS_NO_CHANGES
172 Set this to any non-empty value to force the Makefile to believe that the
173 current code tree has no changes. Example usage::
174
175 $ HAS_NO_CHANGES=1 make release
176
177IS_SAFE_RELEASE
178 Set this to any non-empty value to force the Makefile to bypass checks of
179 IS_TRUNK_CHECKOUT and HAS_NO_CHANGES. Example usage::
180
181 $ IS_SAFE_RELEASE=1 make release
182
183More documentation
184==================
185
186Install Sphinx::
187
188 $ sudo apt-get install python-sphinx
189
190Build the docs::
191
192 $ cd docs
193 $ make html
194
195View them::
196
197 $ xdg-open _build/html/index.html
19838
=== modified file 'docs/architecture.rst'
--- docs/architecture.rst 2012-10-05 09:42:27 +0000
+++ docs/architecture.rst 2012-12-12 10:07:21 +0000
@@ -6,55 +6,54 @@
6========6========
77
8MVC YUI8MVC YUI
9~~~~~~~9-------
1010
11Juju-gui is based on yui's backbone style app framework. The official docs11Juju-gui is based on yui's backbone style app framework. The `official docs
12for this are highly recommended for developers:12<http://yuilibrary.com/yui/docs/app/>`_ are highly recommended for developers.
13http://yuilibrary.com/yui/docs/app/
1413
15An overview of the individual pieces.14An overview of the individual pieces.
1615
17- Router - Route dispatch by url, saves and restores url state.16- `Router <http://yuilibrary.com/yui/docs/router/>`_ - Route dispatch by url,
18 http://yuilibrary.com/yui/docs/router/17 saves and restores url state.
1918
20- Views - Rendering of a view19- `Views <http://yuilibrary.com/yui/docs/view/index.html>`_ - Rendering of a
21 http://yuilibrary.com/yui/docs/view/index.html20 view.
2221
23- Model - Domain objects with change events22- `Model <http://yuilibrary.com/yui/docs/model/>`_,
24 http://yuilibrary.com/yui/docs/model/23 `ModelList <http://yuilibrary.com/yui/docs/model-list/>`_ - Domain objects
25 http://yuilibrary.com/yui/docs/model-list/24 with change events.
2625
27Environment Integration26Environment Integration
28~~~~~~~~~~~~~~~~~~~~~~~27-----------------------
2928
30The gui connects and communicates to the environment over a web socket29The gui connects and communicates to the environment over a web socket
31connection.30connection.
3231
33RPC Calls32RPC Calls
34~~~~~~~~~33---------
3534
36Completion callbacks can be used with any of the methods on the environment.35Completion callbacks can be used with any of the methods on the environment.
37Multiple calls are done in parallel.36Multiple calls are done in parallel.
3837
39RPC Events38RPC Events
40~~~~~~~~~~39----------
4140
42Messages from the backend for known rpc operation results are messaged out as41Messages from the backend for known rpc operation results are messaged out as
43Environment events.42Environment events.
4443
45Delta Stream44Delta Stream
46~~~~~~~~~~~~45------------
4746
48A stream of object changes, used to update models.47A stream of object changes, used to update models.
4948
50Scenarios49Scenarios
51---------50~~~~~~~~~
5251
53- new client52- new client
54- existing client disconnects and reconnects53- existing client disconnects and reconnects
5554
56Requirements55Requirements
57------------56~~~~~~~~~~~~
5857
59::58::
6059
@@ -67,14 +66,14 @@
67 -- delta66 -- delta
6867
69Questions68Questions
70~~~~~~~~~69---------
7170
72Model Composition and relations.71- Model Composition and relations.
7372
74relations by id73- relations by id
7574
76We have multiple object states for a given.75- We have multiple object states for a given.
7776
78Inline combo handler for yui: https://github.com/rgrove/combohandler77- Inline combo handler for YUI: <https://github.com/rgrove/combohandler>.
7978
80More complicated but similiar: https://github.com/jafl/YUI-3-Stockpile79- More complicated but similiar: <https://github.com/jafl/YUI-3-Stockpile>.
8180
=== modified file 'docs/d3-component-framework.rst'
--- docs/d3-component-framework.rst 2012-11-29 03:54:35 +0000
+++ docs/d3-component-framework.rst 2012-12-12 10:07:21 +0000
@@ -15,7 +15,7 @@
15explain this usage as it exists today.15explain this usage as it exists today.
1616
17The framework only models two high level objects, Component and Module. A17The framework only models two high level objects, Component and Module. A
18Component is a top level container around Module objects. The Component 18Component is a top level container around Module objects. The Component
19provides the implementation of the declarative behavior provided by the19provides the implementation of the declarative behavior provided by the
20framework. The Module(s) implement the logical sections of the application. In20framework. The Module(s) implement the logical sections of the application. In
21the YUI world it might be common to expect each Module to be the application's21the YUI world it might be common to expect each Module to be the application's
@@ -76,14 +76,14 @@
76this point that any d3js synthetic events are bound to the canvas (see the76this point that any d3js synthetic events are bound to the canvas (see the
77section on events below). This separation of phases exists to make the life of77section on events below). This separation of phases exists to make the life of
78the Module writer simpler. They can rely on whatever elements they'll be drawing78the Module writer simpler. They can rely on whatever elements they'll be drawing
79 (adding children to an svg object for example) will already have its container 79(adding children to an svg object for example) will already have its container
80 properly available due to the renderOnce setup. They can also be sure that 80properly available due to the renderOnce setup. They can also be sure that
81 any ``update`` driven intermediate data will be computed and available for81any ``update`` driven intermediate data will be computed and available for
82 use in ``render``. This reduces the need for checks in each module to assert82use in ``render``. This reduces the need for checks in each module to assert
83 the most basic DOM state.83the most basic DOM state.
8484
85After the initial render its expected that updates to the scene occur via the 85After the initial render its expected that updates to the scene occur via the
86event handlers in the various modules. Render will not usually need to be called 86event handlers in the various modules. Render will not usually need to be called
87more than once unless the entire Component rendering is removed from the DOM and87more than once unless the entire Component rendering is removed from the DOM and
88then later re-attached.88then later re-attached.
8989
9090
=== added symlink 'docs/hacking.rst'
=== target is u'../HACKING'
=== modified file 'docs/index.rst'
--- docs/index.rst 2012-11-28 12:30:32 +0000
+++ docs/index.rst 2012-12-12 10:07:21 +0000
@@ -13,6 +13,7 @@
13 :maxdepth: 213 :maxdepth: 2
1414
15 readme15 readme
16 hacking
16 style-guide17 style-guide
17 architecture18 architecture
18 d3-component-framework19 d3-component-framework
1920
=== modified file 'docs/process.rst'
--- docs/process.rst 2012-12-10 14:20:35 +0000
+++ docs/process.rst 2012-12-12 10:07:21 +0000
@@ -6,9 +6,9 @@
6===============================6===============================
77
8- Understand the problem. If you don't, ask and be persistent until you do.8- Understand the problem. If you don't, ask and be persistent until you do.
9- When determining a solution, consider this preferred Software9- When determining a solution, consider this preferred `Software
10 Architecture Cheat Sheet:10 Architecture Cheat Sheet
11 http://gorban.org/post/32873465932/software-architecture-cheat-sheet11 <http://gorban.org/post/32873465932/software-architecture-cheat-sheet>`_
12- Have a pre-implementation call with someone about your solution. If you12- Have a pre-implementation call with someone about your solution. If you
13 are not sure of your solution, prototype before the pre-implementation call.13 are not sure of your solution, prototype before the pre-implementation call.
14- Use TDD. Your prototype might be perfect, but you can still move it aside14- Use TDD. Your prototype might be perfect, but you can still move it aside
@@ -16,7 +16,7 @@
16- Update the CHANGES.yaml file with your changes. The newest (topmost)16- Update the CHANGES.yaml file with your changes. The newest (topmost)
17 section should have the version "unreleased". If not and you are17 section should have the version "unreleased". If not and you are
18 making changes, add an "unreleased" section at the top. All other18 making changes, add an "unreleased" section at the top. All other
19 version numbers follow Semantic Versioning (http://semver.org/).19 version numbers follow `Semantic Versioning <http://semver.org/>`_.
2020
21Checklist for Preparing for a Review21Checklist for Preparing for a Review
22====================================22====================================
@@ -79,8 +79,8 @@
79 * Make sure that new code has tests.79 * Make sure that new code has tests.
80 * Make sure you can understand the new code. Ask for clarification if80 * Make sure you can understand the new code. Ask for clarification if
81 necessary.81 necessary.
82 * Consider the advice in this preferred Software Architecture Cheat Sheet.82 * Consider the advice in this preferred `Software Architecture Cheat Sheet
83 http://gorban.org/post/32873465932/software-architecture-cheat-sheet83 <http://gorban.org/post/32873465932/software-architecture-cheat-sheet>`_
84 * Make sure changes to a file correspond to the naming conventions and other84 * Make sure changes to a file correspond to the naming conventions and other
85 stylistic considerations local to that file, and within our project.85 stylistic considerations local to that file, and within our project.
86 * Before you ask for a change, think and make sure you can't compromise86 * Before you ask for a change, think and make sure you can't compromise
8787
=== modified file 'docs/style-guide.rst'
--- docs/style-guide.rst 2012-11-07 18:41:11 +0000
+++ docs/style-guide.rst 2012-12-12 10:07:21 +0000
@@ -15,7 +15,7 @@
15indention will be applied.15indention will be applied.
1616
1717
18For loops18For Loops
19=========19=========
2020
21Unless you are counting something, for loops (and for-in loops) are a trap.21Unless you are counting something, for loops (and for-in loops) are a trap.
@@ -29,7 +29,7 @@
29should end with a non-blank line).29should end with a non-blank line).
3030
3131
32Object literal formatting32Object Literal Formatting
33=========================33=========================
3434
35Things you should do:35Things you should do:
@@ -66,7 +66,7 @@
66 errors = utils.validate(values, schema);66 errors = utils.validate(values, schema);
6767
6868
69Chaining method calls69Chaining Method Calls
70=====================70=====================
7171
72Some APIs are designed such that mutating method calls return the object being72Some APIs are designed such that mutating method calls return the object being
@@ -160,13 +160,13 @@
160========160========
161161
162We use YUIDoc to document the applications internals. YUIDoc comments162We use YUIDoc to document the applications internals. YUIDoc comments
163start with "/**" and end with "*/". The Makefile includes a simple163start with ``/**`` and end with ``*/``. The Makefile includes a simple
164linter that enforces YUIDoc comments for each function in the164linter that enforces YUIDoc comments for each function in the
165application.165application.
166166
167This simple linting sometimes means that functions that we might not167This simple linting sometimes means that functions that we might not
168otherwise document require documentation. If a one-line comment is168otherwise document require documentation. If a one-line comment is
169sufficient in those situations, a comment of this form may be used:169sufficient in those situations, a comment of this form may be used::
170170
171 /** Handle errors */171 /** Handle errors */
172 error_callback: function(err) {172 error_callback: function(err) {
@@ -174,7 +174,7 @@
174 }174 }
175175
176Most functions (or methods) will call for normal, multi-line YUIDoc176Most functions (or methods) will call for normal, multi-line YUIDoc
177comments like this:177comments like this::
178178
179 /**179 /**
180 * Frob the thingy.180 * Frob the thingy.
@@ -184,5 +184,5 @@
184 * @return {undefined} Side-effects only, eturns nothing.184 * @return {undefined} Side-effects only, eturns nothing.
185 */185 */
186186
187Full documentation for the various YUIDoc directives is at187`Full documentation <http://yui.github.com/yuidoc/syntax/>`_
188http://yui.github.com/yuidoc/syntax/ .188for the various YUIDoc directives is available.

Subscribers

People subscribed via source and target branches