Metadata-Version: 2.4
Name: swh.loader.git
Version: 2.14.3
Summary: Software Heritage git loader
Author-email: Software Heritage developers <swh-devel@inria.fr>
Project-URL: Homepage, https://gitlab.softwareheritage.org/swh/devel/swh-loader-git
Project-URL: Bug Reports, https://gitlab.softwareheritage.org/swh/devel/swh-loader-git/-/issues
Project-URL: Funding, https://www.softwareheritage.org/donate
Project-URL: Documentation, https://docs.softwareheritage.org/devel/swh-loader-git/
Project-URL: Source, https://gitlab.softwareheritage.org/swh/devel/swh-loader-git.git
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
License-File: AUTHORS
Requires-Dist: dulwich>=0.25.0
Requires-Dist: retrying
Requires-Dist: click
Requires-Dist: swh.core>=4.5.3
Requires-Dist: swh.loader.core>=5.24.0
Requires-Dist: swh.model>=8.1.0
Requires-Dist: swh.scheduler>=0.0.39
Requires-Dist: swh.storage>=2.4.1
Provides-Extra: testing
Requires-Dist: dulwich>=0.25.0; extra == "testing"
Requires-Dist: retrying; extra == "testing"
Requires-Dist: click; extra == "testing"
Requires-Dist: swh.core>=4.5.3; extra == "testing"
Requires-Dist: swh.loader.core>=5.24.0; extra == "testing"
Requires-Dist: swh.model>=8.1.0; extra == "testing"
Requires-Dist: swh.scheduler>=0.0.39; extra == "testing"
Requires-Dist: swh.storage>=2.4.1; extra == "testing"
Requires-Dist: celery-types; extra == "testing"
Requires-Dist: pytest>=8.1; extra == "testing"
Requires-Dist: pytest-mock; extra == "testing"
Requires-Dist: requests_mock; extra == "testing"
Requires-Dist: swh.loader.core[testing]>=5.24.0; extra == "testing"
Requires-Dist: swh.scheduler[pytest]>=3.1.0; extra == "testing"
Requires-Dist: swh.storage[pytest]>=3.1.0; extra == "testing"
Requires-Dist: types-Deprecated; extra == "testing"
Requires-Dist: types-urllib3; extra == "testing"
Dynamic: license-file

swh-loader-git
==============

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-retrying
-   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:

.. code-block:: shell

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

or "git_disk".

## Configuration sample

/tmp/git.yml:

.. code-block:: yaml

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