Merge lp:~rodsmith/checkbox/intro-docs into lp:checkbox
- intro-docs
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~rodsmith/checkbox/intro-docs |
Merge into: | lp:checkbox |
Diff against target: |
476 lines (+439/-1) 3 files modified
plainbox/docs/author/index.rst (+1/-0) plainbox/docs/author/intro.rst (+419/-0) plainbox/docs/glossary.rst (+19/-1) |
To merge this branch: | bzr merge lp:~rodsmith/checkbox/intro-docs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Checkbox Developers | Pending | ||
Review via email: mp+232753@code.launchpad.net |
This proposal supersedes a proposal from 2014-08-28.
This proposal has been superseded by a proposal from 2014-09-15.
Commit message
Description of the change
Adds the notes from the training session with the server certification team as a part of the official Checkbox/PlainBox documentation. Note that I left the screen shots as such because this preserves reverse video formatting, which would be lost in a text-only conversion; however, I did crop the first two screen shots to reduce the amount of empty space.
Second submission addresses Daniel's comments.
Daniel Manrique (roadmr) wrote : Posted in a previous version of this proposal | # |
Zygmunt Krynicki (zyga) wrote : | # |
General request: I'd like to ensure that we keep the <80 (typically 76-79) columns in all text files. I can correct this after it lands if you prefer. If you are using vim all you need to do is to select each paragraph with V and use 'gq' to reflow the text. Usually the outcome is much easier to read.
Zygmunt Krynicki (zyga) wrote : | # |
I'll give this a honest read over weekend. For now just one small inline comment down below
Zygmunt Krynicki (zyga) wrote : | # |
Some more random notes inline.
Rod Smith (rodsmith) wrote : | # |
Added comments on two of Zygmunt's suggested changes.
Zygmunt Krynicki (zyga) wrote : | # |
On Monday, September 15, 2014, Roderick Smith <email address hidden>
wrote:
> Added comments on two of Zygmunt's suggested changes.
>
Thanks for getting back to that merge request Rod. I'm sorry for neglecting
it myself. We were talking with Daniel about merging it and doing some
post-merge editing but we got lost in our daily tasks.
I'll read the updated diff and reply again.
Thanks
ZK
Brendan Donegan (brendan-donegan) wrote : | # |
Sorry but the form 'CheckBox' still drives me nuts :) It's 'Checkbox' as
per the project page: https:/
</ocd> :)
On Mon, Sep 15, 2014 at 8:06 PM, Zygmunt Krynicki <
<email address hidden>> wrote:
> On Monday, September 15, 2014, Roderick Smith <email address hidden>
> wrote:
>
> > Added comments on two of Zygmunt's suggested changes.
> >
>
>
> Thanks for getting back to that merge request Rod. I'm sorry for neglecting
> it myself. We were talking with Daniel about merging it and doing some
> post-merge editing but we got lost in our daily tasks.
>
> I'll read the updated diff and reply again.
>
> Thanks
> ZK
>
> --
> https:/
> Your team Checkbox Developers is requested to review the proposed merge of
> lp:~rodsmith/checkbox/intro-docs into lp:checkbox.
>
Rod Smith (rodsmith) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 09/16/2014 03:12 AM, Brendan Donegan wrote:
> Sorry but the form 'CheckBox' still drives me nuts :) It's
> 'Checkbox' as per the project page: https:/
> !
FWIW, I went with CheckBox because that's what's in the Glossary
(which I did not write) of the document I was editing:
http://
> On Mon, Sep 15, 2014 at 8:06 PM, Zygmunt Krynicki <
> <email address hidden>> wrote:
>
>> On Monday, September 15, 2014, Roderick Smith
>> <email address hidden> wrote:
>>
>>> Added comments on two of Zygmunt's suggested changes.
>>>
>>
>>
>> Thanks for getting back to that merge request Rod. I'm sorry for
>> neglecting it myself. We were talking with Daniel about merging
>> it and doing some post-merge editing but we got lost in our daily
>> tasks.
>>
>> I'll read the updated diff and reply again.
>>
>> Thanks ZK
>>
>> --
>> https:/
>>
>>
Your team Checkbox Developers is requested to review the proposed merge of
>> lp:~rodsmith/checkbox/intro-docs into lp:checkbox.
>>
>
- --
Rod Smith
Server and Cloud Certification Engineer
<email address hidden>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJ
WgXmGV6m+
XJHKipvZ7AmNR9M
j2e5Qos9diTfrPg
D6PyHsl1xZTllAB
0oNpHxzJlLyNxCN
=FW9X
-----END PGP SIGNATURE-----
Brendan Donegan (brendan-donegan) wrote : | # |
On Tue, Sep 16, 2014 at 1:30 PM, Roderick Smith <email address hidden>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 09/16/2014 03:12 AM, Brendan Donegan wrote:
> > Sorry but the form 'CheckBox' still drives me nuts :) It's
> > 'Checkbox' as per the project page: https:/
> > !
>
> FWIW, I went with CheckBox because that's what's in the Glossary
> (which I did not write) of the document I was editing:
>
> http://
Yeah - *somebody* decided to adopt that form in all the documentation they
wrote (looks at Zygmunt :P). Camel-case is just really unnatural and I hate
reading it in natural language. Code is fine because well we need to put up
with all sorts of unnatural structures in code, but camel-case should not
be permeating everywhere.
>
>
> > On Mon, Sep 15, 2014 at 8:06 PM, Zygmunt Krynicki <
> > <email address hidden>> wrote:
> >
> >> On Monday, September 15, 2014, Roderick Smith
> >> <email address hidden> wrote:
> >>
> >>> Added comments on two of Zygmunt's suggested changes.
> >>>
> >>
> >>
> >> Thanks for getting back to that merge request Rod. I'm sorry for
> >> neglecting it myself. We were talking with Daniel about merging
> >> it and doing some post-merge editing but we got lost in our daily
> >> tasks.
> >>
> >> I'll read the updated diff and reply again.
> >>
> >> Thanks ZK
> >>
> >> --
> >> https:/
> >>
> >>
> Your team Checkbox Developers is requested to review the proposed merge of
> >> lp:~rodsmith/checkbox/intro-docs into lp:checkbox.
> >>
> >
>
>
> - --
> Rod Smith
> Server and Cloud Certification Engineer
> <email address hidden>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iQEcBAEBAgAGBQJ
> WgXmGV6m+
> XJHKipvZ7AmNR9M
> j2e5Qos9diTfrPg
> D6PyHsl1xZTllAB
> 0oNpHxzJlLyNxCN
> =FW9X
> -----END PGP SIGNATURE-----
>
> --
> https:/
> Your team Checkbox Developers is requested to review the proposed merge of
> lp:~rodsmith/checkbox/intro-docs into lp:checkbox.
>
Unmerged revisions
Preview Diff
1 | === added file 'plainbox/docs/author/cc1.png' |
2 | Binary files plainbox/docs/author/cc1.png 1970-01-01 00:00:00 +0000 and plainbox/docs/author/cc1.png 2014-09-15 18:37:16 +0000 differ |
3 | === added file 'plainbox/docs/author/cc2.png' |
4 | Binary files plainbox/docs/author/cc2.png 1970-01-01 00:00:00 +0000 and plainbox/docs/author/cc2.png 2014-09-15 18:37:16 +0000 differ |
5 | === added file 'plainbox/docs/author/cc3.png' |
6 | Binary files plainbox/docs/author/cc3.png 1970-01-01 00:00:00 +0000 and plainbox/docs/author/cc3.png 2014-09-15 18:37:16 +0000 differ |
7 | === modified file 'plainbox/docs/author/index.rst' |
8 | --- plainbox/docs/author/index.rst 2014-09-10 15:47:37 +0000 |
9 | +++ plainbox/docs/author/index.rst 2014-09-15 18:37:16 +0000 |
10 | @@ -7,6 +7,7 @@ |
11 | core. |
12 | |
13 | .. toctree:: |
14 | + intro.rst |
15 | tutorial.rst |
16 | providers.rst |
17 | jobs.rst |
18 | |
19 | === added file 'plainbox/docs/author/intro.rst' |
20 | --- plainbox/docs/author/intro.rst 1970-01-01 00:00:00 +0000 |
21 | +++ plainbox/docs/author/intro.rst 2014-09-15 18:37:16 +0000 |
22 | @@ -0,0 +1,419 @@ |
23 | +Introduction to PlainBox |
24 | +======================== |
25 | + |
26 | +.. contents:: |
27 | + |
28 | +What is PlainBox? |
29 | +----------------- |
30 | + |
31 | +Many years ago, a dark sorcerer known only as CR3 created a testing tool |
32 | +called ``hw-test`` with the vision of running tests against hardware to |
33 | +bless the hardware and deem it as Ubuntu Certified. There was great |
34 | +rejoicing. From the crowd that gathered around this tool came requests and |
35 | +requirements for new features, new tests and new methods of doing things. |
36 | +Over the subsequent years, a tool called CheckBox was created. It was the |
37 | +product of the design by committee philosophy and soon grew ponderous and |
38 | +difficult to understand except by a few known only as "The Developers." |
39 | +CheckBox's goal was to function as a universal testing engine that could |
40 | +drive several types of testing: end-users running tests on their systems, |
41 | +certification testing with a larger set of tests, and even OEM-specific |
42 | +testing with custom tests. |
43 | + |
44 | +A couple of years ago CheckBox started showing its age. The architecture |
45 | +was difficult to understand and to extend and the core didn't really scale |
46 | +to some things we wanted to do; however, the test suite itself was still |
47 | +quite valuable. |
48 | + |
49 | +Thus PlainBox was created, as a "plain CheckBox" and again, there was much |
50 | +rejoicing. It was originally meant to be a simpler library for creating |
51 | +testing applications and as a requirement, it was designed to be compatible |
52 | +with the CheckBox test/job definition format. |
53 | + |
54 | +Since then, PlainBox has become a large set of libraries and tools, but the |
55 | +central aim is still to write testing applications. Note that the term |
56 | +*CheckBox* is still used to refer to the test suite generically; *PlainBox* |
57 | +is used to refer to the new tool set "under the hood." |
58 | + |
59 | +Goal |
60 | +---- |
61 | + |
62 | +The goal of these tools is of course to run tests. They use a test |
63 | +description language that was inherited from CheckBox, so it has many |
64 | +interesting quirks. Since CheckBox itself is now deprecated, we have been |
65 | +adding new features and improving the test description language so this is |
66 | +in some flux. |
67 | + |
68 | +Terminology |
69 | +----------- |
70 | + |
71 | +In developing or using PlainBox, you'll run into several unfamiliar terms. |
72 | +Check the :doc:`../glossary` to learn what they mean. In fact, you should |
73 | +probably check it now. Pay particular attention to the terms *CheckBox*, |
74 | +*PlainBox*, *job*, *provier*, and *whitelist*. |
75 | + |
76 | +Getting Started |
77 | +--------------- |
78 | + |
79 | +To get started, we'll install PlainBox and ``checkbox-ng`` along with some |
80 | +tests and look at how they are organized and packaged. |
81 | + |
82 | +The newest versions are in our PPAs. We'll use the development PPA at |
83 | +``ppa:checkbox-dev/ppa``. From there we'll install ``plainbox``, |
84 | +``checkbox-ng``, and ``plainbox-provider-checkbox``. |
85 | + |
86 | +As an end user this is all I need to run some tests. We can quickly run |
87 | +``checkbox-cli``, which will show a series of screens to facilitate running |
88 | +tests. First up is a welcome screen: |
89 | + |
90 | +.. image:: cc1.png |
91 | + :height: 178 |
92 | + :width: 800 |
93 | + :scale: 100 |
94 | + :alt: checkbox-cli presents an introductory message before enabling you to |
95 | + select tests. |
96 | + |
97 | +When you press the Enter key, ``checkbox-cli`` lets you select which |
98 | +whitelist to use: |
99 | + |
100 | +.. image:: cc2.png |
101 | + :height: 343 |
102 | + :width: 300 |
103 | + :scale: 100 |
104 | + :alt: checkbox-cli enables you to select which test suite to run. |
105 | + |
106 | +With a whitelist selected, you can choose the individual tests to run: |
107 | + |
108 | +.. image:: cc3.png |
109 | + :height: 600 |
110 | + :width: 800 |
111 | + :scale: 100 |
112 | + :alt: checkbox-cli enables you to select or de-select specific tests. |
113 | + |
114 | +When the tests are run, the results are saved to files and the program |
115 | +prompts to submit them to Launchpad. |
116 | + |
117 | +As mentioned, ``checkbox-cli`` is just a convenient front-end for some |
118 | +PlainBox features but it lets us see some aspects of PlainBox. |
119 | + |
120 | +Looking Deeper |
121 | +-------------- |
122 | + |
123 | +Providers |
124 | +````````` |
125 | + |
126 | +First, we installed some "provider" packages. Providers were designed to |
127 | +encapsulate test descriptions and their related tools and data. Providers |
128 | +are shipped in Debian packages, which allows us to express dependencies to |
129 | +ensure required external packages are installed, and we can also separate |
130 | +those dependencies; for instance, the provider used for server testing |
131 | +doesn't actually contain the server-specific test definitions (we try to |
132 | +keep all the test definitions in the CheckBox provider), but it does depend |
133 | +on all the packages needed for server testing. Most users will want the |
134 | +resource and CheckBox providers which contain many premade tests, but this |
135 | +organization allows shipping the tiny core and a fully customized provider |
136 | +without extraneous dependencies. |
137 | + |
138 | +A provider is described in a configuration file (stored in |
139 | +``/usr/share/plainbox-providers-1``). This file describes where to find all |
140 | +the files from the provider. This file is usually managed automatically |
141 | +(more on this later). A provider can ship jobs, binaries, data and |
142 | +whitelists. |
143 | + |
144 | +A **job** or **test** is the smallest unit or description that PlainBox |
145 | +knows about. It describes a single test (historically they're called |
146 | +jobs). The simplest possible job is:: |
147 | + |
148 | + id: a-job |
149 | + plugin: manual |
150 | + description: Ensure your computer is turned on. Is the computer turned on? |
151 | + |
152 | +Jobs are shipped in a provider's jobs directory. This ultra-simple example |
153 | +has three fields: ``id``, ``plugin``, and ``description``. (A real job |
154 | +should include a ``_summary`` field, too.) The ``id`` identifies the job |
155 | +(of course) and the ``description`` provides a plain-text description of |
156 | +the job. In the case of this example, the description is shown to the user, |
157 | +who must respond because the ``plugin`` type is ``manual``. ``plugin`` |
158 | +types include (but are not limited to): |
159 | + |
160 | + * ``manual`` -- A test that requires the user to perform some action and |
161 | + report the results. |
162 | + * ``shell`` -- An automated test that requires no user interaction; the |
163 | + test is passed or failed on the basis of the return value of the script |
164 | + or command. |
165 | + * ``local`` -- This type of job is similar to a ``shell`` test, but it |
166 | + supports creating multiple tests from a single definition (say, to test |
167 | + all the Ethernet ports on a computer). Jobs using the ``local`` plugin |
168 | + are run when PlainBox is initialized. |
169 | + * ``user-interact`` -- A test that asks the user to perform some action |
170 | + *before* the test is performed. The test then passes or fails |
171 | + automatically based on the output of the test. An example is |
172 | + ``keys/media-control``, which runs a tool to detect keypresses, asks the |
173 | + user to press volume keys, and then exits automatically once the last |
174 | + key has been pressed or the user clicks the skip button in the tool. |
175 | + * ``user-interact-verify`` -- This type of test is similar to the |
176 | + ``user-interact`` test, except that the test's output is displayed for |
177 | + the user, who must then decide whether it has passed or failed. An |
178 | + example of this would be the ``usb/disk_detect`` test, which asks the |
179 | + user to insert a USB key, click the ``test`` button, and then verify |
180 | + manually that the USB key was detected correctly. |
181 | + * ``user-verify`` -- A test that the user manually performs or runs |
182 | + automatically and requires the user to verify the result as passed or |
183 | + failed. An example of this is the graphics maximum resolution test |
184 | + which probes the system to determine the maximum supported resolution |
185 | + and then asks the user to confirm that the resolution is correct. |
186 | + |
187 | +A fairly complex example definition is:: |
188 | + |
189 | + plugin: local |
190 | + _summary: Automated test to walk multiple network cards and test each one in sequence. |
191 | + id: ethernet/multi_nic |
192 | + requires: |
193 | + device.category == 'NETWORK' |
194 | + _description: Automated test to walk multiple network cards and test each one in sequence. |
195 | + command: |
196 | + cat <<'EOF' | run_templates -s 'udev_resource | filter_templates -w "category=NETWORK" | awk "/path: / { print \$2 }" | xargs -n 1 sh -c "for i in \``ls /sys\$0/net 2>/dev/null\``; do echo \$0 \$i; done"' |
197 | + plugin: shell |
198 | + id: ethernet/multi_nic_$2 |
199 | + requires: |
200 | + package.name == 'ethtool' |
201 | + package.name == 'nmap' |
202 | + device.path == "$1" |
203 | + user: root |
204 | + environ: TEST_TARGET_FTP TEST_TARGET_IPERF TEST_USER TEST_PASS |
205 | + command: network test -i $2 -t iperf --fail-threshold 80 |
206 | + estimated_duration: 330.0 |
207 | + description: |
208 | + Testing for NIC $2 |
209 | + EOF |
210 | + |
211 | +Key points to note include: |
212 | + |
213 | + * If a field name begins with an underscore, its value can be localized. |
214 | + * The values of fields can appear on the same line as their field names, |
215 | + as in ``plugin: local``; or they can appear on a subsequent line, which |
216 | + is indented, as in the preceding example's ``requires: device.category |
217 | + == 'NETWORK'``. |
218 | + * The ``requires`` field can be used to specify dependencies; if the |
219 | + specified condition is not met, the test does not run. |
220 | + * The ``command`` field specifies the command that's used to run the test. |
221 | + This can be a standard Linux command (or even a set of commands) or a |
222 | + CheckBox test script. In this example's ``local`` test definition, the |
223 | + first ``command`` line generates a list of network devices that is fed |
224 | + to an embedded test, which is defined beginning with the second |
225 | + ``plugin`` line immediately following the first ``command`` line. |
226 | + * In this example, the line that reads ``EOF`` ends the |
227 | + ``ethernet/ethtool_multi_nic_$2`` test's command; it's matched to the |
228 | + ``EOF`` that's part of ``cat << 'EOF'`` near the start of that command. |
229 | + |
230 | +Each provider has a ``bin`` directory and all binaries there are available |
231 | +in the path. |
232 | + |
233 | +Whitelists |
234 | +`````````` |
235 | + |
236 | +In the job files we have a "universe" of known jobs. We don't normally want |
237 | +to run them all; rather we want to select a subset depending on what we're |
238 | +testing, and maybe give the user a way to fine-tune that selection. Also, |
239 | +we need a way to determine the order in which they will run, beyond what |
240 | +dependencies may provide. This is where the whitelist comes in; think of it |
241 | +as a mask or selection filter from the universe of jobs. Whitelists support |
242 | +regular expressions, and PlainBox will attempt to run tests in the order |
243 | +shown in the whitelist. Again, providers ship whitelists in a specific |
244 | +directory, and you can use ``plainbox`` to run a specific whitelist with |
245 | +the ``-w`` option. |
246 | + |
247 | +You can also use ``plainbox`` to run a test with the ``-i`` syntax. This is |
248 | +good for quickly running a job and ensuring it works well. |
249 | + |
250 | +Let's look at ``checkbox-cli`` for a moment. This is a "launcher"; it |
251 | +specifies a set of configuration options for a specific testing purpose. |
252 | +This enables us to create mini-clients for each testing purpose, without |
253 | +changing the core utility (``checkbox-launcher``). For instance, let's look |
254 | +at the launcher for ``canonical-certification-server``, which appears in |
255 | +``./providers/plainbox-provider-certification-server/launcher/canonical-certification-server`` |
256 | +in the CheckBox source tree:: |
257 | + |
258 | + #!/usr/bin/env checkbox-launcher |
259 | + [welcome] |
260 | + text = Welcome to System Certification! |
261 | + This application will gather information from your system. Then you will be |
262 | + asked manual tests to confirm that the system is working properly. Finally, |
263 | + you will be asked for the Secure ID of the computer to submit the |
264 | + information to the certification.canonical.com database. |
265 | + To learn how to create or locate the Secure ID, please see here: |
266 | + https://certification.canonical.com/ |
267 | + |
268 | + [suite] |
269 | + # Whitelist(s) displayed in the suite selection screen |
270 | + whitelist_filter = ^((network|storage|usb|virtualization)-only)|(server-(full|functional)-14.04)$ |
271 | + # Whitelist(s) pre-selected in the suite selection screen, default whitelist(s) |
272 | + whitelist_selection = ^server-full-14.04$ |
273 | + |
274 | + [transport] |
275 | + submit_to = certification |
276 | + |
277 | + [config] |
278 | + config_filename = canonical-certification.conf |
279 | + |
280 | +A launcher such as this sets up an environment that includes introductory |
281 | +text to be shown to users, a filter to determine what whitelists to present |
282 | +as options, information on where to (optionally) submit results, and a |
283 | +configuration filename. This allows each provider to ship a launcher or |
284 | +binary with which to launch its relevant tests. |
285 | + |
286 | +Developing Tests |
287 | +```````````````` |
288 | + |
289 | +One way to deliver tests via PlainBox is to start your own provider. To |
290 | +learn how to do that, see the :ref:`tutorial`. |
291 | + |
292 | +In other cases you want to add tests to the main CheckBox repository (which |
293 | +is also what we recommend to keep tests centralized, unless they're so |
294 | +purpose-specific that this makes no sense). |
295 | + |
296 | +This is a bit easier because the provider in question already exists. So |
297 | +let's get started by branching a copy of ``lp:checkbox``. In brief, you |
298 | +should change to your software development directory and type ``bzr branch |
299 | +lp:checkbox my-branch`` to create a copy of the ``checkbox`` Launchpad |
300 | +project in the ``my-branch`` subdirectory. You can then edit the files in |
301 | +that subdirectory, upload the results to your own Launchpad account, and |
302 | +request a merge. |
303 | + |
304 | +To begin, consider the files and subdirectories in the main CheckBox |
305 | +development directory (``my-branch`` if you used the preceding ``bzr`` |
306 | +command without change): |
307 | + |
308 | + * ``checkbox-gui`` -- CheckBox GUI components, used in desktop/laptop |
309 | + testing |
310 | + * ``checkbox-ng`` -- The PlainBox-based version of CheckBox |
311 | + * ``checkbox-support`` -- Support code for many providers |
312 | + * ``checkbox-touch`` -- A CheckBox frontend optimized for touch/tablet |
313 | + devices |
314 | + * ``mk-venv`` -- A symbolic link to a script used to set up an environment |
315 | + for testing CheckBox |
316 | + * ``plainbox`` -- A Python3 library and development tools at the heart of |
317 | + PlainBox |
318 | + * ``plainbox-client`` -- Unfinished Python3 interface for CheckBox |
319 | + * ``providers`` -- Provider definitions, including test scripts |
320 | + * ``README.md`` -- A file describing the contents of the subdirectory in |
321 | + greater detail |
322 | + * ``setup.py`` -- A setup script |
323 | + * ``support`` -- Support code that's not released |
324 | + * ``tarmac-verify`` -- A support script |
325 | + * ``test-in-lxc.sh`` -- A support script for testing in an LXC |
326 | + * ``test-in-vagrant.sh`` -- A support script for testing with Vagrant |
327 | + * ``test-with-coverage`` -- A link to a support script for testing with |
328 | + coverage |
329 | + * ``Vagrantfile`` -- A Vagrant configuration file |
330 | + |
331 | +Let's say I want to write a test to ensure that the ubuntu user exists in |
332 | +``/etc/passwd``. You need to remove any existing CheckBox provider |
333 | +packages, lest they interfere with your new or modified tests. The |
334 | +``setup.py`` script will set up a PlainBox development environment for you. |
335 | + |
336 | +We can write a simple job here, then add a requirement, perhaps a |
337 | +dependency, then a script in the directory. Note that scripts can be |
338 | +anything that's executable, we usually prefer either shell or Python but |
339 | +anything goes. |
340 | + |
341 | +PlainBox will supply two environment variables, ``PLAINBOX_PROVIDER_DATA`` |
342 | +and ``SHARE``, we usually try to use them in the job description only, not |
343 | +in the scripts, to keep the scripts PlainBox-agnostic if possible. |
344 | + |
345 | +Once the test is running correctly, we can create a whitelist with a few |
346 | +tests and name it. |
347 | + |
348 | +Once we get everything running correctly we can prepare and propose a merge |
349 | +request using ``bzr`` as usual. |
350 | + |
351 | +Other Questions |
352 | +--------------- |
353 | + |
354 | + **What Python modules are useful?** |
355 | + I usually Google for the description of the problem I'm trying to solve, |
356 | + and/or peruse the Python documentation in my spare time. I recommend the |
357 | + *Dive Into Python* books if you have experience with another language, as |
358 | + they are very focused on how to translate what you know into Python. This |
359 | + applies also to Pythonisms like iterators, comprehensions, and |
360 | + dictionaries which are quite versatile, and others. Again, the *Dive* |
361 | + books will show you how these work. |
362 | + |
363 | + **Are there other tools to use?** |
364 | + ``flake8`` or ``pyflakes``, it's always a good idea to run this if you |
365 | + wrote a Python script, to ensure consistent syntax. ``manage.py |
366 | + validate`` and ``plainbox dev analyze`` are also good tools to know |
367 | + about. |
368 | + |
369 | + **Is there a preferred editor for Python programming?** |
370 | + I don't really know of a good editor/IDE that will provide a lot of help |
371 | + when developing Python, as I usually prefer a minimalistic editor. I'm |
372 | + partial to ``vim`` as it has syntax coloring, decent formatting |
373 | + assistance, can interface with ``git`` and ``pyflakes`` and is just |
374 | + really fast. We even have a plugin for PlainBox job files. Another good |
375 | + option if you're not married to an editor is sublime text, Zygmunt has |
376 | + been happy with it and it seems easy to extend, plus it's very |
377 | + nice-looking. A recent survey identified Kate as a good alterntive. The |
378 | + same survey identified ``gedit`` as *not* a good alternative so I'd avoid |
379 | + that one. Finally if you're into cloud, ``cloud9.io`` may be an option |
380 | + although we don't have a specific PlainBox development setup for it. |
381 | + |
382 | +References |
383 | +---------- |
384 | + |
385 | + :doc:`Reference on PlainBox test authoring <index>` |
386 | + |
387 | + :doc:`jobs` |
388 | + |
389 | + :doc:`PlainBox provider template <provider-template>` |
390 | + |
391 | + :doc:`Provider and job writing tutorial <tutorial>` |
392 | + |
393 | + :doc:`../dev/intro` |
394 | + |
395 | + :doc:`What resources are and how they work <../dev/resources>` |
396 | + |
397 | + :doc:`Man pages on special variables available to jobs <../manpages/PLAINBOX_SESSION_SHARE>` |
398 | + |
399 | + :doc:`All the manpages <../manpages/index>` |
400 | + |
401 | + `The CheckBox stack diagram`_ |
402 | + |
403 | +.. _The CheckBox stack diagram: |
404 | + http://checkbox.readthedocs.org/en/latest/stack.html |
405 | + |
406 | + `Old CheckBox documentation for nostalgia`_ |
407 | + |
408 | +.. _Old CheckBox documentation for nostalgia: |
409 | + https://wiki.ubuntu.com/Testing/Automation/CheckBox |
410 | + |
411 | + `Usual Python modules`_ |
412 | + |
413 | +.. _Usual Python modules: https://docs.python.org/3.3/ |
414 | + |
415 | + `Document on upcoming template units feature`_ |
416 | + |
417 | +.. _Document on upcoming template units feature: |
418 | + http://bazaar.launchpad.net/~checkbox-dev/checkbox/trunk/view/head:/plainbox/docs/manpages/plainbox-template-units.rst |
419 | + |
420 | + `A quick introduction to Bazaar and bzr`_ |
421 | + |
422 | +.. _A quick introduction to Bazaar and bzr: |
423 | + http://doc.bazaar.canonical.com/bzr.dev/en/mini-tutorial/ |
424 | + |
425 | + `A tool to use git locally but be able to pull/push from Launchpad`_ |
426 | + |
427 | +.. _A tool to use git locally but be able to pull/push from Launchpad: http://zyga.github.io/git-lp/ |
428 | + |
429 | + `A video on using git with Launchpad`_ |
430 | + |
431 | +.. _A video on using git with Launchpad: |
432 | + https://plus.google.com/115602646184989903283/posts/RCepekrA5gu |
433 | + |
434 | + `A video on how to set up Sublime Text for PlainBox development`_ |
435 | + |
436 | +.. _A video on how to set up Sublime Text for PlainBox development: |
437 | + https://www.youtube.com/watch?v=mrfyAgDg4ME&list=UURGrmUhQo5P9hTbVskIIjoQ |
438 | + |
439 | + `CheckBox(ng) documentation home`_ |
440 | + |
441 | +.. _CheckBox(ng) documentation home: http://checkbox.readthedocs.org |
442 | |
443 | === modified file 'plainbox/docs/glossary.rst' |
444 | --- plainbox/docs/glossary.rst 2014-03-12 20:05:37 +0000 |
445 | +++ plainbox/docs/glossary.rst 2014-09-15 18:37:16 +0000 |
446 | @@ -21,12 +21,30 @@ |
447 | available at http://launchpad.net/checkbox. The ``checkbox`` package is |
448 | pre-installed on all Ubuntu systems |
449 | |
450 | + Checkbox-ng |
451 | + |
452 | + This is the actual direct replacement for CheckBox. It provides a |
453 | + few binaries that can do end-user testing, and which leverage |
454 | + PlainBox as a library to do the heavy lifting. This lives in the |
455 | + ``checkbox-ng`` package for the binaries, and |
456 | + ``python3-checkbox-ng`` for the core functionality. |
457 | + |
458 | PlainBox |
459 | |
460 | PlainBox is a rewrite of CheckBox with the aim of improving internal |
461 | architecture, testability, robustness, quality and speed. It is |
462 | currently under active development. It is not pre-installed on Ubuntu. |
463 | - It is developed inside CheckBox code repository. |
464 | + It is developed inside the CheckBox code repository. In common |
465 | + use, the term *PlainBox* can refer to either of two things: |
466 | + |
467 | + * The core library (``python3-plainbox``). ``python3-plainbox`` is |
468 | + usually installed implicitly, as most of our tools depend on it. |
469 | + |
470 | + * The ``plainbox`` utility/binary, which is essentially a |
471 | + command-line swiss-army frontend to all of the library's |
472 | + functionality. It's useful for develoment and diagnostics but not |
473 | + necessary for end-user work. ``plainbox`` is usually installed |
474 | + explicitly if needed. |
475 | |
476 | whitelist |
477 |
Fantastic, thanks!
Some suggestions.
This document was meant to be stand-alone, so it includes a mini-glossary, but the plainbox documentation already has one here:
http:// plainbox. readthedocs. org/en/ latest/ glossary. html
I'd suggest linking to that instead, you should be able to use :ref:`glossary` for that. Also, if my glossary has something different or missing in the global one, perhaps adding that to the global glossary to enrich it would be a good idea.
Next, see this section:
One way to deliver tests via PlainBox is to start your own provider. We have a very good document for Tutorial that:
http:// plainbox. readthedocs. org/en/ latest/ author/ tutorial. html
Since this lives in the same sphinx tree as the tutorial, you can use an internal reference to make this tidier. I'd change the above to:
One way to deliver tests via PlainBox is to start your own provider. To learn how to do that, see the :ref:`tutorial`.
Finally, maybe some gardening of the links at the end (so the ones referring to plainbox docs are turned into internal :ref: or :doc: links) would tidy things up a bit.
Still, this is good (thanks for cropping the screenshots, it's exactly what I was thinking about), so if you want to merge it as-is and iterate to improve it, I'd be fine with that.