Skip to main content

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.loader.GitLoaderFromArchive which ingests a git repository from 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/

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.1.0.tar.gz (96.9 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.1.0-py3-none-any.whl (96.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: swh_loader_git-3.1.0.tar.gz
  • Upload date:
  • Size: 96.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for swh_loader_git-3.1.0.tar.gz
Algorithm Hash digest
SHA256 5cb414685522995328be10b5db8c2e385e236b74f90c406827bc75410c2f5701
MD5 d6e5478e26c232162faf5c502e7a1e83
BLAKE2b-256 c0979143eb2b106dfe187001816bf50d9c03a609a94a0b3c422ef9315d8c36bf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swh_loader_git-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 96.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for swh_loader_git-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8795bc3c1b4762f7be329df8c1d50114863c0bec26f77aef5764a594468a6bd1
MD5 524b86f8751379c28335369888345188
BLAKE2b-256 d3c92f1d681f8df0cb90b127fd5b15944b96fc7444ac0b2d2ad8715a509e4b0e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.1.0

Supported by

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