Skip to main content

Software Heritage git loader

Project description

The Software Heritage Git Loader is a tool and a library to walk a local Git repository and inject into the SWH dataset all contained files that weren’t known before.

The main entry points are:

  • swh.loader.git.loader.GitLoader for the main loader which can ingest either local or remote git repository’s contents. This is the main implementation deployed in production.

  • swh.loader.git.from_disk.GitLoaderFromDisk which ingests only local git clone repository.

  • swh.loader.git.loader.GitLoaderFromArchive which ingests a git repository wrapped in an archive.

  • swh.loader.git.directory.GitCheckoutLoader which ingests a git tree at a specific commit, branch or tag.

License

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.

Dependencies

### Runtime

  • python3

  • python3-dulwich

  • python3-swh.core

  • python3-swh.model

  • python3-swh.storage

  • python3-swh.scheduler

### Test

  • python3-nose

Requirements

  • implementation language, Python3

  • coding guidelines: conform to PEP8

  • Git access: via dulwich

CLI Run

You can run the loader from a remote origin (loader) or from an origin on disk (from_disk) directly by calling:

swh loader -C <config-file> run git <git-repository-url>

or “git_disk”.

## Configuration sample

/tmp/git.yml:

storage:
  cls: remote
  args:
    url: http://localhost:5002/

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_loader_git-3.0.0.tar.gz (88.6 kB view details)

Uploaded Source

Built Distribution

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

swh_loader_git-3.0.0-py3-none-any.whl (83.6 kB view details)

Uploaded Python 3

File details

Details for the file swh_loader_git-3.0.0.tar.gz.

File metadata

  • Download URL: swh_loader_git-3.0.0.tar.gz
  • Upload date:
  • Size: 88.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.12

File hashes

Hashes for swh_loader_git-3.0.0.tar.gz
Algorithm Hash digest
SHA256 27f1accbf88a3f941d38a9ccbcbee134242396e4dd1109c9ef9c0b3739992e50
MD5 56f46d1a457fe1bdcf23fd84e37afa9d
BLAKE2b-256 c176ec9f9e5f1b4ce6accdeb9507f5053195086a01404cbfb426d94bf724d1d9

See more details on using hashes here.

File details

Details for the file swh_loader_git-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: swh_loader_git-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 83.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.12

File hashes

Hashes for swh_loader_git-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a182d6b49675089d78739a20a1e779a9d2eab97481f2041fdeb191a86b928160
MD5 5dd5fa166b55b4033a1bc8a89518aab0
BLAKE2b-256 432bdbc25d10859e8c56682b445e0654f2015ac9db810e0871b98a6163e7a13f

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