Metadata-Version: 2.4
Name: dbnomics_fetcher_ops
Version: 0.7.0
Summary: Manage DBnomics fetchers
Author: Christophe Benz
Author-email: Christophe Benz <christophe.benz@nomics.world>
License-Expression: AGPL-3.0-or-later
License-File: LICENSE.md
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Dist: daiquiri>=3.2.5.1
Requires-Dist: dbnomics-toolbox>=0.9.0
Requires-Dist: pydantic>=2,<3
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: python-gitlab>=5.0.0
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: requests>=2.32.3
Requires-Dist: typer>=0.12.5
Requires-Dist: validators>=0.34.0
Requires-Dist: xdg>=6.0.0
Requires-Python: >=3.12
Project-URL: Homepage, https://git.nomics.world/dbnomics/dbnomics-fetcher-ops
Project-URL: Bug Tracker, https://git.nomics.world/dbnomics/dbnomics-fetcher-ops/-/issues
Description-Content-Type: text/markdown

# DBnomics fetcher ops

Manage DBnomics fetchers: list, configure and run pipelines.

## Install

```bash
pip install dbnomics-fetcher-ops
```

## Usage

### Configure a fetcher

The configure command needs write privileges. Create a GitLab [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) having the `api` scope, and pass it using the `--gitlab-private-token` option or the `GITLAB_PRIVATE_TOKEN` environment variable in `~/.config/dbnomics/dbnomics-fetchers.env`.

```bash
dbnomics-fetchers -v configure scsmich --dry-run
# If everything seems OK, remove the --dry-run flag:
dbnomics-fetchers -v configure scsmich
```

### List fetchers

```bash
dbnomics-fetchers -v list
```

### Run fetcher pipelines

```bash
# Replace PROVIDER_SLUG by the real value:
dbnomics-fetchers -v run --provider-slug PROVIDER_SLUG

# To run a pipeline for each fetcher:
dbnomics-fetchers -v list --slug | xargs -I {} dbnomics-fetchers -v run --provider-slug {}
```

## Development

Using [uv](https://docs.astral.sh/uv/) is highly recommended.

```bash
git clone https://git.nomics.world/dbnomics/dbnomics-fetcher-ops.git
cd dbnomics-fetcher-ops
uv sync
. .venv/bin/activate
cp .env.example .env
```

Use with:

```bash
dbnomics-fetchers COMMAND
```
