Skip to content

Commit 983548f

Browse files
committed
restore dynamically generated output files
1 parent 3a31fde commit 983548f

5 files changed

Lines changed: 63 additions & 49 deletions

File tree

outputs/scripting/spack-python-abstract.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
>>> s.version
66
Traceback (most recent call last):
77
File "<console>", line 1, in <module>
8-
File "/home/spack/spack/lib/spack/spack/spec.py", line 3657, in version
9-
raise spack.error.SpecError("Spec version is not concrete: " + str(self))
10-
spack.error.SpecError: Spec version is not concrete: zlib arch=None-None-x86_64_v3
8+
File "/home/spack/spack/lib/spack/spack/spec.py", line 3166, in version
9+
raise SpecError("Spec version is not concrete: " + str(self))
10+
SpecError: Spec version is not concrete: zlib arch=None-None-x86_64_v3
1111
>>> s.versions
1212
[:]
1313
>>> str(s.architecture)
14-
'None-None-x86_64_v3'
14+
None-None-x86_64_v3
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
>>> s = spack.concretize.concretize_one(s)
1+
>>> s.concretize()
22
>>> s.concrete
33
True
44
>>> s.version
55
Version('1.3.1')
66
>>> s.versions
77
[Version('1.3.1')]
88
>>> str(s.architecture)
9-
'linux-ubuntu22.04-x86_64_v3'
9+
linux-ubuntu22.04-x86_64_v3

outputs/scripting/spack-python-db-query-exclude.out

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@
33
>>> result = filter(lambda spec: not spec.satisfies('^mpich'), gcc_specs)
44
>>> import spack.cmd
55
>>> spack.cmd.display_specs(result)
6-
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
7-
automake@1.16.5 bzip2@1.0.8 expat@2.7.1 gettext@0.23.1 krb5@1.21.3 libffi@3.4.8 libmd@1.1.0 libunistring@1.2 m4@1.4.19 openssh@9.9p1 perl@5.40.0 python@3.13.2 tar@1.35 zlib-ng@2.2.4
8-
berkeley-db@18.1.40 curl@8.11.1 findutils@4.10.0 git@2.48.1 libbsd@0.12.2 libiconv@1.18 libsigsegv@2.14 libxcrypt@4.4.38 ncurses@6.5 openssl@3.4.1 pigz@2.8 readline@8.2 util-linux-uuid@2.41 zstd@1.5.7
9-
bison@3.8.2 diffutils@3.10 gdbm@1.23 gmake@4.4.1 libedit@3.1-20240808 libidn2@2.3.7 libtool@2.4.7 libxml2@2.13.5 nghttp2@1.65.0 pcre2@10.44 pkgconf@2.3.0 sqlite@3.46.0 xz@5.6.3
10-
11-
-- linux-ubuntu22.04-x86_64_v3 / no compiler --------------------
12-
gcc-runtime@11.4.0
6+
-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 -------------------------
7+
autoconf@2.72 gdbm@1.23 libsigsegv@2.14 perl@5.38.0
8+
automake@1.16.5 gettext@0.22.5 libtool@2.4.7 pigz@2.8
9+
berkeley-db@18.1.40 glibc@2.35 libxcrypt@4.4.35 pkgconf@2.2.0
10+
bison@3.8.2 gmake@4.4.1 libxml2@2.10.3 pmix@5.0.1
11+
bzip2@1.0.8 hdf5@1.14.3 m4@1.4.19 readline@8.2
12+
ca-certificates-mozilla@2023-05-30 hwloc@2.9.1 ncurses@6.5 tar@1.34
13+
cmake@3.27.9 krb5@1.20.1 nghttp2@1.57.0 util-macros@1.19.3
14+
curl@8.7.1 libedit@3.1-20230828 numactl@2.0.14 xz@5.4.6
15+
diffutils@3.10 libevent@2.1.12 openmpi@5.0.3 zlib-ng@2.1.6
16+
findutils@4.9.0 libiconv@1.17 openssh@9.7p1 zstd@1.5.6
17+
gcc-runtime@11.4.0 libpciaccess@0.17 openssl@3.3.0
Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,46 @@
11
>>> import spack.store
22
>>> help(spack.store.STORE.db.query)
3-
Help on method query in module spack.database:
4-
5-
query(*args, **kwargs) method of spack.database.Database instance
6-
Queries the Spack database including all upstream databases.
7-
8-
Args:
9-
query_spec: if query_spec is ``None``, match all specs in the database.
10-
If it is a spec, return all specs matching ``spec.satisfies(query_spec)``.
11-
12-
predicate_fn: optional predicate taking an InstallRecord as argument, and returning
13-
whether that record is selected for the query. It can be used to craft criteria
14-
that need some data for selection not provided by the Database itself.
15-
16-
installed: if ``True``, includes only installed specs in the search. If ``False`` only
17-
missing specs, and if ``any``, all specs in database. If an InstallStatus or
18-
iterable of InstallStatus, returns specs whose install status matches at least
19-
one of the InstallStatus.
20-
21-
explicit: a spec that was installed following a specific user request is marked as
22-
explicit. If instead it was pulled-in as a dependency of a user requested spec
23-
it's considered implicit.
24-
25-
start_date: if set considers only specs installed from the starting date.
26-
27-
end_date: if set considers only specs installed until the ending date.
28-
29-
in_buildcache: specs that are marked in this database as part of an associated binary
30-
cache are ``in_buildcache``. All other specs are not. This field is used for
31-
querying mirror indices. By default, it does not check this status.
32-
33-
hashes: list of hashes used to restrict the search
34-
35-
install_tree: query 'all' (default), 'local', 'upstream', or upstream path
36-
37-
origin: origin of the spec
3+
Help on method query in module spack.database:
4+
5+
query(*args, **kwargs) method of spack.database.Database instance
6+
Query the Spack database including all upstream databases.
7+
8+
Args:
9+
query_spec: queries iterate through specs in the database and
10+
return those that satisfy the supplied ``query_spec``. If
11+
query_spec is `any`, This will match all specs in the
12+
database. If it is a spec, we'll evaluate
13+
``spec.satisfies(query_spec)``
14+
15+
known (bool or any, optional): Specs that are "known" are those
16+
for which Spack can locate a ``package.py`` file -- i.e.,
17+
Spack "knows" how to install them. Specs that are unknown may
18+
represent packages that existed in a previous version of
19+
Spack, but have since either changed their name or
20+
been removed
21+
22+
installed (bool or any, or InstallStatus or iterable of
23+
InstallStatus, optional): if ``True``, includes only installed
24+
specs in the search; if ``False`` only missing specs, and if
25+
``any``, all specs in database. If an InstallStatus or iterable
26+
of InstallStatus, returns specs whose install status
27+
(installed, deprecated, or missing) matches (one of) the
28+
InstallStatus. (default: True)
29+
30+
explicit (bool or any, optional): A spec that was installed
31+
following a specific user request is marked as explicit. If
32+
instead it was pulled-in as a dependency of a user requested
33+
spec it's considered implicit.
34+
35+
start_date (datetime, optional): filters the query discarding
36+
specs that have been installed before ``start_date``.
37+
38+
end_date (datetime, optional): filters the query discarding
39+
specs that have been installed after ``end_date``.
40+
41+
hashes (container): list or set of hashes that we can use to
42+
restrict the search
43+
44+
Returns:
45+
list of specs that match the query
46+
(END)

tutorial_scripting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Let's see the documentation available for ``query()`` using Python's built-in ``
127127

128128
.. literalinclude:: outputs/scripting/spack-python-db-query-help.out
129129
:language: console
130-
:emphasize-lines: 1-2,9-10
130+
:emphasize-lines: 1-2,9-13
131131

132132
We'll primarily make use of the ``query_spec`` argument.
133133

0 commit comments

Comments
 (0)