• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

NaturalHistoryMuseum / data-importer / #12

07 Aug 2025 10:46AM UTC coverage: 79.133% (-0.1%) from 79.237%
#12

push

coveralls-python

web-flow
Merge dd79f4361 into edec251d1

196 of 294 new or added lines in 26 files covered. (66.67%)

5 existing lines in 2 files now uncovered.

1259 of 1591 relevant lines covered (79.13%)

0.79 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/dataimporter/cli/ext.py
1
import click
×
2

3
from dataimporter.cli.utils import console, with_config
×
4
from dataimporter.importer import use_importer
×
5
from dataimporter.lib.config import Config
×
6

7

NEW
8
@click.group('ext')
×
9
def ext_group():
×
10
    pass
×
11

12

13
@ext_group.command()
×
14
@with_config()
×
15
def gbif(config: Config):
×
16
    """
17
    Requests a new download of our specimen dataset from GBIF, downloads this DwC-A, and
18
    queues any changes found in it, then ingests and indexes any changes that cascade
19
    from these GBIF records to their associated specimen records.
20
    """
21
    if not config.gbif_username or not config.gbif_password:
×
NEW
22
        console.log('[red]gbif_username and gbif_password must be set')
×
23

24
    with use_importer(config) as importer:
×
NEW
25
        console.log('Queuing new GBIF changes')
×
26
        importer.queue_gbif_changes()
×
NEW
27
        console.log('Updating specimen data in MongoDB')
×
NEW
28
        importer.add_to_mongo('specimen')
×
NEW
29
        console.log('Syncing specimen changes to Elasticsearch')
×
NEW
30
        importer.sync_to_elasticsearch('specimen')
×
NEW
31
        console.log('Done')
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc