Merge lp:~teknico/juju-gui/1086512-revise-docs into lp:juju-gui/experimental
- 1086512-revise-docs
- Merge into trunk
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 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email: mp+139226@code.launchpad.net |
Commit message
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.
Nicola Larosa (teknico) wrote : | # |
Francesco Banconi (frankban) wrote : | # |
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:/
File HACKING (right):
https:/
HACKING:67: the container, and is launched using whichever branch you're
using.
...and it is launched...
https:/
HACKING:94: After which, the gui should be functional (it automatically
polls the
After this, the gui...
https:/
File docs/d3-
https:/
docs/d3-
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:/
docs/d3-
Revert capitalization change, as discussed above.
https:/
docs/d3-
revert, per above discussion.
https:/
File docs/process.rst (right):
https:/
docs/process.rst:2: Process notes
Revert: It was standard English title style before
https:/
docs/process.rst:5: Checklist for starting a branch
revert
https:/
docs/process.
revert
https:/
docs/process.
revert
https:/
docs/process.
revert
https:/
docs/process.
revert
https:/
docs/process.
revert
https:/
docs/process.
revert
https:/
docs/process.
revert
https:/
File docs/style-
https:/
docs/style-
revert
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:/
> docs/d3-
> 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.
- 279. By Nicola Larosa
-
Merged from trunk.
- 280. By Nicola Larosa
-
Revert capitalization changes, make new capitalization changes, add 'sphinx' target to Makefile.
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:/
Preview Diff
1 | === added file 'HACKING' | |||
2 | --- HACKING 1970-01-01 00:00:00 +0000 | |||
3 | +++ HACKING 2012-12-12 10:07:21 +0000 | |||
4 | @@ -0,0 +1,197 @@ | |||
5 | 1 | =========== | ||
6 | 2 | Development | ||
7 | 3 | =========== | ||
8 | 4 | |||
9 | 5 | Here is how to develop on this codebase. | ||
10 | 6 | |||
11 | 7 | Developer Install | ||
12 | 8 | ================= | ||
13 | 9 | |||
14 | 10 | Juju GUI uses nodejs based development tools. | ||
15 | 11 | |||
16 | 12 | You'll need nodejs & npm from the ppa:: | ||
17 | 13 | |||
18 | 14 | $ sudo add-apt-repository ppa:chris-lea/node.js | ||
19 | 15 | $ sudo apt-get update | ||
20 | 16 | $ sudo apt-get install nodejs npm | ||
21 | 17 | |||
22 | 18 | You also need ImageMagick:: | ||
23 | 19 | |||
24 | 20 | $ sudo apt-get install imagemagick | ||
25 | 21 | |||
26 | 22 | The linter will be installed locally per branch, but if you want editor | ||
27 | 23 | integration, you may want to install jshint globally in your system:: | ||
28 | 24 | |||
29 | 25 | $ sudo npm install -g jshint | ||
30 | 26 | |||
31 | 27 | For building the docs, you also need sphinx:: | ||
32 | 28 | |||
33 | 29 | $ sudo apt-get install python-sphinx | ||
34 | 30 | |||
35 | 31 | To make releases, you'll need pytz:: | ||
36 | 32 | |||
37 | 33 | $ sudo apt-get install python-tz | ||
38 | 34 | |||
39 | 35 | The gui frontend can be installed with:: | ||
40 | 36 | |||
41 | 37 | $ bzr branch lp:juju-ui trunk | ||
42 | 38 | $ cd trunk | ||
43 | 39 | $ make server | ||
44 | 40 | |||
45 | 41 | It may take a while for the server to start the first time as npm will | ||
46 | 42 | need to download packages. When ready, the server will print: | ||
47 | 43 | |||
48 | 44 | Server listening on 8888 | ||
49 | 45 | |||
50 | 46 | You can then access the GUI at <http://localhost:8888/>. | ||
51 | 47 | |||
52 | 48 | You'll also need to deploy a juju environment with REST api access. | ||
53 | 49 | Currently that work resides in a pipeline of juju branches. The | ||
54 | 50 | recommended branch to use as a server is ``lp:~hazmat/juju/rapi-rollup``. | ||
55 | 51 | |||
56 | 52 | You can use it with any environment, but for dev purposes, a local | ||
57 | 53 | environment works well. One environment option specific to this branch | ||
58 | 54 | is the api-port. An appropriate sample configuration:: | ||
59 | 55 | |||
60 | 56 | default: dev | ||
61 | 57 | environments: | ||
62 | 58 | dev: | ||
63 | 59 | type: local | ||
64 | 60 | data-dir: /home/kapil/.juju/local | ||
65 | 61 | admin-secret: b3a5dee4fb8c4fc9a4db04751e5936f4 | ||
66 | 62 | default-series: precise | ||
67 | 63 | juju-origin: ppa | ||
68 | 64 | api-port: 8081 | ||
69 | 65 | |||
70 | 66 | Note that juju-origin is set to the ppa, the api server runs outside of | ||
71 | 67 | the container, and is launched using whichever branch you're using. | ||
72 | 68 | |||
73 | 69 | Also note that the api-port should be set at 8081, which the gui's | ||
74 | 70 | initial environment connection currently defaults to. | ||
75 | 71 | |||
76 | 72 | You'll need to bootstrap the local environment, and deploy one service. | ||
77 | 73 | The api server needs access to the provisioning credentials which are | ||
78 | 74 | lazily initialized in juju upon usage. | ||
79 | 75 | |||
80 | 76 | Juju-gui and rapi-rollup can communicate via an encrypted WebSockets | ||
81 | 77 | connection: to enable it, add the following line to the config above:: | ||
82 | 78 | |||
83 | 79 | api-secure: true | ||
84 | 80 | |||
85 | 81 | You will also need to edit your ``app/config.js`` replacing | ||
86 | 82 | ``ws://localhost:8081/ws`` with ``wss://localhost:8081/ws``. | ||
87 | 83 | |||
88 | 84 | By default, rapi-rollup uses a self-signed certificate; because of that you | ||
89 | 85 | will need to visit the <https://localhost:8081/ws> WebSockets URL with your | ||
90 | 86 | browser and accept the included self-signed certificate, or the WebSockets | ||
91 | 87 | encrypted connection will not work. | ||
92 | 88 | |||
93 | 89 | In order to use a different certificate, you add an api-keys option to the | ||
94 | 90 | config above: its value will be the path of the directory containing the | ||
95 | 91 | certificate and the private key, whose filenames will have to be respectively | ||
96 | 92 | ``juju.crt`` and ``juju.key``. | ||
97 | 93 | |||
98 | 94 | After which, the gui should be functional (it automatically polls the | ||
99 | 95 | api server for establishing a websocket). | ||
100 | 96 | |||
101 | 97 | Running Unit Tests | ||
102 | 98 | ================== | ||
103 | 99 | |||
104 | 100 | $ make test | ||
105 | 101 | |||
106 | 102 | Running Lint | ||
107 | 103 | ============ | ||
108 | 104 | |||
109 | 105 | $ make lint | ||
110 | 106 | |||
111 | 107 | API Documentation | ||
112 | 108 | ================= | ||
113 | 109 | |||
114 | 110 | Generated JavaScript documentation is available in the yuidoc directory after | ||
115 | 111 | running the command ``make yuidoc``. You can view the docs by running:: | ||
116 | 112 | |||
117 | 113 | $ xdg-open yuidoc/index.html | ||
118 | 114 | |||
119 | 115 | The `documentation <http://yui.github.com/yuidoc/syntax/>`_ for YUIDoc markup | ||
120 | 116 | is available. | ||
121 | 117 | |||
122 | 118 | Project Documentation | ||
123 | 119 | ===================== | ||
124 | 120 | |||
125 | 121 | The project documentation is available in the ``docs/`` directory. It needs | ||
126 | 122 | Sphinx:: | ||
127 | 123 | |||
128 | 124 | $ sudo apt-get install python-sphinx | ||
129 | 125 | |||
130 | 126 | Build the documentation:: | ||
131 | 127 | |||
132 | 128 | $ make doc | ||
133 | 129 | |||
134 | 130 | (This will also generate the above mentioned yuidoc documentation.) | ||
135 | 131 | |||
136 | 132 | View it:: | ||
137 | 133 | |||
138 | 134 | $ xdg-open docs/_build/html/index.html | ||
139 | 135 | |||
140 | 136 | Making Releases | ||
141 | 137 | =============== | ||
142 | 138 | |||
143 | 139 | To make a release, you must either be in a checkout of lp:juju-gui | ||
144 | 140 | without uncommitted changes, or you must override one of the | ||
145 | 141 | `pertinent variable names`_ to force a release. | ||
146 | 142 | |||
147 | 143 | .. _`pertinent variable names`: `Potentially Useful Release-Oriented Makefile Variables`_ | ||
148 | 144 | |||
149 | 145 | You also need to have a gpg key, and the python-pytz package installed (as | ||
150 | 146 | well as launchpadlib, but that is installed by default in Ubuntu). | ||
151 | 147 | |||
152 | 148 | See the Process document (docs/process.rst) for step-by-step checklists to | ||
153 | 149 | make developer and stable releases. | ||
154 | 150 | |||
155 | 151 | Potentially Useful Release-Oriented Makefile Variables | ||
156 | 152 | ------------------------------------------------------ | ||
157 | 153 | |||
158 | 154 | The following is a list of pertinent Makefile variables. | ||
159 | 155 | |||
160 | 156 | FINAL | ||
161 | 157 | Set FINAL to any non-empty value to make a final release. This will cause | ||
162 | 158 | the bzr revno to be omitted from the tarball name, and (if you use the | ||
163 | 159 | release target) will cause the release to be uploaded to the stable series | ||
164 | 160 | rather than the trunk series. Example usage:: | ||
165 | 161 | |||
166 | 162 | $ FINAL=1 make release | ||
167 | 163 | |||
168 | 164 | PROD | ||
169 | 165 | By default, releases will be uploaded to staging.launchpad.net, which is a | ||
170 | 166 | separate version of Launchpad that uses a temporary database. This can be | ||
171 | 167 | convenient for trying out the release process in the Makefile without | ||
172 | 168 | affecting our actual production releases. Set PROD to any non-empty value | ||
173 | 169 | to send uploads to launchpad.net, the production version of Launchpad, when | ||
174 | 170 | you are ready to make a real release. | ||
175 | 171 | |||
176 | 172 | Note that you may need to ask the webops to turn off the two-factor | ||
177 | 173 | authentication on your Launchpad staging account in order for the staging to | ||
178 | 174 | work. Go to the #launchpad-ops channel on the Canonical IRC server and ask | ||
179 | 175 | something like "webops, could you disable 2FA on my staging account?" | ||
180 | 176 | |||
181 | 177 | Example usage:: | ||
182 | 178 | |||
183 | 179 | $ PROD=1 make release | ||
184 | 180 | |||
185 | 181 | IS_TRUNK_CHECKOUT | ||
186 | 182 | Set this to any non-empty value to force the Makefile to believe it is | ||
187 | 183 | working with a trunk checkout. Example usage:: | ||
188 | 184 | |||
189 | 185 | $ IS_TRUNK_CHECKOUT=1 make release | ||
190 | 186 | |||
191 | 187 | HAS_NO_CHANGES | ||
192 | 188 | Set this to any non-empty value to force the Makefile to believe that the | ||
193 | 189 | current code tree has no changes. Example usage:: | ||
194 | 190 | |||
195 | 191 | $ HAS_NO_CHANGES=1 make release | ||
196 | 192 | |||
197 | 193 | IS_SAFE_RELEASE | ||
198 | 194 | Set this to any non-empty value to force the Makefile to bypass checks of | ||
199 | 195 | IS_TRUNK_CHECKOUT and HAS_NO_CHANGES. Example usage:: | ||
200 | 196 | |||
201 | 197 | $ IS_SAFE_RELEASE=1 make release | ||
202 | 0 | 198 | ||
203 | === modified file 'Makefile' | |||
204 | --- Makefile 2012-12-11 15:54:02 +0000 | |||
205 | +++ Makefile 2012-12-12 10:07:21 +0000 | |||
206 | @@ -128,10 +128,12 @@ | |||
207 | 128 | yuidoc/index.html: node_modules/yuidocjs $(JSFILES) | 128 | yuidoc/index.html: node_modules/yuidocjs $(JSFILES) |
208 | 129 | node_modules/.bin/yuidoc -o yuidoc -x assets app | 129 | node_modules/.bin/yuidoc -o yuidoc -x assets app |
209 | 130 | 130 | ||
210 | 131 | sphinx: | ||
211 | 132 | make -C docs html | ||
212 | 133 | |||
213 | 131 | yuidoc: yuidoc/index.html | 134 | yuidoc: yuidoc/index.html |
214 | 132 | 135 | ||
217 | 133 | doc: yuidoc | 136 | doc: sphinx yuidoc |
216 | 134 | make -C docs html | ||
218 | 135 | 137 | ||
219 | 136 | $(SPRITE_GENERATED_FILES): node_modules/grunt node_modules/node-spritesheet \ | 138 | $(SPRITE_GENERATED_FILES): node_modules/grunt node_modules/node-spritesheet \ |
220 | 137 | $(SPRITE_SOURCE_FILES) | 139 | $(SPRITE_SOURCE_FILES) |
221 | 138 | 140 | ||
222 | === modified file 'README' | |||
223 | --- README 2012-12-10 14:20:35 +0000 | |||
224 | +++ README 2012-12-12 10:07:21 +0000 | |||
225 | @@ -1,197 +1,37 @@ | |||
423 | 1 | ====== | 1 | ======== |
424 | 2 | README | 2 | Juju-GUI |
425 | 3 | ====== | 3 | ======== |
426 | 4 | 4 | ||
427 | 5 | Developer Install | 5 | Welcome. Juju-GUI is a web-based GUI for `Juju <https://juju.ubuntu.com/>`_. |
428 | 6 | ================= | 6 | Juju lets you deploy connected services to the cloud in a convenient, |
429 | 7 | 7 | vendor-neutral, and powerful way. The GUI lets you visualize and manage | |
430 | 8 | Juju GUI uses nodejs based development tools. | 8 | your work more intuitively from a web browser. |
431 | 9 | 9 | ||
432 | 10 | You'll need nodejs & npm from the ppa:: | 10 | See also: |
433 | 11 | 11 | ||
434 | 12 | $ sudo add-apt-repository ppa:chris-lea/node.js | 12 | - `The new Juju GUI: because a picture paints a thousand words |
435 | 13 | $ sudo apt-get update | 13 | <http://blog.canonical.com/2012/10/29/the-new-juju-gui-because-a-picture-paints-a-thousand-words/>`_ |
436 | 14 | $ sudo apt-get install nodejs npm | 14 | - a `demo of trunk <http://uistage.jujucharms.com:8080/>`_, which is reset |
437 | 15 | 15 | every 15 minutes. | |
438 | 16 | You also need ImageMagick:: | 16 | |
439 | 17 | 17 | Deploy | |
440 | 18 | $ sudo apt-get install imagemagick | 18 | ====== |
441 | 19 | 19 | ||
442 | 20 | The linter will be installed locally per branch, but if you want editor | 20 | There are no official releases of Juju-GUI yet, so you have to get the source |
443 | 21 | integration, you may want to install jshint globally in your system:: | 21 | code from Launchpad:: |
444 | 22 | 22 | ||
445 | 23 | $ sudo npm install -g jshint | 23 | $ bzr branch lp:juju-gui |
446 | 24 | 24 | ||
447 | 25 | For building the docs, you also need sphinx:: | 25 | The most useful available commands are shown by the command:: |
448 | 26 | 26 | ||
449 | 27 | $ sudo apt-get install python-sphinx | 27 | $ make help |
450 | 28 | 28 | ||
451 | 29 | To make releases, you'll need pytz:: | 29 | You'll typically want to run one of ``make prod``, ``make debug`` or ``make |
452 | 30 | 30 | devel`` to deploy an environment. You might also run ``make test`` to check | |
453 | 31 | $ sudo apt-get install python-tz | 31 | that everything is ok. You may also run ``make doc`` to generate the available |
454 | 32 | 32 | documentation. | |
455 | 33 | The gui frontend can be installed with:: | 33 | |
456 | 34 | 34 | Configure | |
457 | 35 | $ bzr branch lp:juju-ui trunk | 35 | ========= |
458 | 36 | $ cd trunk | 36 | |
459 | 37 | $ make server | 37 | TBD |
263 | 38 | |||
264 | 39 | It may take a while for the server to start the first time as npm will | ||
265 | 40 | need to download packages. When ready, the server will print: | ||
266 | 41 | |||
267 | 42 | Server listening on 8888 | ||
268 | 43 | |||
269 | 44 | You can then access the GUI at http://localhost:8888 | ||
270 | 45 | |||
271 | 46 | You'll also need to deploy a juju environment with REST api access. | ||
272 | 47 | Currently that work resides in a pipeline of juju branches. The | ||
273 | 48 | recommended branch to use as a server is ``lp:~hazmat/juju/rapi-delta``. | ||
274 | 49 | |||
275 | 50 | You can use it with any environment, but for dev purposes, a local | ||
276 | 51 | environment works well. One environment option specific to this branch | ||
277 | 52 | is the api-port. An appropriate sample configuration:: | ||
278 | 53 | |||
279 | 54 | default: dev | ||
280 | 55 | environments: | ||
281 | 56 | dev: | ||
282 | 57 | type: local | ||
283 | 58 | data-dir: /home/kapil/.juju/local | ||
284 | 59 | admin-secret: b3a5dee4fb8c4fc9a4db04751e5936f4 | ||
285 | 60 | default-series: precise | ||
286 | 61 | juju-origin: ppa | ||
287 | 62 | api-port: 8081 | ||
288 | 63 | |||
289 | 64 | Note that juju-origin is set to the ppa, the api server runs outside of | ||
290 | 65 | the container, and is launched using whichever branch you're using. | ||
291 | 66 | |||
292 | 67 | Also note that the api-port should be set at 8081, which the gui's | ||
293 | 68 | initial environment connection currently defaults to. | ||
294 | 69 | |||
295 | 70 | You'll need to bootstrap the local environment, and deploy one service. | ||
296 | 71 | The api server needs access to the provisioning credentials which are | ||
297 | 72 | lazily initialized in juju upon usage. | ||
298 | 73 | |||
299 | 74 | Juju-gui and rapi-delta can communicate via an encrypted WebSockets | ||
300 | 75 | connection: to enable it, add the following line to the config above:: | ||
301 | 76 | |||
302 | 77 | api-secure: true | ||
303 | 78 | |||
304 | 79 | You will also need to edit your ``app/config.js`` replacing | ||
305 | 80 | ``ws://localhost:8081/ws`` with ``wss://localhost:8081/ws``. | ||
306 | 81 | |||
307 | 82 | By default, rapi-delta uses a self-signed certificate; because of that you | ||
308 | 83 | will need to visit the https://localhost:8081/ws WebSockets URL with your | ||
309 | 84 | browser and accept the included self-signed certificate, or the WebSockets | ||
310 | 85 | encrypted connection will not work. | ||
311 | 86 | |||
312 | 87 | In order to use a different certificate, you add an api-keys option to the | ||
313 | 88 | config above: its value will be the path of the directory containing the | ||
314 | 89 | certificate and the private key, whose filenames will have to be respectively | ||
315 | 90 | ``juju.crt`` and ``juju.key``. | ||
316 | 91 | |||
317 | 92 | After which, the gui should be functional (it automatically polls the | ||
318 | 93 | api server for establishing a websocket). | ||
319 | 94 | |||
320 | 95 | Running unit tests | ||
321 | 96 | ================== | ||
322 | 97 | |||
323 | 98 | $ xdg-open test/index.html | ||
324 | 99 | |||
325 | 100 | Documentation | ||
326 | 101 | ============= | ||
327 | 102 | |||
328 | 103 | Generated JavaScript documentation is available in the yuidoc directory. | ||
329 | 104 | Start with the index.html file. You can view the docs by running:: | ||
330 | 105 | |||
331 | 106 | $ xdg-open yuidoc/index.html | ||
332 | 107 | |||
333 | 108 | To regenerate the docs run:: | ||
334 | 109 | |||
335 | 110 | $ make yuidoc | ||
336 | 111 | |||
337 | 112 | The documentation for YUIDoc markup is at | ||
338 | 113 | http://yui.github.com/yuidoc/syntax/ . | ||
339 | 114 | |||
340 | 115 | Running lint | ||
341 | 116 | ============ | ||
342 | 117 | |||
343 | 118 | $ jshint --config=jshint.config `bzr ls -RV -k file | grep -v assets/` | ||
344 | 119 | |||
345 | 120 | Making releases | ||
346 | 121 | =============== | ||
347 | 122 | |||
348 | 123 | To make a release, you must either be in a checkout of lp:juju-gui | ||
349 | 124 | without uncommitted changes, or you must override one of the | ||
350 | 125 | `pertinent variable names`_ to force a release. | ||
351 | 126 | |||
352 | 127 | .. _`pertinent variable names`: `Potentially Useful Release-Oriented Makefile Variables`_ | ||
353 | 128 | |||
354 | 129 | You also need to have a gpg key, and the python-pytz package installed (as | ||
355 | 130 | well as launchpadlib, but that is installed by default in Ubuntu). | ||
356 | 131 | |||
357 | 132 | See the Process document (docs/process.rst) for step-by-step checklists to | ||
358 | 133 | make developer and stable releases. | ||
359 | 134 | |||
360 | 135 | Potentially Useful Release-Oriented Makefile Variables | ||
361 | 136 | ------------------------------------------------------ | ||
362 | 137 | |||
363 | 138 | The following is a list of pertinent Makefile variables. | ||
364 | 139 | |||
365 | 140 | FINAL | ||
366 | 141 | Set FINAL to any non-empty value to make a final release. This will cause | ||
367 | 142 | the bzr revno to be omitted from the tarball name, and (if you use the | ||
368 | 143 | release target) will cause the release to be uploaded to the stable series | ||
369 | 144 | rather than the trunk series. Example usage:: | ||
370 | 145 | |||
371 | 146 | $ FINAL=1 make release | ||
372 | 147 | |||
373 | 148 | PROD | ||
374 | 149 | By default, releases will be uploaded to staging.launchpad.net, which is a | ||
375 | 150 | separate version of Launchpad that uses a temporary database. This can be | ||
376 | 151 | convenient for trying out the release process in the Makefile without | ||
377 | 152 | affecting our actual production releases. Set PROD to any non-empty value | ||
378 | 153 | to send uploads to launchpad.net, the production version of Launchpad, when | ||
379 | 154 | you are ready to make a real release. | ||
380 | 155 | |||
381 | 156 | Note that you may need to ask the webops to turn off the two-factor | ||
382 | 157 | authentication on your Launchpad staging account in order for the staging to | ||
383 | 158 | work. Go to the #launchpad-ops channel on the Canonical IRC server and ask | ||
384 | 159 | something like "webops, could you disable 2FA on my staging account?" | ||
385 | 160 | |||
386 | 161 | Example usage:: | ||
387 | 162 | |||
388 | 163 | $ PROD=1 make release | ||
389 | 164 | |||
390 | 165 | IS_TRUNK_CHECKOUT | ||
391 | 166 | Set this to any non-empty value to force the Makefile to believe it is | ||
392 | 167 | working with a trunk checkout. Example usage:: | ||
393 | 168 | |||
394 | 169 | $ IS_TRUNK_CHECKOUT=1 make release | ||
395 | 170 | |||
396 | 171 | HAS_NO_CHANGES | ||
397 | 172 | Set this to any non-empty value to force the Makefile to believe that the | ||
398 | 173 | current code tree has no changes. Example usage:: | ||
399 | 174 | |||
400 | 175 | $ HAS_NO_CHANGES=1 make release | ||
401 | 176 | |||
402 | 177 | IS_SAFE_RELEASE | ||
403 | 178 | Set this to any non-empty value to force the Makefile to bypass checks of | ||
404 | 179 | IS_TRUNK_CHECKOUT and HAS_NO_CHANGES. Example usage:: | ||
405 | 180 | |||
406 | 181 | $ IS_SAFE_RELEASE=1 make release | ||
407 | 182 | |||
408 | 183 | More documentation | ||
409 | 184 | ================== | ||
410 | 185 | |||
411 | 186 | Install Sphinx:: | ||
412 | 187 | |||
413 | 188 | $ sudo apt-get install python-sphinx | ||
414 | 189 | |||
415 | 190 | Build the docs:: | ||
416 | 191 | |||
417 | 192 | $ cd docs | ||
418 | 193 | $ make html | ||
419 | 194 | |||
420 | 195 | View them:: | ||
421 | 196 | |||
422 | 197 | $ xdg-open _build/html/index.html | ||
460 | 198 | 38 | ||
461 | === modified file 'docs/architecture.rst' | |||
462 | --- docs/architecture.rst 2012-10-05 09:42:27 +0000 | |||
463 | +++ docs/architecture.rst 2012-12-12 10:07:21 +0000 | |||
464 | @@ -6,55 +6,54 @@ | |||
465 | 6 | ======== | 6 | ======== |
466 | 7 | 7 | ||
467 | 8 | MVC YUI | 8 | MVC YUI |
469 | 9 | ~~~~~~~ | 9 | ------- |
470 | 10 | 10 | ||
474 | 11 | Juju-gui is based on yui's backbone style app framework. The official docs | 11 | Juju-gui is based on yui's backbone style app framework. The `official docs |
475 | 12 | for this are highly recommended for developers: | 12 | <http://yuilibrary.com/yui/docs/app/>`_ are highly recommended for developers. |
473 | 13 | http://yuilibrary.com/yui/docs/app/ | ||
476 | 14 | 13 | ||
477 | 15 | An overview of the individual pieces. | 14 | An overview of the individual pieces. |
478 | 16 | 15 | ||
488 | 17 | - Router - Route dispatch by url, saves and restores url state. | 16 | - `Router <http://yuilibrary.com/yui/docs/router/>`_ - Route dispatch by url, |
489 | 18 | http://yuilibrary.com/yui/docs/router/ | 17 | saves and restores url state. |
490 | 19 | 18 | ||
491 | 20 | - Views - Rendering of a view | 19 | - `Views <http://yuilibrary.com/yui/docs/view/index.html>`_ - Rendering of a |
492 | 21 | http://yuilibrary.com/yui/docs/view/index.html | 20 | view. |
493 | 22 | 21 | ||
494 | 23 | - Model - Domain objects with change events | 22 | - `Model <http://yuilibrary.com/yui/docs/model/>`_, |
495 | 24 | http://yuilibrary.com/yui/docs/model/ | 23 | `ModelList <http://yuilibrary.com/yui/docs/model-list/>`_ - Domain objects |
496 | 25 | http://yuilibrary.com/yui/docs/model-list/ | 24 | with change events. |
497 | 26 | 25 | ||
498 | 27 | Environment Integration | 26 | Environment Integration |
500 | 28 | ~~~~~~~~~~~~~~~~~~~~~~~ | 27 | ----------------------- |
501 | 29 | 28 | ||
502 | 30 | The gui connects and communicates to the environment over a web socket | 29 | The gui connects and communicates to the environment over a web socket |
503 | 31 | connection. | 30 | connection. |
504 | 32 | 31 | ||
505 | 33 | RPC Calls | 32 | RPC Calls |
507 | 34 | ~~~~~~~~~ | 33 | --------- |
508 | 35 | 34 | ||
509 | 36 | Completion callbacks can be used with any of the methods on the environment. | 35 | Completion callbacks can be used with any of the methods on the environment. |
510 | 37 | Multiple calls are done in parallel. | 36 | Multiple calls are done in parallel. |
511 | 38 | 37 | ||
512 | 39 | RPC Events | 38 | RPC Events |
514 | 40 | ~~~~~~~~~~ | 39 | ---------- |
515 | 41 | 40 | ||
516 | 42 | Messages from the backend for known rpc operation results are messaged out as | 41 | Messages from the backend for known rpc operation results are messaged out as |
517 | 43 | Environment events. | 42 | Environment events. |
518 | 44 | 43 | ||
519 | 45 | Delta Stream | 44 | Delta Stream |
521 | 46 | ~~~~~~~~~~~~ | 45 | ------------ |
522 | 47 | 46 | ||
523 | 48 | A stream of object changes, used to update models. | 47 | A stream of object changes, used to update models. |
524 | 49 | 48 | ||
525 | 50 | Scenarios | 49 | Scenarios |
527 | 51 | --------- | 50 | ~~~~~~~~~ |
528 | 52 | 51 | ||
529 | 53 | - new client | 52 | - new client |
530 | 54 | - existing client disconnects and reconnects | 53 | - existing client disconnects and reconnects |
531 | 55 | 54 | ||
532 | 56 | Requirements | 55 | Requirements |
534 | 57 | ------------ | 56 | ~~~~~~~~~~~~ |
535 | 58 | 57 | ||
536 | 59 | :: | 58 | :: |
537 | 60 | 59 | ||
538 | @@ -67,14 +66,14 @@ | |||
539 | 67 | -- delta | 66 | -- delta |
540 | 68 | 67 | ||
541 | 69 | Questions | 68 | Questions |
553 | 70 | ~~~~~~~~~ | 69 | --------- |
554 | 71 | 70 | ||
555 | 72 | Model Composition and relations. | 71 | - Model Composition and relations. |
556 | 73 | 72 | ||
557 | 74 | relations by id | 73 | - relations by id |
558 | 75 | 74 | ||
559 | 76 | We have multiple object states for a given. | 75 | - We have multiple object states for a given. |
560 | 77 | 76 | ||
561 | 78 | Inline combo handler for yui: https://github.com/rgrove/combohandler | 77 | - Inline combo handler for YUI: <https://github.com/rgrove/combohandler>. |
562 | 79 | 78 | ||
563 | 80 | More complicated but similiar: https://github.com/jafl/YUI-3-Stockpile | 79 | - More complicated but similiar: <https://github.com/jafl/YUI-3-Stockpile>. |
564 | 81 | 80 | ||
565 | === modified file 'docs/d3-component-framework.rst' | |||
566 | --- docs/d3-component-framework.rst 2012-11-29 03:54:35 +0000 | |||
567 | +++ docs/d3-component-framework.rst 2012-12-12 10:07:21 +0000 | |||
568 | @@ -15,7 +15,7 @@ | |||
569 | 15 | explain this usage as it exists today. | 15 | explain this usage as it exists today. |
570 | 16 | 16 | ||
571 | 17 | The framework only models two high level objects, Component and Module. A | 17 | The framework only models two high level objects, Component and Module. A |
573 | 18 | Component is a top level container around Module objects. The Component | 18 | Component is a top level container around Module objects. The Component |
574 | 19 | provides the implementation of the declarative behavior provided by the | 19 | provides the implementation of the declarative behavior provided by the |
575 | 20 | framework. The Module(s) implement the logical sections of the application. In | 20 | framework. The Module(s) implement the logical sections of the application. In |
576 | 21 | the YUI world it might be common to expect each Module to be the application's | 21 | the YUI world it might be common to expect each Module to be the application's |
577 | @@ -76,14 +76,14 @@ | |||
578 | 76 | this point that any d3js synthetic events are bound to the canvas (see the | 76 | this point that any d3js synthetic events are bound to the canvas (see the |
579 | 77 | section on events below). This separation of phases exists to make the life of | 77 | section on events below). This separation of phases exists to make the life of |
580 | 78 | the Module writer simpler. They can rely on whatever elements they'll be drawing | 78 | the Module writer simpler. They can rely on whatever elements they'll be drawing |
586 | 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 |
587 | 80 | properly available due to the renderOnce setup. They can also be sure that | 80 | properly available due to the renderOnce setup. They can also be sure that |
588 | 81 | any ``update`` driven intermediate data will be computed and available for | 81 | any ``update`` driven intermediate data will be computed and available for |
589 | 82 | use in ``render``. This reduces the need for checks in each module to assert | 82 | use in ``render``. This reduces the need for checks in each module to assert |
590 | 83 | the most basic DOM state. | 83 | the most basic DOM state. |
591 | 84 | 84 | ||
594 | 85 | After the initial render its expected that updates to the scene occur via the | 85 | After the initial render its expected that updates to the scene occur via the |
595 | 86 | event handlers in the various modules. Render will not usually need to be called | 86 | event handlers in the various modules. Render will not usually need to be called |
596 | 87 | more than once unless the entire Component rendering is removed from the DOM and | 87 | more than once unless the entire Component rendering is removed from the DOM and |
597 | 88 | then later re-attached. | 88 | then later re-attached. |
598 | 89 | 89 | ||
599 | 90 | 90 | ||
600 | === added symlink 'docs/hacking.rst' | |||
601 | === target is u'../HACKING' | |||
602 | === modified file 'docs/index.rst' | |||
603 | --- docs/index.rst 2012-11-28 12:30:32 +0000 | |||
604 | +++ docs/index.rst 2012-12-12 10:07:21 +0000 | |||
605 | @@ -13,6 +13,7 @@ | |||
606 | 13 | :maxdepth: 2 | 13 | :maxdepth: 2 |
607 | 14 | 14 | ||
608 | 15 | readme | 15 | readme |
609 | 16 | hacking | ||
610 | 16 | style-guide | 17 | style-guide |
611 | 17 | architecture | 18 | architecture |
612 | 18 | d3-component-framework | 19 | d3-component-framework |
613 | 19 | 20 | ||
614 | === modified file 'docs/process.rst' | |||
615 | --- docs/process.rst 2012-12-10 14:20:35 +0000 | |||
616 | +++ docs/process.rst 2012-12-12 10:07:21 +0000 | |||
617 | @@ -6,9 +6,9 @@ | |||
618 | 6 | =============================== | 6 | =============================== |
619 | 7 | 7 | ||
620 | 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. |
624 | 9 | - When determining a solution, consider this preferred Software | 9 | - When determining a solution, consider this preferred `Software |
625 | 10 | Architecture Cheat Sheet: | 10 | Architecture Cheat Sheet |
626 | 11 | http://gorban.org/post/32873465932/software-architecture-cheat-sheet | 11 | <http://gorban.org/post/32873465932/software-architecture-cheat-sheet>`_ |
627 | 12 | - Have a pre-implementation call with someone about your solution. If you | 12 | - Have a pre-implementation call with someone about your solution. If you |
628 | 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. |
629 | 14 | - Use TDD. Your prototype might be perfect, but you can still move it aside | 14 | - Use TDD. Your prototype might be perfect, but you can still move it aside |
630 | @@ -16,7 +16,7 @@ | |||
631 | 16 | - Update the CHANGES.yaml file with your changes. The newest (topmost) | 16 | - Update the CHANGES.yaml file with your changes. The newest (topmost) |
632 | 17 | section should have the version "unreleased". If not and you are | 17 | section should have the version "unreleased". If not and you are |
633 | 18 | making changes, add an "unreleased" section at the top. All other | 18 | making changes, add an "unreleased" section at the top. All other |
635 | 19 | version numbers follow Semantic Versioning (http://semver.org/). | 19 | version numbers follow `Semantic Versioning <http://semver.org/>`_. |
636 | 20 | 20 | ||
637 | 21 | Checklist for Preparing for a Review | 21 | Checklist for Preparing for a Review |
638 | 22 | ==================================== | 22 | ==================================== |
639 | @@ -79,8 +79,8 @@ | |||
640 | 79 | * Make sure that new code has tests. | 79 | * Make sure that new code has tests. |
641 | 80 | * Make sure you can understand the new code. Ask for clarification if | 80 | * Make sure you can understand the new code. Ask for clarification if |
642 | 81 | necessary. | 81 | necessary. |
645 | 82 | * Consider the advice in this preferred Software Architecture Cheat Sheet. | 82 | * Consider the advice in this preferred `Software Architecture Cheat Sheet |
646 | 83 | http://gorban.org/post/32873465932/software-architecture-cheat-sheet | 83 | <http://gorban.org/post/32873465932/software-architecture-cheat-sheet>`_ |
647 | 84 | * Make sure changes to a file correspond to the naming conventions and other | 84 | * Make sure changes to a file correspond to the naming conventions and other |
648 | 85 | stylistic considerations local to that file, and within our project. | 85 | stylistic considerations local to that file, and within our project. |
649 | 86 | * Before you ask for a change, think and make sure you can't compromise | 86 | * Before you ask for a change, think and make sure you can't compromise |
650 | 87 | 87 | ||
651 | === modified file 'docs/style-guide.rst' | |||
652 | --- docs/style-guide.rst 2012-11-07 18:41:11 +0000 | |||
653 | +++ docs/style-guide.rst 2012-12-12 10:07:21 +0000 | |||
654 | @@ -15,7 +15,7 @@ | |||
655 | 15 | indention will be applied. | 15 | indention will be applied. |
656 | 16 | 16 | ||
657 | 17 | 17 | ||
659 | 18 | For loops | 18 | For Loops |
660 | 19 | ========= | 19 | ========= |
661 | 20 | 20 | ||
662 | 21 | Unless you are counting something, for loops (and for-in loops) are a trap. | 21 | Unless you are counting something, for loops (and for-in loops) are a trap. |
663 | @@ -29,7 +29,7 @@ | |||
664 | 29 | should end with a non-blank line). | 29 | should end with a non-blank line). |
665 | 30 | 30 | ||
666 | 31 | 31 | ||
668 | 32 | Object literal formatting | 32 | Object Literal Formatting |
669 | 33 | ========================= | 33 | ========================= |
670 | 34 | 34 | ||
671 | 35 | Things you should do: | 35 | Things you should do: |
672 | @@ -66,7 +66,7 @@ | |||
673 | 66 | errors = utils.validate(values, schema); | 66 | errors = utils.validate(values, schema); |
674 | 67 | 67 | ||
675 | 68 | 68 | ||
677 | 69 | Chaining method calls | 69 | Chaining Method Calls |
678 | 70 | ===================== | 70 | ===================== |
679 | 71 | 71 | ||
680 | 72 | Some APIs are designed such that mutating method calls return the object being | 72 | Some APIs are designed such that mutating method calls return the object being |
681 | @@ -160,13 +160,13 @@ | |||
682 | 160 | ======== | 160 | ======== |
683 | 161 | 161 | ||
684 | 162 | We use YUIDoc to document the applications internals. YUIDoc comments | 162 | We use YUIDoc to document the applications internals. YUIDoc comments |
686 | 163 | start with "/**" and end with "*/". The Makefile includes a simple | 163 | start with ``/**`` and end with ``*/``. The Makefile includes a simple |
687 | 164 | linter that enforces YUIDoc comments for each function in the | 164 | linter that enforces YUIDoc comments for each function in the |
688 | 165 | application. | 165 | application. |
689 | 166 | 166 | ||
690 | 167 | This simple linting sometimes means that functions that we might not | 167 | This simple linting sometimes means that functions that we might not |
691 | 168 | otherwise document require documentation. If a one-line comment is | 168 | otherwise document require documentation. If a one-line comment is |
693 | 169 | sufficient in those situations, a comment of this form may be used: | 169 | sufficient in those situations, a comment of this form may be used:: |
694 | 170 | 170 | ||
695 | 171 | /** Handle errors */ | 171 | /** Handle errors */ |
696 | 172 | error_callback: function(err) { | 172 | error_callback: function(err) { |
697 | @@ -174,7 +174,7 @@ | |||
698 | 174 | } | 174 | } |
699 | 175 | 175 | ||
700 | 176 | Most functions (or methods) will call for normal, multi-line YUIDoc | 176 | Most functions (or methods) will call for normal, multi-line YUIDoc |
702 | 177 | comments like this: | 177 | comments like this:: |
703 | 178 | 178 | ||
704 | 179 | /** | 179 | /** |
705 | 180 | * Frob the thingy. | 180 | * Frob the thingy. |
706 | @@ -184,5 +184,5 @@ | |||
707 | 184 | * @return {undefined} Side-effects only, eturns nothing. | 184 | * @return {undefined} Side-effects only, eturns nothing. |
708 | 185 | */ | 185 | */ |
709 | 186 | 186 | ||
712 | 187 | Full documentation for the various YUIDoc directives is at | 187 | `Full documentation <http://yui.github.com/yuidoc/syntax/>`_ |
713 | 188 | http://yui.github.com/yuidoc/syntax/ . | 188 | for the various YUIDoc directives is available. |
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: re.rst component- framework. rst guide.rst
A HACKING
M README
A [revision details]
M docs/architectu
M docs/d3-
M docs/index.rst
M docs/process.rst
M docs/style-