Skip to content

Commit

Permalink
Document use of the maintainers field (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart authored and alalazo committed Nov 15, 2019
1 parent 295c209 commit 841a750
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 6 deletions.
4 changes: 4 additions & 0 deletions tutorial/examples/0.package.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class Mpileaks(Package):
homepage = "http://www.example.com"
url = "https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"

# FIXME: Add a list of GitHub accounts to
# notify when the package is updated.
# maintainers = ['github_user1', 'github_user2']

version('1.0', sha256='2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825')

# FIXME: Add dependencies if required.
Expand Down
2 changes: 2 additions & 0 deletions tutorial/examples/1.package.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class Mpileaks(Package):
homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"

maintainers = ['adamjstewart']

version('1.0', sha256='2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825')

# FIXME: Add dependencies if required.
Expand Down
2 changes: 2 additions & 0 deletions tutorial/examples/2.package.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class Mpileaks(Package):
homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"

maintainers = ['adamjstewart']

version('1.0', sha256='2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825')

depends_on('mpi')
Expand Down
2 changes: 2 additions & 0 deletions tutorial/examples/3.package.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class Mpileaks(Package):
homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"

maintainers = ['adamjstewart']

version('1.0', sha256='2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825')

depends_on('mpi')
Expand Down
2 changes: 2 additions & 0 deletions tutorial/examples/4.package.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class Mpileaks(Package):
homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"

maintainers = ['adamjstewart']

version('1.0', sha256='2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825')

depends_on('mpi')
Expand Down
2 changes: 2 additions & 0 deletions tutorial/examples/5.package.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class Mpileaks(Package):
homepage = "https://github.com/LLNL/mpileaks"
url = "https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz"

maintainers = ['adamjstewart']

version('1.0', sha256='2e34cc4505556d1c1f085758e26f2f8eea0972db9382f051b2dcfb1d7d9e1825')

variant('stackstart', values=int, default=0,
Expand Down
21 changes: 15 additions & 6 deletions tutorial_packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,18 @@ We can bring the ``package.py`` file back into our ``EDITOR`` with the
$ spack edit mpileaks
Let's remove some of the ``FIXME`` comments, add links to the mpileaks
homepage, and document what mpileaks does. I'm also going to cut out the
Copyright clause at this point to keep this tutorial document shorter,
but you shouldn't do that normally. The results of these changes can be
found in ``$SPACK_ROOT/lib/spack/docs/tutorial/examples/1.package.py``
Let's remove some of the ``FIXME`` comments, add a link to the mpileaks
homepage, and document what mpileaks does. Let's also add a maintainer
to the package. The ``maintainers`` field is a comma-separated list of
GitHub accounts of users who want to be notified when a change is made
to a package. This is useful for developers who maintain a Spack package
for their own software, and for users who rely on a piece of software
and want to ensure that the package doesn't break.

I'm also going to cut out the Copyright clause at this point to keep
this tutorial document shorter, but you shouldn't do that normally.
The results of these changes can be found in
``$SPACK_ROOT/lib/spack/docs/tutorial/examples/1.package.py``
and are displayed below. Make these changes to your ``package.py``:

.. literalinclude:: tutorial/examples/1.package.py
Expand All @@ -167,6 +174,8 @@ allow Spack to provide some documentation on this package to other users:
Homepage: https://github.com/LLNL/mpileaks
Maintainers: @adamjstewart
Tags:
None
Expand Down Expand Up @@ -505,7 +514,7 @@ powerful class for querying information about what we're building. For
example, you could use the spec to query information about how a
package's dependencies were built, or what compiler was being used, or
what version of a package is being installed. Full documentation can be
found in the `Packaging Guide <https://spack.readthedocs.io/en/latest/packaging_guide.html#packaging-guide>`_,
found in the `Packaging Guide <https://spack.readthedocs.io/en/latest/packaging_guide.html#packaging-guide>`_,
but here's some quick snippets with common queries:

- Am I building ``mpileaks`` version ``1.1`` or greater?
Expand Down

0 comments on commit 841a750

Please sign in to comment.