Changeset View
Changeset View
Standalone View
Standalone View
README.md
Show All 9 Lines | |||||
following Python modules: | following Python modules: | ||||
- `swh.lister.bitbucket` | - `swh.lister.bitbucket` | ||||
- `swh.lister.debian` | - `swh.lister.debian` | ||||
- `swh.lister.github` | - `swh.lister.github` | ||||
- `swh.lister.gitlab` | - `swh.lister.gitlab` | ||||
- `swh.lister.pypi` | - `swh.lister.pypi` | ||||
- `swh.lister.npm` | - `swh.lister.npm` | ||||
- `swh.lister.phabricator` | |||||
Dependencies | Dependencies | ||||
------------ | ------------ | ||||
All required dependencies can be found in the `requirements*.txt` files located | All required dependencies can be found in the `requirements*.txt` files located | ||||
at the root of the repository. | at the root of the repository. | ||||
Local deployment | Local deployment | ||||
▲ Show 20 Lines • Show All 133 Lines • ▼ Show 20 Lines | |||||
```lang=python | ```lang=python | ||||
import logging | import logging | ||||
from swh.lister.npm.tasks import npm_lister | from swh.lister.npm.tasks import npm_lister | ||||
logging.basicConfig(level=logging.DEBUG) | logging.basicConfig(level=logging.DEBUG) | ||||
npm_lister() | npm_lister() | ||||
``` | ``` | ||||
## lister-phabricator | |||||
Once configured, you can execute a Phabricator lister using the following instructions in a `python3` script: | |||||
```lang=python | |||||
import logging | |||||
from swh.lister.phabricator.tasks import incremental_phabricator_lister | |||||
logging.basicConfig(level=logging.DEBUG) | |||||
incremental_phabricator_lister(forge_url='https://forge.softwareheritage.org', api_token='') | |||||
anlambert: You should write `api_token='XXXX'` in order to specify that parameter is mandatory | |||||
``` | |||||
Licensing | Licensing | ||||
--------- | --------- | ||||
This program is free software: you can redistribute it and/or modify it under | 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 | 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 | Foundation, either version 3 of the License, or (at your option) any later | ||||
version. | version. | ||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY | 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 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||||
PARTICULAR PURPOSE. See the GNU General Public License for more details. | 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 | See top-level LICENSE file for the full text of the GNU General Public License | ||||
along with this program. | along with this program. | ||||
No newline at end of file | No newline at end of file | ||||
Done Inline ActionsThe config file should be named lister_phabricator.yml. My bad here I should have updated the README in rDLSdac7777cd6630a4b39eeb884b09badfcd732312d I will submit a diff to fix outdated stuffs in the README anlambert: The config file should be named `lister_phabricator.yml`.
My bad here I should have updated… | |||||
Done Inline ActionsThat configuration is also totally outdated, it should rather be: storage: cls: 'remote' args: url: 'http://localhost:5002/' scheduler: cls: 'remote' args: url: 'http://localhost:5008/' lister: cls: 'local' args: db: 'postgresql:///lister-phabricator' I also do not think that we need to cache responses, considering the number of hosted repositories on a Phabricator instance I will update the other outdated listers configuration in the README in the diff I will submit. anlambert: That configuration is also totally outdated, it should rather be:
```lang=yml
storage:
cls… | |||||
Done Inline Actionswould look better if the two instructions were on separate lines here anlambert: would look better if the two instructions were on separate lines here |
You should write api_token='XXXX' in order to specify that parameter is mandatory