Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iPPIDB
ippidb-web
Commits
233e3f39
Commit
233e3f39
authored
Mar 15, 2022
by
Bryan BRANCOTTE
Browse files
Merge branch 'provide-email-to-eutils' into 'master'
provide email as recommended by Bioservice See merge request
!37
parents
b82060f1
96e2613d
Pipeline
#77935
passed with stages
in 46 minutes and 57 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ippisite/ippidb/ws.py
View file @
233e3f39
...
...
@@ -9,6 +9,7 @@ import requests
from
bioservices.eutils
import
EUtils
from
bioservices.uniprot
import
UniProt
from
bs4
import
BeautifulSoup
from
django.conf
import
settings
from
requests.exceptions
import
ContentDecodingError
from
chembl_webresource_client.new_client
import
new_client
...
...
@@ -81,7 +82,7 @@ def get_pubmed_info(pmid: int) -> dict:
:return: publication metadata (title, journal name, publication year, authors list).
:rtype: dict
"""
eu
=
EUtils
()
eu
=
EUtils
(
email
=
settings
.
EUTILS_EMAIL
)
r
=
eu
.
EFetch
(
"pubmed"
,
pmid
,
retmode
=
"dict"
,
rettype
=
"abstract"
)
if
isinstance
(
r
,
int
):
raise
PubMedEntryNotFound
(
pmid
,
r
)
...
...
@@ -331,7 +332,7 @@ def get_taxonomy_info(taxonomy_id: str) -> dict:
:return: Taxon metadata (scientific name).
:rtype: dict
"""
eu
=
EUtils
()
eu
=
EUtils
(
email
=
settings
.
EUTILS_EMAIL
)
r
=
eu
.
EFetch
(
"taxonomy"
,
taxonomy_id
,
retmode
=
"dict"
)
scientific_name
=
r
[
"TaxaSet"
][
"Taxon"
][
"ScientificName"
]
return
{
"scientific_name"
:
scientific_name
}
...
...
ippisite/ippisite/settings.py
View file @
233e3f39
...
...
@@ -229,6 +229,9 @@ LABLINKS_RESOURCE_DESCRIPTION = (
)
LABLINKS_CONTACT_EMAIL
=
"ippidb@pasteur.fr"
# BioServices settings
EUTILS_EMAIL
=
"ippidb@pasteur.fr"
# MAINTENANCE SETTINGS
# if True the maintenance-mode will be activated
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment