bioversions 0.6.0__tar.gz → 0.6.1__tar.gz
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-0.6.0 → bioversions-0.6.1}/PKG-INFO +1 -1
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/_data/versions.yml +10 -2
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/failures.md +0 -40
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/img/has_release_url.svg +1 -1
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/img/version_date_types.svg +1 -1
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/img/version_types.svg +1 -1
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/source/conf.py +1 -1
- {bioversions-0.6.0 → bioversions-0.6.1}/pyproject.toml +2 -2
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/resources/versions.json +16 -2
- bioversions-0.6.1/src/bioversions/sources/hgnc.py +42 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/mesh.py +10 -3
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/version.py +1 -1
- bioversions-0.6.0/src/bioversions/sources/hgnc.py +0 -47
- {bioversions-0.6.0 → bioversions-0.6.1}/.cruft.json +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/.github/CODE_OF_CONDUCT.md +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/.github/CONTRIBUTING.md +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/.github/codecov.yml +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/.github/workflows/cruft.yml +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/.github/workflows/tests.yml +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/.github/workflows/update.yml +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/.gitignore +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/.readthedocs.yml +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/LICENSE +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/MANIFEST.in +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/README.md +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/_config.yml +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/_includes/footer.html +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/_includes/head.html +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/download.md +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/index.md +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/source/cli.rst +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/source/index.rst +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/source/installation.rst +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/source/logo.png +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/source/usage.rst +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/docs/summary.md +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/__init__.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/__main__.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/charts.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/cli.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/py.typed +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/resources/__init__.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/resources/update.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/slack_client.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/__init__.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/antibodyregistry.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/bigg.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/biogrid.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/cellosaurus.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/chebi.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/chembl.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/chemidplus.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/civic.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/complexportal.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/daily.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/depmap.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/dgi.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/disgenet.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/drugbank.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/drugcentral.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/ensembl.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/expasy.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/flybase.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/gtdb.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/guidetopharmacology.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/homologene.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/icd10.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/icd11.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/icf.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/intact.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/interpro.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/itis.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/kegg.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/mgi.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/mirbase.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/moalmanac.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/msigdb.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/ncit.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/npass.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/obo.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/ols.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/omim.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/oncotree.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/pathbank.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/pathwaycommons.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/pfam.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/pombase.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/pr.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/pubchem.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/reactome.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/rfam.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/rgd.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/rhea.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/rxnorm.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/sgd.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/slm.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/stringdb.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/umls.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/uniprot.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/unversioned.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/wikipathways.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/sources/zfin.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/templates/base.html +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/templates/home.html +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/twitter_client.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/utils.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/src/bioversions/wsgi.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/tests/test_bioversions.py +0 -0
- {bioversions-0.6.0 → bioversions-0.6.1}/tox.ini +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: bioversions
|
3
|
-
Version: 0.6.
|
3
|
+
Version: 0.6.1
|
4
4
|
Summary: Get the current version for biological databases
|
5
5
|
Project-URL: Bug Tracker, https://github.com/biopragmatics/bioversions/issues
|
6
6
|
Project-URL: Homepage, https://github.com/biopragmatics/bioversions
|
@@ -1,7 +1,7 @@
|
|
1
1
|
annotations:
|
2
2
|
author: runner
|
3
|
-
date: '2024-12-
|
4
|
-
revision:
|
3
|
+
date: '2024-12-09'
|
4
|
+
revision: 865
|
5
5
|
database:
|
6
6
|
- name: A nomenclatural ontology for biological names
|
7
7
|
prefix: nomen
|
@@ -3012,6 +3012,9 @@ database:
|
|
3012
3012
|
- homepage: https://storage.googleapis.com/public-download-files/hgnc/archive/archive/monthly/json/hgnc_complete_set_2024-11-01.json
|
3013
3013
|
retrieved: '2024-12-03'
|
3014
3014
|
version: '2024-11-01'
|
3015
|
+
- homepage: https://storage.googleapis.com/public-download-files/hgnc/archive/archive/monthly/json/hgnc_complete_set_2024-12-03.json
|
3016
|
+
retrieved: '2024-12-09'
|
3017
|
+
version: '2024-12-03'
|
3015
3018
|
vtype: date
|
3016
3019
|
- name: Histopathology Ontology
|
3017
3020
|
prefix: hpath
|
@@ -3871,6 +3874,9 @@ database:
|
|
3871
3874
|
- homepage: ftp://nlmpubs.nlm.nih.gov/online/mesh/2024
|
3872
3875
|
retrieved: '2023-12-01'
|
3873
3876
|
version: '2024'
|
3877
|
+
- homepage: ftp://nlmpubs.nlm.nih.gov/online/mesh/2025
|
3878
|
+
retrieved: '2024-12-09'
|
3879
|
+
version: '2025'
|
3874
3880
|
vtype: year
|
3875
3881
|
- name: Metabolomics Standards Initiative Ontology
|
3876
3882
|
prefix: msio
|
@@ -8085,6 +8091,8 @@ database:
|
|
8085
8091
|
version: '2024-12-07'
|
8086
8092
|
- retrieved: '2024-12-08'
|
8087
8093
|
version: '2024-12-08'
|
8094
|
+
- retrieved: '2024-12-09'
|
8095
|
+
version: '2024-12-09'
|
8088
8096
|
vtype: date
|
8089
8097
|
- name: SWO (The Software Ontology)
|
8090
8098
|
prefix: swo
|
@@ -3,7 +3,6 @@
|
|
3
3
|
- DisGeNet - failed to resolve DisGeNet
|
4
4
|
- Antibody Registry - failed to resolve Antibody Registry
|
5
5
|
- DrugBank - failed to resolve DrugBank
|
6
|
-
- MeSH - issue parsing MeSH:
|
7
6
|
|
8
7
|
## DisGeNet
|
9
8
|
|
@@ -144,42 +143,3 @@ requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://go.d
|
|
144
143
|
|
145
144
|
```
|
146
145
|
|
147
|
-
## MeSH
|
148
|
-
|
149
|
-
Using class: `MeshGetter`
|
150
|
-
|
151
|
-
```python-traceback
|
152
|
-
Traceback (most recent call last):
|
153
|
-
File "/home/runner/work/bioversions/bioversions/src/bioversions/sources/__init__.py", line 216, in _iter_versions
|
154
|
-
yv = resolve(cls.name)
|
155
|
-
^^^^^^^^^^^^^^^^^
|
156
|
-
File "/home/runner/work/bioversions/bioversions/src/bioversions/sources/__init__.py", line 169, in resolve
|
157
|
-
return _resolve_helper_cached(name)
|
158
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
159
|
-
File "/home/runner/work/bioversions/bioversions/.tox/update/lib/python3.12/site-packages/cachier/core.py", line 258, in func_wrapper
|
160
|
-
return _calc_entry(core, key, func, args, kwds)
|
161
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
162
|
-
File "/home/runner/work/bioversions/bioversions/.tox/update/lib/python3.12/site-packages/cachier/core.py", line 61, in _calc_entry
|
163
|
-
func_res = func(*args, **kwds)
|
164
|
-
^^^^^^^^^^^^^^^^^^^
|
165
|
-
File "/home/runner/work/bioversions/bioversions/src/bioversions/sources/__init__.py", line 176, in _resolve_helper_cached
|
166
|
-
return _resolve_helper(name)
|
167
|
-
^^^^^^^^^^^^^^^^^^^^^
|
168
|
-
File "/home/runner/work/bioversions/bioversions/src/bioversions/sources/__init__.py", line 182, in _resolve_helper
|
169
|
-
return getter.resolve()
|
170
|
-
^^^^^^^^^^^^^^^^
|
171
|
-
File "/home/runner/work/bioversions/bioversions/src/bioversions/utils.py", line 216, in resolve
|
172
|
-
version=cls.version,
|
173
|
-
^^^^^^^^^^^
|
174
|
-
File "/home/runner/work/bioversions/bioversions/src/bioversions/utils.py", line 94, in version
|
175
|
-
if isinstance(cls._cache_prop, str):
|
176
|
-
^^^^^^^^^^^^^^^
|
177
|
-
File "/home/runner/work/bioversions/bioversions/src/bioversions/utils.py", line 88, in _cache_prop
|
178
|
-
cls._cache = cls().get()
|
179
|
-
^^^^^^^^^^^
|
180
|
-
File "/home/runner/work/bioversions/bioversions/src/bioversions/sources/mesh.py", line 28, in get
|
181
|
-
raise ValueError
|
182
|
-
ValueError
|
183
|
-
|
184
|
-
```
|
185
|
-
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
7
7
|
<cc:Work>
|
8
8
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
9
|
-
<dc:date>2024-12-
|
9
|
+
<dc:date>2024-12-09T01:08:53.382904</dc:date>
|
10
10
|
<dc:format>image/svg+xml</dc:format>
|
11
11
|
<dc:creator>
|
12
12
|
<cc:Agent>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
7
7
|
<cc:Work>
|
8
8
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
9
|
-
<dc:date>2024-12-
|
9
|
+
<dc:date>2024-12-09T01:08:53.331110</dc:date>
|
10
10
|
<dc:format>image/svg+xml</dc:format>
|
11
11
|
<dc:creator>
|
12
12
|
<cc:Agent>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
7
7
|
<cc:Work>
|
8
8
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
9
|
-
<dc:date>2024-12-
|
9
|
+
<dc:date>2024-12-09T01:08:53.199753</dc:date>
|
10
10
|
<dc:format>image/svg+xml</dc:format>
|
11
11
|
<dc:creator>
|
12
12
|
<cc:Agent>
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "bioversions"
|
7
|
-
version = "0.6.
|
7
|
+
version = "0.6.1"
|
8
8
|
description = "Get the current version for biological databases"
|
9
9
|
readme = "README.md"
|
10
10
|
authors = [
|
@@ -222,7 +222,7 @@ known-first-party = [
|
|
222
222
|
docstring-code-format = true
|
223
223
|
|
224
224
|
[tool.bumpversion]
|
225
|
-
current_version = "0.6.
|
225
|
+
current_version = "0.6.1"
|
226
226
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(?:-(?P<release>[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?:\\+(?P<build>[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?"
|
227
227
|
serialize = [
|
228
228
|
"{major}.{minor}.{patch}-{release}+{build}",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"annotations": {
|
3
|
-
"revision":
|
4
|
-
"date": "2024-12-
|
3
|
+
"revision": 865,
|
4
|
+
"date": "2024-12-09",
|
5
5
|
"author": "runner"
|
6
6
|
},
|
7
7
|
"database": [
|
@@ -5491,6 +5491,11 @@
|
|
5491
5491
|
"retrieved": "2024-12-03",
|
5492
5492
|
"version": "2024-11-01",
|
5493
5493
|
"homepage": "https://storage.googleapis.com/public-download-files/hgnc/archive/archive/monthly/json/hgnc_complete_set_2024-11-01.json"
|
5494
|
+
},
|
5495
|
+
{
|
5496
|
+
"retrieved": "2024-12-09",
|
5497
|
+
"version": "2024-12-03",
|
5498
|
+
"homepage": "https://storage.googleapis.com/public-download-files/hgnc/archive/archive/monthly/json/hgnc_complete_set_2024-12-03.json"
|
5494
5499
|
}
|
5495
5500
|
],
|
5496
5501
|
"name": "HGNC",
|
@@ -7047,6 +7052,11 @@
|
|
7047
7052
|
"retrieved": "2023-12-01",
|
7048
7053
|
"version": "2024",
|
7049
7054
|
"homepage": "ftp://nlmpubs.nlm.nih.gov/online/mesh/2024"
|
7055
|
+
},
|
7056
|
+
{
|
7057
|
+
"retrieved": "2024-12-09",
|
7058
|
+
"version": "2025",
|
7059
|
+
"homepage": "ftp://nlmpubs.nlm.nih.gov/online/mesh/2025"
|
7050
7060
|
}
|
7051
7061
|
],
|
7052
7062
|
"name": "MeSH",
|
@@ -14854,6 +14864,10 @@
|
|
14854
14864
|
{
|
14855
14865
|
"retrieved": "2024-12-08",
|
14856
14866
|
"version": "2024-12-08"
|
14867
|
+
},
|
14868
|
+
{
|
14869
|
+
"retrieved": "2024-12-09",
|
14870
|
+
"version": "2024-12-09"
|
14857
14871
|
}
|
14858
14872
|
],
|
14859
14873
|
"name": "SwissLipids",
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"""A getter for HGNC."""
|
2
|
+
|
3
|
+
import logging
|
4
|
+
|
5
|
+
import requests
|
6
|
+
|
7
|
+
from bioversions.utils import Getter, VersionType
|
8
|
+
|
9
|
+
__all__ = [
|
10
|
+
"HGNCGetter",
|
11
|
+
]
|
12
|
+
|
13
|
+
logger = logging.getLogger(__name__)
|
14
|
+
|
15
|
+
PATH = "https://storage.googleapis.com/public-download-files/hgnc/archive/archive/monthly/json/"
|
16
|
+
URL = "https://storage.googleapis.com/storage/v1/b/public-download-files/o?prefix=hgnc/archive/archive/monthly"
|
17
|
+
PREFIX = "hgnc/archive/archive/monthly/json/hgnc_complete_set_"
|
18
|
+
SUFFIX = ".json"
|
19
|
+
|
20
|
+
|
21
|
+
class HGNCGetter(Getter):
|
22
|
+
"""A getter for HGNC."""
|
23
|
+
|
24
|
+
bioregistry_id = "hgnc"
|
25
|
+
name = "HGNC"
|
26
|
+
homepage_fmt = PATH + "hgnc_complete_set_{version}.json"
|
27
|
+
|
28
|
+
version_type = VersionType.date
|
29
|
+
|
30
|
+
def get(self) -> str:
|
31
|
+
"""Get the latest monthly HGNC version number."""
|
32
|
+
res = requests.get(URL, timeout=5)
|
33
|
+
items = res.json()["items"]
|
34
|
+
return max(
|
35
|
+
item["name"].removeprefix(PREFIX).removesuffix(SUFFIX)
|
36
|
+
for item in items
|
37
|
+
if (name := item["name"]).startswith(PREFIX) and name.endswith(SUFFIX)
|
38
|
+
)
|
39
|
+
|
40
|
+
|
41
|
+
if __name__ == "__main__":
|
42
|
+
HGNCGetter.print()
|
@@ -8,6 +8,10 @@ __all__ = [
|
|
8
8
|
"MeshGetter",
|
9
9
|
]
|
10
10
|
|
11
|
+
#: In 2024 and before, these were .gz, but after
|
12
|
+
#: became .xml files
|
13
|
+
SUFFIXES = [".xml", ".xml.gz", ".gz"]
|
14
|
+
|
11
15
|
|
12
16
|
class MeshGetter(Getter):
|
13
17
|
"""A getter for MeSH."""
|
@@ -22,9 +26,12 @@ class MeshGetter(Getter):
|
|
22
26
|
with ftplib.FTP("nlmpubs.nlm.nih.gov") as ftp:
|
23
27
|
ftp.login()
|
24
28
|
ftp.cwd("/online/mesh/MESH_FILES/xmlmesh/")
|
25
|
-
for name, _ in ftp.mlsd()
|
26
|
-
|
27
|
-
|
29
|
+
names = [name for name, _ in ftp.mlsd()]
|
30
|
+
|
31
|
+
for name in names:
|
32
|
+
for suffix in SUFFIXES:
|
33
|
+
if name.startswith("desc") and name.endswith(suffix):
|
34
|
+
return name[len("desc") : -len(suffix)]
|
28
35
|
raise ValueError
|
29
36
|
|
30
37
|
|
@@ -1,47 +0,0 @@
|
|
1
|
-
"""A getter for HGNC."""
|
2
|
-
|
3
|
-
import datetime
|
4
|
-
import logging
|
5
|
-
|
6
|
-
import requests
|
7
|
-
|
8
|
-
from bioversions.utils import Getter, VersionType
|
9
|
-
|
10
|
-
__all__ = [
|
11
|
-
"HGNCGetter",
|
12
|
-
]
|
13
|
-
|
14
|
-
logger = logging.getLogger(__name__)
|
15
|
-
|
16
|
-
PATH = "https://storage.googleapis.com/public-download-files/hgnc/archive/archive/monthly/json/"
|
17
|
-
PREFIX = "hgnc_complete_set_"
|
18
|
-
SUFFIX = ".json"
|
19
|
-
|
20
|
-
|
21
|
-
class HGNCGetter(Getter):
|
22
|
-
"""A getter for HGNC."""
|
23
|
-
|
24
|
-
bioregistry_id = "hgnc"
|
25
|
-
name = "HGNC"
|
26
|
-
homepage_fmt = PATH + "hgnc_complete_set_{version}.json"
|
27
|
-
|
28
|
-
version_type = VersionType.date
|
29
|
-
|
30
|
-
def get(self) -> str:
|
31
|
-
"""Get the latest HGNC version number."""
|
32
|
-
today = datetime.date.today()
|
33
|
-
this_year = int(today.strftime("%Y"))
|
34
|
-
this_month = int(today.strftime("%m"))
|
35
|
-
maybe = today.strftime("%Y-%m-01")
|
36
|
-
res = requests.head(self.homepage_fmt.format(version=maybe), timeout=15)
|
37
|
-
if res.status_code == 200:
|
38
|
-
return maybe
|
39
|
-
if this_month == 1:
|
40
|
-
maybe_last_month = f"{this_year - 1}-12-01"
|
41
|
-
else:
|
42
|
-
maybe_last_month = f"{this_year}-{this_month - 1}-01"
|
43
|
-
return maybe_last_month
|
44
|
-
|
45
|
-
|
46
|
-
if __name__ == "__main__":
|
47
|
-
HGNCGetter.print()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|