docs: Replace package list with packages.spack.io (#40251)

For a long time, the docs have generated a huge, static HTML package list. It has some
disadvantages:

* It's slow to load
* It's slow to build
* It's hard to search

We now have a nice website that can tell us about Spack packages, and it's searchable so
users can easily find the one or two packages out of 7400 that they're looking for. We
should link to this instead of including a static package list page in the docs.

- [x] Replace package list link with link to packages.spack.io
- [x] Remove `package_list.html` generation from `conf.py`.
- [x] Add a new section for "Links" to the docs.
- [x] Remove docstring notes from contribution guide (we haven't generated RST
      for package docstrings for a while)
- [x] Remove referencese to `package-list` from docs.
This commit is contained in:
Todd Gamblin 2023-09-30 20:36:22 -07:00 committed by GitHub
parent 08a9345fcc
commit 9e54134daf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 30 additions and 86 deletions

View file

@ -1,4 +1,3 @@
package_list.html
command_index.rst command_index.rst
spack*.rst spack*.rst
llnl*.rst llnl*.rst

View file

@ -45,7 +45,8 @@ Listing available packages
To install software with Spack, you need to know what software is To install software with Spack, you need to know what software is
available. You can see a list of available package names at the available. You can see a list of available package names at the
:ref:`package-list` webpage, or using the ``spack list`` command. `packages.spack.io <https://packages.spack.io>`_ website, or
using the ``spack list`` command.
.. _cmd-spack-list: .. _cmd-spack-list:
@ -60,7 +61,7 @@ can install:
:ellipsis: 10 :ellipsis: 10
There are thousands of them, so we've truncated the output above, but you There are thousands of them, so we've truncated the output above, but you
can find a :ref:`full list here <package-list>`. can find a `full list here <https://packages.spack.io>`_.
Packages are listed by name in alphabetical order. Packages are listed by name in alphabetical order.
A pattern to match with no wildcards, ``*`` or ``?``, A pattern to match with no wildcards, ``*`` or ``?``,
will be treated as though it started and ended with will be treated as though it started and ended with

View file

@ -25,8 +25,8 @@ use Spack to build packages with the tools.
The Spack Python class ``IntelOneapiPackage`` is a base class that is The Spack Python class ``IntelOneapiPackage`` is a base class that is
used by ``IntelOneapiCompilers``, ``IntelOneapiMkl``, used by ``IntelOneapiCompilers``, ``IntelOneapiMkl``,
``IntelOneapiTbb`` and other classes to implement the oneAPI ``IntelOneapiTbb`` and other classes to implement the oneAPI
packages. See the :ref:`package-list` for the full list of available packages. Search for ``oneAPI`` at `<packages.spack.io>`_ for the full
oneAPI packages or use:: list of available oneAPI packages, or use::
spack list -d oneAPI spack list -d oneAPI

View file

@ -48,9 +48,6 @@
os.environ["COLIFY_SIZE"] = "25x120" os.environ["COLIFY_SIZE"] = "25x120"
os.environ["COLUMNS"] = "120" os.environ["COLUMNS"] = "120"
# Generate full package list if needed
subprocess.call(["spack", "list", "--format=html", "--update=package_list.html"])
# Generate a command index if an update is needed # Generate a command index if an update is needed
subprocess.call( subprocess.call(
[ [

View file

@ -310,53 +310,11 @@ Once all of the dependencies are installed, you can try building the documentati
$ make clean $ make clean
$ make $ make
If you see any warning or error messages, you will have to correct those before If you see any warning or error messages, you will have to correct those before your PR
your PR is accepted. is accepted. If you are editing the documentation, you should be running the
documentation tests to make sure there are no errors. Documentation changes can result
If you are editing the documentation, you should obviously be running the in some obfuscated warning messages. If you don't understand what they mean, feel free
documentation tests. But even if you are simply adding a new package, your to ask when you submit your PR.
changes could cause the documentation tests to fail:
.. code-block:: console
package_list.rst:8745: WARNING: Block quote ends without a blank line; unexpected unindent.
At first, this error message will mean nothing to you, since you didn't edit
that file. Until you look at line 8745 of the file in question:
.. code-block:: rst
Description:
NetCDF is a set of software libraries and self-describing, machine-
independent data formats that support the creation, access, and sharing
of array-oriented scientific data.
Our documentation includes :ref:`a list of all Spack packages <package-list>`.
If you add a new package, its docstring is added to this page. The problem in
this case was that the docstring looked like:
.. code-block:: python
class Netcdf(Package):
"""
NetCDF is a set of software libraries and self-describing,
machine-independent data formats that support the creation,
access, and sharing of array-oriented scientific data.
"""
Docstrings cannot start with a newline character, or else Sphinx will complain.
Instead, they should look like:
.. code-block:: python
class Netcdf(Package):
"""NetCDF is a set of software libraries and self-describing,
machine-independent data formats that support the creation,
access, and sharing of array-oriented scientific data."""
Documentation changes can result in much more obfuscated warning messages.
If you don't understand what they mean, feel free to ask when you submit
your PR.
-------- --------
Coverage Coverage

View file

@ -54,9 +54,16 @@ or refer to the full manual below.
features features
getting_started getting_started
basic_usage basic_usage
Tutorial: Spack 101 <https://spack-tutorial.readthedocs.io>
replace_conda_homebrew replace_conda_homebrew
.. toctree::
:maxdepth: 2
:caption: Links
Tutorial (spack-tutorial.rtfd.io) <https://spack-tutorial.readthedocs.io>
Packages (packages.spack.io) <https://packages.spack.io>
Binaries (binaries.spack.io) <https://cache.spack.io>
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
:caption: Reference :caption: Reference
@ -72,7 +79,6 @@ or refer to the full manual below.
repositories repositories
binary_caches binary_caches
command_index command_index
package_list
chain chain
extensions extensions
pipelines pipelines

View file

@ -1,17 +0,0 @@
.. Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
Spack Project Developers. See the top-level COPYRIGHT file for details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
.. _package-list:
============
Package List
============
This is a list of things you can install using Spack. It is
automatically generated based on the packages in this Spack
version.
.. raw:: html
:file: package_list.html

View file

@ -4,7 +4,7 @@
SPDX-License-Identifier: (Apache-2.0 OR MIT) SPDX-License-Identifier: (Apache-2.0 OR MIT)
===================================== =====================================
Using Spack to Replace Homebrew/Conda Spack for Homebrew/Conda Users
===================================== =====================================
Spack is an incredibly powerful package manager, designed for supercomputers Spack is an incredibly powerful package manager, designed for supercomputers