Skip to content

Commit

Permalink
Merge 0b5aebc into d82d021
Browse files Browse the repository at this point in the history
  • Loading branch information
niconoe committed May 26, 2020
2 parents d82d021 + 0b5aebc commit 1352c35
Show file tree
Hide file tree
Showing 22 changed files with 222 additions and 242 deletions.
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import sys
import os
import shlex

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down
1 change: 1 addition & 0 deletions docs/contributors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Contributors
* `Jan Legind <https://github.com/jlegind>`_
* `Stijn Van Hoey <https://github.com/stijnvanhoey>`_
* `Peter Desmet <https://github.com/peterdesmet>`_
* `Nicolas Noé <https://github.com/niconoe>`_
1 change: 0 additions & 1 deletion pygbif/occurrences/download.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import re
import csv
import json
import datetime
Expand Down
4 changes: 0 additions & 4 deletions pygbif/occurrences/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,3 @@ def get_fragment(key, **kwargs):
url = gbif_baseurl + "occurrence/" + str(key) + "/fragment"
out = gbif_GET(url, {}, **kwargs)
return out


def get_url():
"http://www.gbif.org/occurrence/" + x
1 change: 0 additions & 1 deletion pygbif/occurrences/search.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import re
from ..gbifutils import *


Expand Down
321 changes: 160 additions & 161 deletions pygbif/registry/datasets.py

Large diffs are not rendered by default.

118 changes: 59 additions & 59 deletions pygbif/species/name_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,65 +16,65 @@ def name_usage(
**kwargs
):
"""
Lookup details for specific names in all taxonomies in GBIF.
:param key: [fixnum] A GBIF key for a taxon
:param name: [str] Filters by a case insensitive, canonical namestring,
e.g. 'Puma concolor'
:param data: [str] The type of data to get. Default: ``all``. Options: ``all``,
``verbatim``, ``name``, ``parents``, ``children``,
``related``, ``synonyms``, ``descriptions``, ``distributions``, ``media``,
``references``, ``speciesProfiles``, ``vernacularNames``, ``typeSpecimens``,
``root``
:param language: [str] Language, default is english
:param datasetKey: [str] Filters by the dataset's key (a uuid)
:param uuid: [str] A uuid for a dataset. Should give exact same results as datasetKey.
:param sourceId: [fixnum] Filters by the source identifier.
:param rank: [str] Taxonomic rank. Filters by taxonomic rank as one of:
``CLASS``, ``CULTIVAR``, ``CULTIVAR_GROUP``, ``DOMAIN``, ``FAMILY``, ``FORM``, ``GENUS``, ``INFORMAL``,
``INFRAGENERIC_NAME``, ``INFRAORDER``, ``INFRASPECIFIC_NAME``, ``INFRASUBSPECIFIC_NAME``,
``KINGDOM``, ``ORDER``, ``PHYLUM``, ``SECTION``, ``SERIES``, ``SPECIES``, ``STRAIN``, ``SUBCLASS``, ``SUBFAMILY``,
``SUBFORM``, ``SUBGENUS``, ``SUBKINGDOM``, ``SUBORDER``, ``SUBPHYLUM``, ``SUBSECTION``, ``SUBSERIES``,
``SUBSPECIES``, ``SUBTRIBE``, ``SUBVARIETY``, ``SUPERCLASS``, ``SUPERFAMILY``, ``SUPERORDER``,
``SUPERPHYLUM``, ``SUPRAGENERIC_NAME``, ``TRIBE``, ``UNRANKED``, ``VARIETY``
:param shortname: [str] A short name..need more info on this?
:param limit: [fixnum] Number of records to return. Default: ``100``. Maximum: ``1000``. (optional)
:param offset: [fixnum] Record number to start at. (optional)
References: http://www.gbif.org/developer/species#nameUsages
Usage::
from pygbif import species
species.name_usage(key=1)
# Name usage for a taxonomic name
species.name_usage(name='Puma', rank="GENUS")
# All name usages
species.name_usage()
# References for a name usage
species.name_usage(key=2435099, data='references')
# Species profiles, descriptions
species.name_usage(key=3119195, data='speciesProfiles')
species.name_usage(key=3119195, data='descriptions')
species.name_usage(key=2435099, data='children')
# Vernacular names for a name usage
species.name_usage(key=3119195, data='vernacularNames')
# Limit number of results returned
species.name_usage(key=3119195, data='vernacularNames', limit=3)
# Search for names by dataset with datasetKey parameter
species.name_usage(datasetKey="d7dddbf4-2cf0-4f39-9b2a-bb099caae36c")
# Search for a particular language
species.name_usage(key=3119195, language="FRENCH", data='vernacularNames')
"""
Lookup details for specific names in all taxonomies in GBIF.
:param key: [fixnum] A GBIF key for a taxon
:param name: [str] Filters by a case insensitive, canonical namestring,
e.g. 'Puma concolor'
:param data: [str] The type of data to get. Default: ``all``. Options: ``all``,
``verbatim``, ``name``, ``parents``, ``children``,
``related``, ``synonyms``, ``descriptions``, ``distributions``, ``media``,
``references``, ``speciesProfiles``, ``vernacularNames``, ``typeSpecimens``,
``root``
:param language: [str] Language, default is english
:param datasetKey: [str] Filters by the dataset's key (a uuid)
:param uuid: [str] A uuid for a dataset. Should give exact same results as datasetKey.
:param sourceId: [fixnum] Filters by the source identifier.
:param rank: [str] Taxonomic rank. Filters by taxonomic rank as one of:
``CLASS``, ``CULTIVAR``, ``CULTIVAR_GROUP``, ``DOMAIN``, ``FAMILY``, ``FORM``, ``GENUS``, ``INFORMAL``,
``INFRAGENERIC_NAME``, ``INFRAORDER``, ``INFRASPECIFIC_NAME``, ``INFRASUBSPECIFIC_NAME``,
``KINGDOM``, ``ORDER``, ``PHYLUM``, ``SECTION``, ``SERIES``, ``SPECIES``, ``STRAIN``, ``SUBCLASS``, ``SUBFAMILY``,
``SUBFORM``, ``SUBGENUS``, ``SUBKINGDOM``, ``SUBORDER``, ``SUBPHYLUM``, ``SUBSECTION``, ``SUBSERIES``,
``SUBSPECIES``, ``SUBTRIBE``, ``SUBVARIETY``, ``SUPERCLASS``, ``SUPERFAMILY``, ``SUPERORDER``,
``SUPERPHYLUM``, ``SUPRAGENERIC_NAME``, ``TRIBE``, ``UNRANKED``, ``VARIETY``
:param shortname: [str] A short name..need more info on this?
:param limit: [fixnum] Number of records to return. Default: ``100``. Maximum: ``1000``. (optional)
:param offset: [fixnum] Record number to start at. (optional)
References: http://www.gbif.org/developer/species#nameUsages
Usage::
from pygbif import species
species.name_usage(key=1)
# Name usage for a taxonomic name
species.name_usage(name='Puma', rank="GENUS")
# All name usages
species.name_usage()
# References for a name usage
species.name_usage(key=2435099, data='references')
# Species profiles, descriptions
species.name_usage(key=3119195, data='speciesProfiles')
species.name_usage(key=3119195, data='descriptions')
species.name_usage(key=2435099, data='children')
# Vernacular names for a name usage
species.name_usage(key=3119195, data='vernacularNames')
# Limit number of results returned
species.name_usage(key=3119195, data='vernacularNames', limit=3)
# Search for names by dataset with datasetKey parameter
species.name_usage(datasetKey="d7dddbf4-2cf0-4f39-9b2a-bb099caae36c")
# Search for a particular language
species.name_usage(key=3119195, language="FRENCH", data='vernacularNames')
"""
args = {
"language": language,
"name": name,
Expand Down
1 change: 0 additions & 1 deletion test/test-maps-map.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Tests for maps module - maps"""
from nose.tools import *
import unittest
import os
import vcr
import requests
import matplotlib
Expand Down
1 change: 0 additions & 1 deletion test/test-occurrences-count.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for occurrences module - count methods"""
import os
import vcr
from pygbif import occurrences

Expand Down
1 change: 0 additions & 1 deletion test/test-occurrences-download_get.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for occurrences module - download_get methods"""
import os
from pygbif import occurrences as occ


Expand Down
1 change: 0 additions & 1 deletion test/test-occurrences-get.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for occurrences module - get methods"""
import os
import vcr
from pygbif import occurrences

Expand Down
1 change: 0 additions & 1 deletion test/test-occurrences-search.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for occurrences module - search methods"""
import os
import vcr
from pygbif import occurrences

Expand Down
1 change: 0 additions & 1 deletion test/test-registry-dataset_metrics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for registry module - dataset_metrics method"""
import os
import vcr
from pygbif import registry

Expand Down
1 change: 0 additions & 1 deletion test/test-registry-datasets.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for registry module - datasets method"""
import os
import vcr
from pygbif import registry

Expand Down
2 changes: 1 addition & 1 deletion test/test-registry-installations.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Tests for registry module - installations methods"""
import os
import vcr

from pygbif import registry


Expand Down
1 change: 0 additions & 1 deletion test/test-registry-networks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for registry module - networks"""
import os
import vcr
from pygbif import registry

Expand Down
2 changes: 1 addition & 1 deletion test/test-registry-nodes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Tests for registry module - nodes methods"""
import os
import vcr

from pygbif import registry


Expand Down
1 change: 0 additions & 1 deletion test/test-registry-organizations.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for registry module - organizations"""
import os
import vcr
from pygbif import registry

Expand Down
1 change: 0 additions & 1 deletion test/test-species-name_backbone.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for species module - name_backbone methods"""
import os
import vcr
from pygbif import species

Expand Down
1 change: 0 additions & 1 deletion test/test-species-name_lookup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for species module - name_lookup methods"""
import os
import vcr
from pygbif import species

Expand Down
1 change: 0 additions & 1 deletion test/test-species-name_suggest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for species module - name_suggest methods"""
import os
import vcr
import re
from pygbif import species
Expand Down
1 change: 0 additions & 1 deletion test/test-species-name_usage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests for species module - name_usage methods"""
import os
import vcr
from pygbif import species

Expand Down

0 comments on commit 1352c35

Please sign in to comment.