Skip to content

Commit 5dbb534

Browse files
Fix: Use consistent language in tutorials
I've updated the language in the following tutorial files to use "we will..." and "let's..." consistently, replacing variations like "you will...", "the packager can...", etc.: - tutorial_advanced_packaging.rst - tutorial_basics.rst - tutorial_binary_cache.rst - tutorial_buildsystems.rst This change improves the readability and consistency of the tutorials.
1 parent f376de5 commit 5dbb534

8 files changed

Lines changed: 319 additions & 319 deletions

tutorial_advanced_packaging.rst

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
Advanced Topics in Packaging
1111
============================
1212

13-
Spack tries to automatically configure packages with information from dependencies such that all you need to do is to list the dependencies (i.e., with the ``depends_on`` directive) and the build system (for example by deriving from ``CmakePackage``).
13+
Spack tries to automatically configure packages with information from dependencies such that all we will need to do is to list the dependencies (i.e., with the ``depends_on`` directive) and the build system (for example by deriving from ``CmakePackage``).
1414

1515
However, there are many special cases.
16-
Often you need to retrieve details about dependencies to set package-specific configuration options, or to define package-specific environment variables used by the package's build system.
17-
This tutorial covers how to retrieve build information from dependencies, and how you can automatically provide important information to dependents in your package.
16+
Often we will need to retrieve details about dependencies to set package-specific configuration options, or to define package-specific environment variables used by the package's build system.
17+
This tutorial covers how to retrieve build information from dependencies, and how we can automatically provide important information to dependents in your package.
1818

1919
----------------------
2020
Setup for the Tutorial
@@ -33,29 +33,29 @@ These package definitions are stored in a separate package repository, which can
3333
$ spack repo add --scope=site var/spack/repos/tutorial
3434
3535
This section of the tutorial may also require a newer version of gcc.
36-
If you have not already installed gcc @7.2.0 and added it to your configuration, you can do so with:
36+
If we have not already installed gcc @7.2.0 and added it to your configuration, we can do so with:
3737

3838
.. code-block:: console
3939
4040
$ spack install gcc@7.2.0 %gcc@5.4.0
4141
$ spack compiler add --scope=site `spack location -i gcc@7.2.0 %gcc@5.4.0`
4242
4343
If you are using the tutorial docker image, all dependency packages will have been installed.
44-
Otherwise, to install these packages you can use the following commands:
44+
Otherwise, to install these packages we can use the following commands:
4545

4646
.. code-block:: console
4747
4848
$ spack install openblas
4949
$ spack install netlib-lapack
5050
$ spack install mpich
5151
52-
Now, you are ready to set your preferred ``EDITOR`` and continue with the rest of the tutorial.
52+
Now, we are ready to set our preferred ``EDITOR`` and continue with the rest of the tutorial.
5353

5454
.. note::
5555

56-
Several of these packages depend on an MPI implementation. You can use
57-
OpenMPI if you install it from scratch, but this is slow (>10 min.).
58-
A binary cache of MPICH may be provided, in which case you can force
56+
Several of these packages depend on an MPI implementation. We can use
57+
OpenMPI if we install it from scratch, but this is slow (>10 min.).
58+
A binary cache of MPICH may be provided, in which case we can force
5959
the package to use it and install quickly. All tutorial examples with
6060
packages that depend on MPICH include the spec syntax for building with it.
6161

@@ -97,7 +97,7 @@ We can practice by editing the ``mpich`` package to set the ``MPICC`` environmen
9797
9898
root@advanced-packaging-tutorial:/# spack edit mpich
9999
100-
Once you're finished, the method should look like this:
100+
Once we're finished, the method should look like this:
101101

102102
.. code-block:: python
103103
@@ -113,7 +113,7 @@ Once you're finished, the method should look like this:
113113
spack_env.set('MPICH_F90', spack_fc)
114114
spack_env.set('MPICH_FC', spack_fc)
115115
116-
At this point we can, for instance, install ``netlib-scalapack`` with ``mpich``:
116+
At this point, we will, for instance, install ``netlib-scalapack`` with ``mpich``:
117117

118118
.. code-block:: console
119119
@@ -198,7 +198,7 @@ In the end your method should look like:
198198
spack_env.append_flags('LDFLAGS', spec['lapack'].libs.search_flags)
199199
spack_env.append_flags('LIBS', spec['lapack'].libs.link_flags)
200200
201-
At this point it's possible to proceed with the installation of ``elpa ^mpich``
201+
At this point, it's possible to proceed with the installation of ``elpa ^mpich``
202202

203203
------------------------------
204204
Retrieving Library Information
@@ -213,7 +213,7 @@ This section covers how to retrieve library information from dependencies and ho
213213
Accessing dependency libraries
214214
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
215215

216-
If you need to access the libraries of a dependency, you can do so via the ``libs`` property of the spec, for example in the ``arpack-ng`` package:
216+
If we need to access the libraries of a dependency, we can do so via the ``libs`` property of the spec, for example in the ``arpack-ng`` package:
217217

218218
.. code-block:: python
219219
@@ -229,13 +229,13 @@ If you need to access the libraries of a dependency, you can do so via the ``lib
229229
Note that ``arpack-ng`` is querying virtual dependencies, which Spack automatically resolves to the installed implementation (e.g. ``openblas`` for ``blas``).
230230

231231
We've started work on a package for ``armadillo``.
232-
You should open it, read through the comment that starts with ``# TUTORIAL:`` and complete the ``cmake_args`` section:
232+
We should open it, read through the comment that starts with ``# TUTORIAL:`` and complete the ``cmake_args`` section:
233233

234234
.. code-block:: console
235235
236236
root@advanced-packaging-tutorial:/# spack edit armadillo
237237
238-
If you followed the instructions in the package, when you are finished your ``cmake_args`` method should look like:
238+
If we followed the instructions in the package, when we are finished our ``cmake_args`` method should look like:
239239

240240
.. code-block:: python
241241
@@ -256,10 +256,10 @@ If you followed the instructions in the package, when you are finished your ``cm
256256
'-DDETECT_HDF5={0}'.format('ON' if '+hdf5' in spec else 'OFF')
257257
]
258258
259-
As you can see, getting the list of libraries that your dependencies provide is as easy as accessing the their ``libs`` attribute.
260-
Furthermore, the interface remains the same whether you are querying regular or virtual dependencies.
259+
As we can see, getting the list of libraries that our dependencies provide is as easy as accessing the their ``libs`` attribute.
260+
Furthermore, the interface remains the same whether we are querying regular or virtual dependencies.
261261

262-
At this point you can complete the installation of ``armadillo`` using ``openblas`` as a LAPACK provider (``armadillo ^openblas ^mpich``):
262+
At this point, we can complete the installation of ``armadillo`` using ``openblas`` as a LAPACK provider (``armadillo ^openblas ^mpich``):
263263

264264
.. code-block:: console
265265
@@ -280,7 +280,7 @@ At this point you can complete the installation of ``armadillo`` using ``openbla
280280
Fetch: 0.01s. Build: 3.96s. Total: 3.98s.
281281
[+] /usr/local/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/armadillo-8.100.1-n2eojtazxbku6g4l5izucwwgnpwz77r4
282282
283-
Hopefully the installation went fine and the code we added expanded to the right list of semicolon separated libraries (you are encouraged to open ``armadillo``'s build logs to double check).
283+
Hopefully the installation went fine and the code we added expanded to the right list of semicolon separated libraries (we are encouraged to open ``armadillo``'s build logs to double check).
284284

285285
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
286286
Providing libraries to dependents
@@ -338,7 +338,7 @@ Let's edit it:
338338
root@advanced-packaging-tutorial:/# spack edit netlib-lapack
339339
340340
and follow the instructions in the ``# TUTORIAL:`` comment as before.
341-
What we need to implement is:
341+
What we will implement is:
342342

343343
.. code-block:: python
344344
@@ -353,7 +353,7 @@ i.e., a property that returns the correct list of libraries for the LAPACK inter
353353

354354
We use the name ``lapack_libs`` rather than ``libs`` because ``netlib-lapack`` can also provide ``blas``, and when it does it is provided as a separate library file.
355355
Using this name ensures that when dependents ask for ``lapack`` libraries, ``netlib-lapack`` will retrieve only the libraries associated with the ``lapack`` interface.
356-
Now we can finally install ``armadillo ^netlib-lapack ^mpich``:
356+
Now we will finally install ``armadillo ^netlib-lapack ^mpich``:
357357

358358
.. code-block:: console
359359
@@ -379,8 +379,8 @@ Attach attributes to other packages
379379
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
380380

381381
Build tools also usually provide a set of executables that can be used when another package is being installed.
382-
Spack gives you the opportunity to monkey-patch dependent modules and attach attributes to them.
383-
This helps make the packager's experience as similar as possible to what would have been the manual installation of the same package.
382+
Spack gives us the opportunity to monkey-patch dependent modules and attach attributes to them.
383+
This helps make our experience as similar as possible to what would have been the manual installation of the same package.
384384

385385
An example here is the ``automake`` package, which overrides
386386
:py:func:`setup_dependent_package <spack.package.PackageBase.setup_dependent_package>`:
@@ -431,13 +431,13 @@ Let's look at an example and try to install ``netcdf ^mpich``:
431431
/usr/local/var/spack/stage/netcdf-4.4.1.1-gk2xxhbqijnrdwicawawcll4t3c7dvoj/netcdf-4.4.1.1/spack-build-out.txt
432432
433433
We can see from the error that ``netcdf`` needs to know how to link the *high-level interface* of ``hdf5``, and thus passes the extra parameter ``hl`` after the request to retrieve it.
434-
Clearly the implementation in the ``hdf5`` package is not complete, and we need to fix it:
434+
Clearly the implementation in the ``hdf5`` package is not complete, and we will fix it:
435435

436436
.. code-block:: console
437437
438438
root@advanced-packaging-tutorial:/# spack edit hdf5
439439
440-
If you followed the instructions correctly, the code added to the ``lib`` property should be similar to:
440+
If we followed the instructions correctly, the code added to the ``lib`` property should be similar to:
441441

442442
.. code-block:: python
443443
:emphasize-lines: 1
@@ -451,7 +451,7 @@ If you followed the instructions correctly, the code added to the ``lib`` proper
451451
)
452452
453453
where we highlighted the line retrieving the extra parameters.
454-
Now we can successfully complete the installation of ``netcdf ^mpich``:
454+
Now we will successfully complete the installation of ``netcdf ^mpich``:
455455

456456
.. code-block:: console
457457

tutorial_basics.rst

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
Basic Installation Tutorial
99
=========================================
1010

11-
This tutorial will guide you through the process of installing software using Spack.
12-
We will first cover the ``spack install`` command, focusing on the power of the spec syntax and the flexibility it gives to users.
11+
This tutorial will guide us through the process of installing software using Spack.
12+
First, we will cover the ``spack install`` command, focusing on the power of the spec syntax and the flexibility it gives to users.
1313
We will also cover the ``spack find`` command for viewing installed packages and the ``spack uninstall`` command for uninstalling them.
1414
Finally, we will touch on how Spack manages compilers, especially as it relates to using Spack-built compilers within Spack.
1515
We will include full output from all of the commands demonstrated, although we will frequently call attention to only small portions of that output (or merely to the fact that it succeeded).
@@ -35,7 +35,7 @@ Spack has some nice command-line integration tools, so instead of simply prepend
3535
3636
$ . share/spack/setup-env.sh
3737
38-
You're good to go!
38+
We're good to go!
3939

4040
-----------------
4141
What is in Spack?
@@ -72,20 +72,20 @@ Let's go ahead and install ``gmake``,
7272
.. literalinclude:: outputs/basics/gmake.out
7373
:language: console
7474

75-
You will see Spack installed ``gmake``, ``gcc-runtime``, and ``glibc``.
75+
We will see Spack installed ``gmake``, ``gcc-runtime``, and ``glibc``.
7676
The ``glibc`` and ``gcc-runtime`` packages are automatically tracked by Spack to manage consistency requirements among compiler runtimes.
7777
They do not represent separate software builds from source, but are records of the system's compiler runtime components Spack used for the install.
7878
For the rest of this section, we will ignore these components and focus on the packages explicitly installed.
7979

8080
Spack can install software either from source or from a binary cache.
8181
Packages in the binary cache are signed with GPG for security.
82-
For the tutorial we have prepared a binary cache so you don't have to wait on slow compilation from source.
82+
For the tutorial we have prepared a binary cache so we don't have to wait on slow compilation from source.
8383
To be able to install from the binary cache, we will need to configure Spack with the location of the binary cache and trust the GPG key that the binary cache was signed with.
8484

8585
.. literalinclude:: outputs/basics/mirror.out
8686
:language: console
8787

88-
You'll learn more about configuring Spack later in the tutorial, but for now you will be able to install the rest of the packages in the tutorial from a binary cache using the same ``spack install`` command.
88+
We'll learn more about configuring Spack later in the tutorial, but for now we will be able to install the rest of the packages in the tutorial from a binary cache using the same ``spack install`` command.
8989
By default this will install the binary cached version if it exists and fall back on installing from source if it does not.
9090

9191
Spack's "spec" syntax is the interface by which we can request specific configurations of a package.
@@ -97,7 +97,7 @@ The ``%`` sigil is used to specify compilers.
9797
Note that this installation is located separately from the previous one.
9898
We will discuss this in more detail later, but this is part of what allows Spack to support many versions of software packages.
9999

100-
You can check for particular versions before requesting them.
100+
We can check for particular versions before requesting them.
101101
We will use the ``spack versions`` command to see the available versions, and then install a different version of ``zlib-ng``.
102102

103103
.. literalinclude:: outputs/basics/versions-zlib.out
@@ -149,8 +149,8 @@ Anything we could specify about the top-level package, we can also specify about
149149
Packages can also be referred to from the command line by their package hash.
150150
Using the ``spack find -lf`` command earlier we saw that the hash of our optimized installation of zlib-ng (``cflags="-O3"``) began with ``umrbkwv``.
151151
We can now explicitly build with that package without typing the entire spec, by using the ``/`` sigil to refer to it by hash.
152-
As with other tools like Git, you do not need to specify an *entire* hash on the command line.
153-
You can specify just enough digits to identify a hash uniquely.
152+
As with other tools like Git, we do not need to specify an *entire* hash on the command line.
153+
We can specify just enough digits to identify a hash uniquely.
154154
If a hash prefix is ambiguous (i.e., two or more installed packages share the prefix) then Spack will report an error.
155155

156156
.. literalinclude:: outputs/basics/tcl-zlib-hash.out
@@ -164,7 +164,7 @@ Note that each package has a top-level entry, even if it also appears as a depen
164164

165165
Let's move on to slightly more complicated packages.
166166
HDF5 is a good example of a more complicated package, with an MPI dependency.
167-
If we install it with default settings it will build with OpenMPI.
167+
If we install it with default settings, it will build with OpenMPI.
168168

169169
.. literalinclude:: outputs/basics/hdf5.out
170170
:language: console
@@ -192,7 +192,7 @@ The partial spec ``^mpi@3`` can be satisfied by any of several MPI implementatio
192192
.. literalinclude:: outputs/basics/hdf5-hl-mpi.out
193193
:language: console
194194

195-
We'll do a quick check in on what we have installed so far.
195+
Let's do a quick check in on what we have installed so far.
196196

197197
.. literalinclude:: outputs/basics/find-ldf-2.out
198198
:language: console
@@ -234,7 +234,7 @@ Again, the ``spack graph`` command shows the full DAG of the dependency informat
234234
.. literalinclude:: outputs/basics/graph-trilinos.out
235235
:language: console
236236

237-
You can control how the output is displayed with a number of options.
237+
We can control how the output is displayed with a number of options.
238238

239239
The ASCII output from ``spack graph`` can be difficult to parse for complicated packages.
240240
The output can be changed to the Graphviz ``.dot`` format using the ``--dot`` flag.
@@ -250,7 +250,7 @@ Uninstalling Packages
250250
---------------------
251251

252252
Earlier we installed many configurations each of zlib-ng and Tcl.
253-
Now we will go through and uninstall some of those packages that we didn't really need.
253+
Now, let's go through and uninstall some of those packages that we didn't really need.
254254

255255
.. literalinclude:: outputs/basics/find-d-tcl.out
256256
:language: console
@@ -269,8 +269,8 @@ We can uninstall packages by spec using the same syntax as install.
269269
We can also uninstall packages by referring only to their hash.
270270

271271
We can use either the ``--force`` (or ``-f``) flag or the ``--dependents`` (or ``-R``) flag to remove packages that are required by another installed package.
272-
Use ``--force`` to remove just the specified package, leaving dependents broken.
273-
Use ``--dependents`` to remove the specified package and all of its dependents.
272+
Let's use ``--force`` to remove just the specified package, leaving dependents broken.
273+
Let's use ``--dependents`` to remove the specified package and all of its dependents.
274274

275275
.. literalinclude:: outputs/basics/uninstall-needed.out
276276
:language: console
@@ -291,7 +291,7 @@ The ``--all`` (or ``-a``) flag can be used to uninstall all packages matching an
291291
Advanced ``spack find`` Usage
292292
-----------------------------
293293

294-
We will go over some additional uses for the ``spack find`` command not already covered in the :ref:`basics-tutorial-install` and
294+
Let's go over some additional uses for the ``spack find`` command not already covered in the :ref:`basics-tutorial-install` and
295295
:ref:`basics-tutorial-uninstall` sections.
296296

297297
The ``spack find`` command can accept what we call "anonymous specs." These are expressions in spec syntax that do not contain a package name.
@@ -321,7 +321,7 @@ The ``spack compilers`` command is an alias for ``spack compiler list``.
321321
:language: console
322322

323323
The compilers are maintained in a YAML file (``compilers.yaml``).
324-
Later in the tutorial, you will learn how to configure compilers by hand for special cases.
324+
Later in the tutorial, we will learn how to configure compilers by hand for special cases.
325325
Spack also has tools to add compilers, and compilers built with Spack can be added to the configuration.
326326

327327
.. literalinclude:: outputs/basics/install-gcc-12.1.0.out
@@ -332,7 +332,7 @@ Spack also has tools to add compilers, and compilers built with Spack can be add
332332

333333
We can add GCC to Spack as an available compiler using the ``spack compiler add`` command.
334334
This will allow future packages to build with ``gcc@12.3.0``.
335-
To avoid having to copy and paste GCC's path, we can use ``spack location -i`` to get the installation prefix.
335+
To avoid having to copy and paste GCC's path, we will use ``spack location -i`` to get the installation prefix.
336336

337337
.. literalinclude:: outputs/basics/compiler-add-location.out
338338
:language: console

0 commit comments

Comments
 (0)