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

NaturalHistoryMuseum / data-importer / #5

08 Jul 2025 02:50PM UTC coverage: 79.237%. First build
#5

push

coveralls-python

web-flow
merge: #55 from dev

21 of 43 new or added lines in 7 files covered. (48.84%)

1267 of 1599 relevant lines covered (79.24%)

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
×
NEW
4
from dataimporter.importer import use_importer
×
5
from dataimporter.lib.config import Config
×
6

7

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:
×
22
        console.log("[red]gbif_username and gbif_password must be set")
×
23

NEW
24
    with use_importer(config) as importer:
×
25
        console.log("Queuing new GBIF changes")
×
26
        importer.queue_gbif_changes()
×
27
        console.log("Updating specimen data in MongoDB")
×
28
        importer.add_to_mongo("specimen")
×
29
        console.log("Syncing specimen changes to Elasticsearch")
×
30
        importer.sync_to_elasticsearch("specimen")
×
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