Skip to content
Snippets Groups Projects
Forked from Platform / Development / swh-loader-core
81 commits behind the upstream repository.
Antoine Lambert's avatar
Antoine Lambert authored
opam 2.1 stores packages metadata in a tarball instead of having its
content unpacked as with previous opam versions, so the workaround of
walking the inner directories of the opam root to get all versions of
a package is no longer working with opam 2.1.

So use proper way to get all versions of a package by calling the
following command:

$ opam show --root <opam_root> <package> --field all-versions

The previous issue reported in TODO comment was due to the fact that
new opam repositories were not added in the default opam switch, this
is now fixed and packages metadata from all repositories can be displayed
using the opam show command.
7bfc2c59
History

Software Heritage - Loader foundations

The Software Heritage Loader Core is a low-level loading utilities and helpers used by :term:`loaders <loader>`.

The main entry points are classes: - :class:`swh.loader.core.loader.BaseLoader` for VCS loaders (e.g. svn) - :class:`swh.loader.core.loader.DVCSLoader` for DVCS loaders (e.g. git, ...) - :class:`swh.loader.core.loader.ContentLoader` for Content loader - :class:`swh.loader.core.loader.DirectoryLoader` for Directory loader - :class:`swh.loader.package.loader.PackageLoader` for Package loaders (e.g. PyPI, Npm, ...) - ...

Package loaders

This package also implements many package loaders directly, out of convenience, as they usually are quite similar and each fits in a single file.

They all roughly follow these steps, explained in the :py:meth:`swh.loader.package.loader.PackageLoader.load` documentation. See the :ref:`package-loader-tutorial` for details.

VCS loaders

Unlike package loaders, VCS loaders remain in separate packages, as they often need more advanced conversions and very VCS-specific operations.

This usually involves getting the branches of a repository and recursively loading revisions in the history (and directory trees in these revisions), until a known revision is found