Skip to main content

Software Heritage lister

Project description

swh-lister

This 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, it provides a set of Python modules abstracting common software origins listing behaviors.

It also provides several lister implementations, contained in the following Python modules:

  • swh.lister.bitbucket
  • swh.lister.cgit
  • swh.lister.cran
  • swh.lister.debian
  • swh.lister.gitea
  • swh.lister.github
  • swh.lister.gitlab
  • swh.lister.gnu
  • swh.lister.launchpad
  • swh.lister.maven
  • swh.lister.npm
  • swh.lister.packagist
  • swh.lister.phabricator
  • swh.lister.pypi
  • swh.lister.tuleap

Dependencies

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

Local deployment

lister configuration

Each lister implemented so far by Software Heritage (bitbucket, cgit, cran, debian, gitea, github, gitlab, gnu, launchpad, npm, packagist, phabricator, pypi, tuleap, maven) must be configured by following the instructions below (please note that you have to replace <lister_name> by one of the lister name 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://codeberg.org/api/v1/

$ 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

This version

2.6.2

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-2.6.2.tar.gz (968.2 kB view details)

Uploaded Source

Built Distribution

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

swh.lister-2.6.2-py3-none-any.whl (929.2 kB view details)

Uploaded Python 3

File details

Details for the file swh.lister-2.6.2.tar.gz.

File metadata

  • Download URL: swh.lister-2.6.2.tar.gz
  • Upload date:
  • Size: 968.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for swh.lister-2.6.2.tar.gz
Algorithm Hash digest
SHA256 dfe89a0c7f66c506d7795b23e8ec5d4ac4bc049cd303b97c98417c8acde0baba
MD5 b48a8446ed178338389a60371f56c413
BLAKE2b-256 e2c09b0d48ddbae0e10905606bd43c5bd9c97b16c9547975f28d92512d60a18f

See more details on using hashes here.

File details

Details for the file swh.lister-2.6.2-py3-none-any.whl.

File metadata

  • Download URL: swh.lister-2.6.2-py3-none-any.whl
  • Upload date:
  • Size: 929.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for swh.lister-2.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 944dfe3fde56f0f7011377b62c04da7e7d32fa01bf437d2f817d093505f835b4
MD5 7e3e59cdddc30eded7ed6d960f6491fa
BLAKE2b-256 d635a7b00cd795fbb07c9a4b5af7666cdfcb69f0f59e305eea2d632ae9655698

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