Changeset View
Changeset View
Standalone View
Standalone View
README.md
- This file was moved from README.
swh-loader-git | |||||
============== | |||||
The Software Heritage Git Loader is a tool and a library to walk a local | 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 | Git repository and inject into the SWH dataset all contained files that | ||||
weren't known before. | weren't known before. | ||||
License | License | ||||
======= | ------- | ||||
This program is free software: you can redistribute it and/or modify it | 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 | 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 | Free Software Foundation, either version 3 of the License, or (at your | ||||
option) any later version. | option) any later version. | ||||
This program is distributed in the hope that it will be useful, but | This program is distributed in the hope that it will be useful, but | ||||
WITHOUT ANY WARRANTY; without even the implied warranty of | WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||||
Public License for more details. | Public License for more details. | ||||
See top-level LICENSE file for the full text of the GNU General Public | See top-level LICENSE file for the full text of the GNU General Public | ||||
License along with this program. | License along with this program. | ||||
Dependencies | Dependencies | ||||
============ | ------------ | ||||
Runtime | ### Runtime | ||||
------- | |||||
- python3 | - python3 | ||||
- python3-dulwich | - python3-dulwich | ||||
- python3-retrying | - python3-retrying | ||||
- python3-swh.core | - python3-swh.core | ||||
- python3-swh.model | - python3-swh.model | ||||
- python3-swh.storage | - python3-swh.storage | ||||
- python3-swh.scheduler | - python3-swh.scheduler | ||||
Test | ### Test | ||||
---- | |||||
- python3-nose | - python3-nose | ||||
Requirements | Requirements | ||||
============ | ------------ | ||||
- implementation language, Python3 | - implementation language, Python3 | ||||
- coding guidelines: conform to PEP8 | - coding guidelines: conform to PEP8 | ||||
- Git access: via dulwich | - Git access: via dulwich | ||||
Configuration | Configuration | ||||
============= | ------------- | ||||
You can run the loader or the updater directly by calling: | You can run the loader or the updater directly by calling: | ||||
``` | ``` | ||||
python3 -m swh.loader.git.{loader,updater} | python3 -m swh.loader.git.{loader,updater} | ||||
``` | ``` | ||||
## Location | ### Location | ||||
Both tools expect a configuration file. | Both tools expect a configuration file. | ||||
Either one of the following location: | Either one of the following location: | ||||
- /etc/softwareheritage/ | - /etc/softwareheritage/ | ||||
- ~/.config/swh/ | - ~/.config/swh/ | ||||
- ~/.swh/ | - ~/.swh/ | ||||
Note: Will call that location $SWH_CONFIG_PATH | Note: Will call that location $SWH_CONFIG_PATH | ||||
## Configuration sample | ### Configuration sample | ||||
$SWH_CONFIG_PATH/loader/git-{loader,updater}.yml: | $SWH_CONFIG_PATH/loader/git-{loader,updater}.yml: | ||||
``` | ``` | ||||
storage: | storage: | ||||
cls: remote | cls: remote | ||||
args: | args: | ||||
url: http://localhost:5002/ | url: http://localhost:5002/ | ||||
``` | ``` |