Skip to main content

Software Heritage lister

Project description

Collection of listers for source code distribution places like development forges, FOSS distributions, package managers, etc. Each lister is in charge to enumerate the software origins (e.g., VCS, packages, etc.) available at a source code distribution place.

A lister is a component from the Software Heritage stack aims to produce listings of software origins and their urls hosted on various public developer platforms or package managers. As these operations are quite similar, this package provides a set of Python modules abstracting common software origins listing behaviors.

It also provides several lister implementations, contained in the Python swh.lister.* modules. See this documentation for the list of supported listers.

Dependencies

All required python dependencies can be found in the requirements*.txt files located at the root of the repository.

In order to be able to run all the listers (and thus execute the tests), some tools must be available on your system, namely:

  • opam

  • tar

  • psql

On a Debian-like system, you may use:

Local deployment

Lister configuration

Each lister implemented so far by Software Heritage (bitbucket, cgit, cran, debian, gitea, github, gitlab, gnu, golang, launchpad, npm, packagist, phabricator, pypi, tuleap, maven, forgejo) must be configured by following the instructions below (please note that you have to replace <lister_name> by one of the lister names introduced above).

Preparation steps

  1. mkdir ~/.config/swh/

  2. create configuration file ~/.config/swh/listers.yml

Configuration file sample

Minimalistic configuration shared by all listers to add in file ~/.config/swh/listers.yml:

scheduler:
  cls: 'remote'
  args:
    url: 'http://localhost:5008/'

credentials: {}

Note: This expects scheduler (5008) service to run locally

Executing a lister

Once configured, a lister can be executed by using the swh CLI tool with the following options and commands:

$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister <lister_name> [lister_parameters]

Examples:

$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister bitbucket

$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister cran

$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister gitea url=https://demo.gitea.com/api/v1/

$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister forgejo url=https://try.next.forgejo.org/

$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister gitlab url=https://salsa.debian.org/api/v4/

$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister npm

$ swh --log-level DEBUG lister -C ~/.config/swh/listers.yml run --lister pypi

Licensing

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See top-level LICENSE file for the full text of the GNU General Public License along with this program.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swh_lister-7.3.1.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swh_lister-7.3.1-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file swh_lister-7.3.1.tar.gz.

File metadata

  • Download URL: swh_lister-7.3.1.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.12

File hashes

Hashes for swh_lister-7.3.1.tar.gz
Algorithm Hash digest
SHA256 65273f553ff5748baf8c6f2d69d450305f06e1ea038bd8a309fc9f23626e1782
MD5 237a28af914f01f6d151a44c5cae530d
BLAKE2b-256 4ecbb6509fd508ea2421ec4d745eca715e88e6b5a3788999475140c9f3628050

See more details on using hashes here.

File details

Details for the file swh_lister-7.3.1-py3-none-any.whl.

File metadata

  • Download URL: swh_lister-7.3.1-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.12

File hashes

Hashes for swh_lister-7.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a6dc3638a26222df613fc5a71f40ffb55d7f1a0467d57c622fcf71413e333776
MD5 d883be867f92cd7b8e75e88bb4bd888b
BLAKE2b-256 cc81febeada35b6619bbfc7c91f7db0f4a37d71ec736d4f27255eb4b6d6ffd5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page