Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/__init__.py
Show All 22 Lines | |||||
LISTERS = { | LISTERS = { | ||||
entry_point.name.split(".", 1)[1]: entry_point | entry_point.name.split(".", 1)[1]: entry_point | ||||
for entry_point in pkg_resources.iter_entry_points("swh.workers") | for entry_point in pkg_resources.iter_entry_points("swh.workers") | ||||
if entry_point.name.split(".", 1)[0] == "lister" | if entry_point.name.split(".", 1)[0] == "lister" | ||||
} | } | ||||
SUPPORTED_LISTERS = list(LISTERS) | SUPPORTED_LISTERS = list(LISTERS) | ||||
TARBALL_EXTENSIONS = [ | |||||
vlorentz: please us docstrings to comment public constants | |||||
"crate", | |||||
"gem", | |||||
"jar", | |||||
"zip", | |||||
"tar", | |||||
"gz", | |||||
"tgz", | |||||
"tbz", | |||||
"bz2", | |||||
"bzip2", | |||||
"lzma", | |||||
"lz", | |||||
Done Inline Actionslist of exposed tarballs extensions [1] [1] T3781#90383 ardumont: list of exposed tarballs extensions [1]
[1] T3781#90383 | |||||
Done Inline Actionsexposed in the guix/nixpkgs manifests. ardumont: exposed in the guix/nixpkgs manifests. | |||||
Done Inline Actionssure. fwiw, i've noticed, it's missing crate and gem as well. ardumont: sure.
fwiw, i've noticed, it's missing crate and gem as well. | |||||
"txz", | |||||
"xz", | |||||
"z", | |||||
"Z", | |||||
"7z", | |||||
"zst", | |||||
] | |||||
"""Tarball recognition pattern""" | |||||
def get_lister(lister_name, db_url=None, **conf): | def get_lister(lister_name, db_url=None, **conf): | ||||
"""Instantiate a lister given its name. | """Instantiate a lister given its name. | ||||
Args: | Args: | ||||
lister_name (str): Lister's name | lister_name (str): Lister's name | ||||
conf (dict): Configuration dict (lister db cnx, policy, priority...) | conf (dict): Configuration dict (lister db cnx, policy, priority...) | ||||
Show All 23 Lines |
please us docstrings to comment public constants