Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions outputs/scripting/spack-python-concrete.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
>>> from spack.concretize import concretize_one
>>> zlib_concrete = spack.concretize.concretize_one(zlib)
>>> zlib_concrete.concrete
True
Expand Down
84 changes: 38 additions & 46 deletions outputs/scripting/spack-python-db-query-help.out
Original file line number Diff line number Diff line change
@@ -1,46 +1,38 @@
>>> import spack.store
>>> help(spack.store.STORE.db.query)
Help on method query in module spack.database:

query(*args, **kwargs) method of spack.database.Database instance
Query the Spack database including all upstream databases.

Args:
query_spec: queries iterate through specs in the database and
return those that satisfy the supplied ``query_spec``. If
query_spec is `any`, This will match all specs in the
database. If it is a spec, we'll evaluate
``spec.satisfies(query_spec)``

known (bool or any, optional): Specs that are "known" are those
for which Spack can locate a ``package.py`` file -- i.e.,
Spack "knows" how to install them. Specs that are unknown may
represent packages that existed in a previous version of
Spack, but have since either changed their name or
been removed

installed (bool or any, or InstallStatus or iterable of
InstallStatus, optional): if ``True``, includes only installed
specs in the search; if ``False`` only missing specs, and if
``any``, all specs in database. If an InstallStatus or iterable
of InstallStatus, returns specs whose install status
(installed, deprecated, or missing) matches (one of) the
InstallStatus. (default: True)

explicit (bool or any, optional): A spec that was installed
following a specific user request is marked as explicit. If
instead it was pulled-in as a dependency of a user requested
spec it's considered implicit.

start_date (datetime, optional): filters the query discarding
specs that have been installed before ``start_date``.

end_date (datetime, optional): filters the query discarding
specs that have been installed after ``end_date``.

hashes (container): list or set of hashes that we can use to
restrict the search

Returns:
list of specs that match the query
(END)
>>> import spack.store
>>> help(spack.store.STORE.db.query)
Help on method query in module spack.database:

query(query_spec: Union[str, ForwardRef('spack.spec.Spec'), NoneType] = None, *, predicate_fn: Optional[Callable[[spack.database.InstallRecord], bool]] = None, installed: Union[bool, spack.enums.InstallRecordStatus] = True, explicit: Optional[bool] = None, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, in_buildcache: Optional[bool] = None, hashes: Optional[List[str]] = None, origin: Optional[str] = None, install_tree: str = 'all') -> List[ForwardRef('spack.spec.Spec')] method of spack.database.Database instance
Queries the Spack database including all upstream databases.

Args:
query_spec: if query_spec is ``None``, match all specs in the database.
If it is a spec, return all specs matching ``spec.satisfies(query_spec)``.

predicate_fn: optional predicate taking an InstallRecord as argument, and returning
whether that record is selected for the query. It can be used to craft criteria
that need some data for selection not provided by the Database itself.

installed: if ``True``, includes only installed specs in the search. If ``False`` only
missing specs, and if ``any``, all specs in database. If an InstallStatus or
iterable of InstallStatus, returns specs whose install status matches at least
one of the InstallStatus.

explicit: a spec that was installed following a specific user request is marked as
explicit. If instead it was pulled-in as a dependency of a user requested spec
it's considered implicit.

start_date: if set considers only specs installed from the starting date.

end_date: if set considers only specs installed until the ending date.

in_buildcache: specs that are marked in this database as part of an associated binary
cache are ``in_buildcache``. All other specs are not. This field is used for
querying mirror indices. By default, it does not check this status.

hashes: list of hashes used to restrict the search

install_tree: query 'all' (default), 'local', 'upstream', or upstream path

origin: origin of the spec
(END)