bioversions 0.5.513__py3-none-any.whl → 0.5.515__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bioversions/resources/update.py +4 -3
- bioversions/sources/dgi.py +1 -1
- bioversions/sources/hgnc.py +12 -12
- bioversions/version.py +1 -1
- {bioversions-0.5.513.dist-info → bioversions-0.5.515.dist-info}/METADATA +1 -1
- {bioversions-0.5.513.dist-info → bioversions-0.5.515.dist-info}/RECORD +10 -10
- {bioversions-0.5.513.dist-info → bioversions-0.5.515.dist-info}/LICENSE +0 -0
- {bioversions-0.5.513.dist-info → bioversions-0.5.515.dist-info}/WHEEL +0 -0
- {bioversions-0.5.513.dist-info → bioversions-0.5.515.dist-info}/entry_points.txt +0 -0
- {bioversions-0.5.513.dist-info → bioversions-0.5.515.dist-info}/top_level.txt +0 -0
bioversions/resources/update.py
CHANGED
@@ -7,6 +7,7 @@ import sys
|
|
7
7
|
from datetime import datetime
|
8
8
|
|
9
9
|
import click
|
10
|
+
from tqdm import tqdm
|
10
11
|
from tqdm.contrib.logging import logging_redirect_tqdm
|
11
12
|
|
12
13
|
from bioversions.resources import (
|
@@ -83,7 +84,7 @@ def _update(force: bool):
|
|
83
84
|
v["releases"].append(append_dict)
|
84
85
|
|
85
86
|
if not changes and not force:
|
86
|
-
click.
|
87
|
+
tqdm.write(click.style(f"No changes to {EXPORT_PATH}", fg="yellow", bold=True))
|
87
88
|
else:
|
88
89
|
rv_database = sorted(versions.values(), key=lambda version: version["name"].lower())
|
89
90
|
rv = {
|
@@ -94,7 +95,7 @@ def _update(force: bool):
|
|
94
95
|
},
|
95
96
|
"database": rv_database,
|
96
97
|
}
|
97
|
-
click.
|
98
|
+
tqdm.write(click.style(f"Writing new {EXPORT_PATH}", fg="green", bold=True))
|
98
99
|
write_export(rv)
|
99
100
|
write_versions(rv)
|
100
101
|
|
@@ -106,7 +107,7 @@ def _log_update(bv) -> None:
|
|
106
107
|
if bv.homepage:
|
107
108
|
text += f". See {bv.homepage}"
|
108
109
|
|
109
|
-
click.
|
110
|
+
tqdm.write(click.style(text, fg="green", bold=True))
|
110
111
|
|
111
112
|
try:
|
112
113
|
from .. import slack_client
|
bioversions/sources/dgi.py
CHANGED
@@ -21,7 +21,7 @@ class DGIGetter(Getter):
|
|
21
21
|
def get(self):
|
22
22
|
"""Get the latest DGI version number."""
|
23
23
|
res = requests.get(GITHUB_PAGE)
|
24
|
-
soup = bs4.BeautifulSoup(res.content)
|
24
|
+
soup = bs4.BeautifulSoup(res.content, features="html.parser")
|
25
25
|
time_tag = soup.find("relative-time")
|
26
26
|
if time_tag is None:
|
27
27
|
raise ValueError
|
bioversions/sources/hgnc.py
CHANGED
@@ -2,9 +2,12 @@
|
|
2
2
|
|
3
3
|
"""A getter for HGNC."""
|
4
4
|
|
5
|
+
import datetime
|
5
6
|
import logging
|
6
7
|
|
7
|
-
|
8
|
+
import requests
|
9
|
+
|
10
|
+
from bioversions.utils import Getter, VersionType
|
8
11
|
|
9
12
|
__all__ = [
|
10
13
|
"HGNCGetter",
|
@@ -12,7 +15,7 @@ __all__ = [
|
|
12
15
|
|
13
16
|
logger = logging.getLogger(__name__)
|
14
17
|
|
15
|
-
PATH = "https://
|
18
|
+
PATH = "https://storage.googleapis.com/public-download-files/hgnc/archive/archive/monthly/json/"
|
16
19
|
PREFIX = "hgnc_complete_set_"
|
17
20
|
SUFFIX = ".json"
|
18
21
|
|
@@ -22,21 +25,18 @@ class HGNCGetter(Getter):
|
|
22
25
|
|
23
26
|
bioregistry_id = "hgnc"
|
24
27
|
name = "HGNC"
|
25
|
-
homepage_fmt =
|
26
|
-
"http://ftp.ebi.ac.uk/pub/databases/genenames/hgnc/"
|
27
|
-
"archive/monthly/json/hgnc_complete_set_{version}.json"
|
28
|
-
)
|
28
|
+
homepage_fmt = PATH + "hgnc_complete_set_{version}.json"
|
29
29
|
|
30
30
|
version_type = VersionType.date
|
31
31
|
|
32
32
|
def get(self) -> str:
|
33
33
|
"""Get the latest HGNC version number."""
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
)
|
34
|
+
today = datetime.date.today()
|
35
|
+
maybe = today.strftime("%Y-%m-01")
|
36
|
+
res = requests.head(self.homepage_fmt.format(version=maybe))
|
37
|
+
if res.status_code == 200:
|
38
|
+
return maybe
|
39
|
+
raise ValueError(f"HGNC hasn't posted new data for this month under version {maybe}")
|
40
40
|
|
41
41
|
|
42
42
|
if __name__ == "__main__":
|
bioversions/version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: bioversions
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.515
|
4
4
|
Summary: What's the current version for each biological database?
|
5
5
|
Home-page: https://github.com/biopragmatics/bioversions
|
6
6
|
Download-URL: https://github.com/biopragmatics/bioversions/releases
|
@@ -6,10 +6,10 @@ bioversions/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
bioversions/slack_client.py,sha256=42kl4TbjtXimVRULcBfe8i3pdJLScEPvJr1vw72tv-4,1271
|
7
7
|
bioversions/twitter_client.py,sha256=TQhsdp6avlzoZLoZlndJlwsYhIYI-uabehZJ1W1mNuY,1353
|
8
8
|
bioversions/utils.py,sha256=6ygaoe5rRArtrCXHrVygpl2cD7Otrbs4D1rADmpXDrA,10425
|
9
|
-
bioversions/version.py,sha256=
|
9
|
+
bioversions/version.py,sha256=_E_8fw62Kf7pKiZp1flQoSoF8HfwxM4LM3UJRz0DCIg,645
|
10
10
|
bioversions/wsgi.py,sha256=Z1HYFmnrWKNGwHq4R4DRfBuLzAEAAZ5UfHjvJUpnDfs,826
|
11
11
|
bioversions/resources/__init__.py,sha256=0E1yGGT5SztSGEa30Tai4wCUki4nqfynqCSNAvjzEOk,1173
|
12
|
-
bioversions/resources/update.py,sha256=
|
12
|
+
bioversions/resources/update.py,sha256=CfvtoUJ3Ai_--Y5DHBx2zZ4vfIGgDsQaE4asb2kp3bg,3273
|
13
13
|
bioversions/sources/__init__.py,sha256=gxSQDIbe0bURXXEvQmD-7QWOEa8gCubr62CSUH-nbNQ,5962
|
14
14
|
bioversions/sources/antibodyregistry.py,sha256=VIgnYZ_Jtcx0u19X60Ee7qTqDgbub5C2EBtK_Bz7Twc,705
|
15
15
|
bioversions/sources/bigg.py,sha256=qPBpX8qap8MlnlcntWO30jIgWD4c9RV57cKp_EZhnE0,672
|
@@ -22,7 +22,7 @@ bioversions/sources/civic.py,sha256=1uGaTy2ipZ2Nm5Nn_Ojv6biJfLr3sB3djc6AmOT3sO0,
|
|
22
22
|
bioversions/sources/complexportal.py,sha256=SPJ3ryJNtXwvArtHaeeWCSau6uVBJTDxPX6XPvKmDlY,696
|
23
23
|
bioversions/sources/daily.py,sha256=mq8NLnhRRDjTzwGQl9LxCBiO6BSWyGOJcfyg7qqNsno,281
|
24
24
|
bioversions/sources/depmap.py,sha256=EjpScMRwqItvitso57ah3f53bkWbTK0bjLWOBr4ym1E,654
|
25
|
-
bioversions/sources/dgi.py,sha256=
|
25
|
+
bioversions/sources/dgi.py,sha256=WbiOPH2nJwxSQrQHNnkAskJBSB6KzVNrHVKV2ZFDDo4,953
|
26
26
|
bioversions/sources/disgenet.py,sha256=iRd1K2o_m8xSlJrWoSD8-plnTS1nO0Ur_OCCRD2V9u8,752
|
27
27
|
bioversions/sources/drugbank.py,sha256=ZZ2yw34bRcLFT6n_Ygn1daGWk_oVx4A7ovUKSM_EQek,1005
|
28
28
|
bioversions/sources/drugcentral.py,sha256=EWYatYEqZbwjH-0lUXYEfe5P5VNHsNJAtNDlSP_OuZM,1117
|
@@ -30,7 +30,7 @@ bioversions/sources/ensembl.py,sha256=BHssnbJMI-jONB8W1mKERYsccRmIETI0NeWLnTTiDd
|
|
30
30
|
bioversions/sources/expasy.py,sha256=EQXDz1LJSc0J-BE5Gy5tI-T4e6j4D5jid6c6ajzQjG8,830
|
31
31
|
bioversions/sources/flybase.py,sha256=5S0gI8tULx3sfNVy2O4grvyqIUwI4teS9S6khDh-JzQ,779
|
32
32
|
bioversions/sources/guidetopharmacology.py,sha256=B3W5I01v1a0OuvPJB-LHoSYvuJBN_cpXulnGrBs009o,1377
|
33
|
-
bioversions/sources/hgnc.py,sha256=
|
33
|
+
bioversions/sources/hgnc.py,sha256=yFQz_Yb0BvevNaaP6Jmh4Lh0YWw-VoTGBKVVnGDe_RE,1001
|
34
34
|
bioversions/sources/homologene.py,sha256=_f6SQRXe67t1jqQ6HjQIEOGApPUHLlfHMZojChumWzc,647
|
35
35
|
bioversions/sources/icd10.py,sha256=cfiJcueTr6Z1dIzdP68QeCPlnJhr3Yd3U97TZplR1JI,716
|
36
36
|
bioversions/sources/icd11.py,sha256=EsdUrPxio_VIv9tkPoauxozKY-fdjwesbb5Kh_bijU0,736
|
@@ -69,9 +69,9 @@ bioversions/sources/uniprot.py,sha256=_rootal_mrESkiXJh3udfr1UGrlzP7CQQIMsa35tyc
|
|
69
69
|
bioversions/sources/unversioned.py,sha256=noHxGmy9cpVv5xegMHouBF6oCbW6CP1jpOeCVdE7Eak,78
|
70
70
|
bioversions/sources/wikipathways.py,sha256=HTva8vsXRQWU6bia83Et4vveo-QhzJS6dDWeu9Syc6c,823
|
71
71
|
bioversions/sources/zfin.py,sha256=D7csziZ3UsW8dncm6XKA0t3x6XB4cFbG9PTYcT-g2bg,708
|
72
|
-
bioversions-0.5.
|
73
|
-
bioversions-0.5.
|
74
|
-
bioversions-0.5.
|
75
|
-
bioversions-0.5.
|
76
|
-
bioversions-0.5.
|
77
|
-
bioversions-0.5.
|
72
|
+
bioversions-0.5.515.dist-info/LICENSE,sha256=GzLA83qaovFgoZWRYwaAmY-lkHZyDySJHU-YKE9NdVs,1076
|
73
|
+
bioversions-0.5.515.dist-info/METADATA,sha256=9kcRGrh07zEMCbhEekpSkQSoJYYVLRBH1DT28DMNAL4,9434
|
74
|
+
bioversions-0.5.515.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
75
|
+
bioversions-0.5.515.dist-info/entry_points.txt,sha256=A3qrS-nvKNZPZWQbYlmsmiDTge524C4yR-arRJwdHls,53
|
76
|
+
bioversions-0.5.515.dist-info/top_level.txt,sha256=0QO2OEUMchj5GSlWEFi0cvUpsm4b_uwuuvr6uSEmfY0,12
|
77
|
+
bioversions-0.5.515.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|