From f6718da9c9b1fe0e23c48df1be3ea7775bdd92c2 Mon Sep 17 00:00:00 2001 From: korikuzma Date: Mon, 17 Oct 2022 17:43:06 -0400 Subject: [PATCH] build: separate out etl (dev) dependencies --- Pipfile | 11 +- README.md | 25 +- gene/etl/ensembl.py | 2 +- gene/etl/hgnc.py | 13 +- gene/etl/ncbi.py | 16 +- gene/{ => etl}/vrs_locations/__init__.py | 0 .../vrs_locations/chromosome_location.py | 0 .../vrs_locations/sequence_location.py | 13 +- gene/version.py | 2 +- requirements-dev.txt | 264 +++++++++--------- requirements.txt | 110 ++------ setup.cfg | 15 +- .../{ensembl_106.gff3 => ensembl_107.gff3} | 0 tests/unit/test_database_and_etl.py | 2 +- tests/unit/test_ensembl_source.py | 4 +- 15 files changed, 214 insertions(+), 263 deletions(-) rename gene/{ => etl}/vrs_locations/__init__.py (100%) rename gene/{ => etl}/vrs_locations/chromosome_location.py (100%) rename gene/{ => etl}/vrs_locations/sequence_location.py (88%) rename tests/unit/data/etl_data/{ensembl_106.gff3 => ensembl_107.gff3} (100%) diff --git a/Pipfile b/Pipfile index 829cc80e..c7f0cf2e 100644 --- a/Pipfile +++ b/Pipfile @@ -9,15 +9,14 @@ fastapi = "*" uvicorn = "*" click = "*" boto3 = "*" -beautifulsoup4 = "*" -gffutils = "*" -requests = "*" -"biocommons.seqrepo" = "*" -"ga4gh.vrs" = {version = ">=0.7.5.dev1", extras = ["extras"]} -"ga4gh.vrsatile.pydantic" = ">=0.0.10" +"ga4gh.vrsatile.pydantic" = "==0.0.11" [dev-packages] gene = {editable = true, path = "."} +gffutils = "*" +"biocommons.seqrepo" = "*" +"ga4gh.vrs" = {version = "==0.8.0dev0", extras = ["extras"]} +psycopg2-binary = "*" pytest = "*" pre-commit = "*" flake8 = "*" diff --git a/README.md b/README.md index 401b7ba7..b8256e7b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ # Gene Normalization Services and guidelines for normalizing gene terms +Installing with pip: + +```commandline +pip install gene[dev] +``` + +The `[dev]` argument tells pip to install packages to fulfill the dependencies of the `gene.etl` package. + ## Developer instructions Following are sections include instructions specifically for developers. @@ -14,16 +22,29 @@ Once installed, from the project root dir, just run: ```commandline pipenv shell pipenv lock && pipenv sync +pipenv install --dev ``` -Gene Normalization relies on [SeqRepo](https://github.com/biocommons/biocommons.seqrepo) data. +Gene Normalization relies on [SeqRepo](https://github.com/biocommons/biocommons.seqrepo) data, which you must download yourself. From the _root_ directory: ``` pip install seqrepo sudo mkdir /usr/local/share/seqrepo sudo chown $USER /usr/local/share/seqrepo -seqrepo pull -i 2021-01-29 +seqrepo pull -i 2021-01-29 # Replace with latest version using `seqrepo list-remote-instances` if outdated +``` + +If you get an error similar to the one below: +``` +PermissionError: [Error 13] Permission denied: '/usr/local/share/seqrepo/2021-01-29._fkuefgd' -> '/usr/local/share/seqrepo/2021-01-29' +``` + +You will want to do the following:\ +(*Might not be ._fkuefgd, so replace with your error message path*) +```console +sudo mv /usr/local/share/seqrepo/2021-01-29._fkuefgd /usr/local/share/seqrepo/2021-01-29 +exit ``` ### Deploying DynamoDB Locally diff --git a/gene/etl/ensembl.py b/gene/etl/ensembl.py index 2ea25642..13720d5a 100644 --- a/gene/etl/ensembl.py +++ b/gene/etl/ensembl.py @@ -9,7 +9,7 @@ from gene import APP_ROOT from gene.schemas import SourceName, NamespacePrefix, Strand, SourceMeta from gene.database import Database -from gene.vrs_locations import SequenceLocation +from gene.etl.vrs_locations import SequenceLocation logger = logging.getLogger("gene") diff --git a/gene/etl/hgnc.py b/gene/etl/hgnc.py index 98cd2e6b..205c0f85 100644 --- a/gene/etl/hgnc.py +++ b/gene/etl/hgnc.py @@ -1,14 +1,15 @@ """This module defines the HGNC ETL methods.""" -from .base import Base -from gene import APP_ROOT, PREFIX_LOOKUP -from gene.schemas import SourceName, SymbolStatus, NamespacePrefix, \ - SourceMeta, Annotation, Chromosome -from gene.database import Database import logging import json import shutil import re -from gene.vrs_locations import ChromosomeLocation + +from gene import APP_ROOT, PREFIX_LOOKUP +from gene.database import Database +from gene.schemas import SourceName, SymbolStatus, NamespacePrefix, \ + SourceMeta, Annotation, Chromosome +from gene.etl.base import Base +from gene.etl.vrs_locations import ChromosomeLocation logger = logging.getLogger('gene') logger.setLevel(logging.DEBUG) diff --git a/gene/etl/ncbi.py b/gene/etl/ncbi.py index e1a88062..e1239f2f 100644 --- a/gene/etl/ncbi.py +++ b/gene/etl/ncbi.py @@ -1,17 +1,19 @@ """This module defines ETL methods for the NCBI data source.""" -from .base import Base -from gene import APP_ROOT, PREFIX_LOOKUP -from gene.database import Database -from gene.schemas import SourceMeta, SourceName, NamespacePrefix, Annotation, \ - Chromosome, SymbolStatus +from ftplib import FTP import logging from pathlib import Path import csv from datetime import datetime import re + import gffutils -from gene.vrs_locations import SequenceLocation, ChromosomeLocation -from ftplib import FTP + +from gene import APP_ROOT, PREFIX_LOOKUP +from gene.database import Database +from gene.schemas import SourceMeta, SourceName, NamespacePrefix, Annotation, \ + Chromosome, SymbolStatus +from gene.etl.base import Base +from gene.etl.vrs_locations import SequenceLocation, ChromosomeLocation logger = logging.getLogger('gene') diff --git a/gene/vrs_locations/__init__.py b/gene/etl/vrs_locations/__init__.py similarity index 100% rename from gene/vrs_locations/__init__.py rename to gene/etl/vrs_locations/__init__.py diff --git a/gene/vrs_locations/chromosome_location.py b/gene/etl/vrs_locations/chromosome_location.py similarity index 100% rename from gene/vrs_locations/chromosome_location.py rename to gene/etl/vrs_locations/chromosome_location.py diff --git a/gene/vrs_locations/sequence_location.py b/gene/etl/vrs_locations/sequence_location.py similarity index 88% rename from gene/vrs_locations/sequence_location.py rename to gene/etl/vrs_locations/sequence_location.py index 2dcc8f3e..d33ecd11 100644 --- a/gene/vrs_locations/sequence_location.py +++ b/gene/etl/vrs_locations/sequence_location.py @@ -1,8 +1,9 @@ """This module defines GA4GH Sequence Location.""" from typing import List +import logging + from ga4gh.vrs import models from ga4gh.core import ga4gh_identify -import logging logger = logging.getLogger('gene') logger.setLevel(logging.DEBUG) @@ -18,7 +19,12 @@ def get_aliases(self, sr, seqid) -> List[str]: :param str seqid: Sequence ID accession :return: List of aliases for seqid """ - return sr.translate_alias(seqid) + aliases = [] + try: + aliases = sr.translate_alias(seqid) + except KeyError as e: + logger.warning(f"SeqRepo raised KeyError: {e}") + return aliases def add_location(self, seqid, gene, params, sr): """Get a gene's Sequence Location. @@ -31,6 +37,9 @@ def add_location(self, seqid, gene, params, sr): """ location = dict() aliases = self.get_aliases(sr, seqid) + if not aliases: + return location + sequence_id = [a for a in aliases if a.startswith('ga4gh')][0] if gene.start != '.' and gene.end != '.' and sequence_id: diff --git a/gene/version.py b/gene/version.py index 3fd08450..7f36ece5 100644 --- a/gene/version.py +++ b/gene/version.py @@ -1,2 +1,2 @@ """Gene normalizer version""" -__version__ = "0.1.27" +__version__ = "0.1.28" diff --git a/requirements-dev.txt b/requirements-dev.txt index 93f0cabf..fbc0854f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,164 +1,156 @@ -# -# These requirements were autogenerated by pipenv -# To regenerate from the project's Pipfile, run: -# -# pipenv lock --requirements --dev -# - -# Note: in pipenv 2020.x, "--dev" changed to emit both default and development -# requirements. To emit only development requirements, pass "--dev-only". - -i https://pypi.org/simple --e . -anyio==3.5.0; python_full_version >= '3.6.2' +anyio==3.6.1 ; python_full_version >= '3.6.2' appdirs==1.4.4 -appnope==0.1.2; sys_platform == 'darwin' -argcomplete==2.0.0; python_version >= '3.6' +appnope==0.1.3 ; sys_platform == 'darwin' +argcomplete==2.0.0 ; python_version >= '3.6' argh==0.26.2 -argon2-cffi-bindings==21.2.0; python_version >= '3.6' -argon2-cffi==21.3.0; python_version >= '3.6' -asgiref==3.5.0; python_version >= '3.7' -asttokens==2.0.5 -attrs==21.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' -babel==2.9.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +argon2-cffi==21.3.0 ; python_version >= '3.6' +argon2-cffi-bindings==21.2.0 ; python_version >= '3.6' +asttokens==2.0.8 +attrs==22.1.0 ; python_version >= '3.5' +babel==2.10.3 ; python_version >= '3.6' backcall==0.2.0 -beautifulsoup4==4.10.0 +beautifulsoup4==4.11.1 ; python_full_version >= '3.6.0' biocommons.seqrepo==0.6.5 -bioutils==0.5.5; python_version >= '3.6' -bleach==4.1.0; python_version >= '3.6' -boto3==1.21.26 -botocore==1.24.26; python_version >= '3.6' +bioutils==0.5.7 ; python_version >= '3.6' +bleach==5.0.1 ; python_version >= '3.7' +boto3==1.24.92 +botocore==1.27.92 ; python_version >= '3.7' bs4==0.0.1 -canonicaljson==1.6.0; python_version ~= '3.7' -certifi==2021.10.8 -cffi==1.15.0 -cfgv==3.3.1; python_full_version >= '3.6.1' -charset-normalizer==2.0.12; python_version >= '3' -click==8.0.4 -coloredlogs==15.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' -configparser==5.2.0; python_version >= '3.6' -coverage==6.3.2 +canonicaljson==1.6.3 ; python_version >= '3.7' +certifi==2022.9.24 ; python_version >= '3.6' +cffi==1.15.1 +cfgv==3.3.1 ; python_full_version >= '3.6.1' +charset-normalizer==2.1.1 ; python_full_version >= '3.6.0' +click==8.1.3 +coloredlogs==15.0.1 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' +configparser==5.3.0 ; python_version >= '3.7' +coverage==6.5.0 coveralls==3.3.1 -cssselect==1.1.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -debugpy==1.6.0; python_version >= '3.7' -decorator==5.1.1; python_version >= '3.5' -defusedxml==0.7.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' -distlib==0.3.4 +cssselect==1.1.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +debugpy==1.6.3 ; python_version >= '3.7' +decorator==5.1.1 ; python_version >= '3.5' +defusedxml==0.7.1 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' +distlib==0.3.6 docopt==0.6.2 -entrypoints==0.4; python_version >= '3.6' -executing==0.8.3 +entrypoints==0.4 ; python_version >= '3.6' +executing==1.1.1 fake-useragent==0.1.11 -fastapi==0.75.0 -filelock==3.6.0; python_version >= '3.7' +fastapi==0.85.1 +fastjsonschema==2.16.2 +filelock==3.8.0 ; python_version >= '3.7' +flake8==5.0.4 flake8-docstrings==1.6.0 -flake8==4.0.1 -ga4gh.vrs[extras]==0.8.0.dev0 -ga4gh.vrsatile.pydantic==0.0.10 -gffutils==0.10.1 -h11==0.13.0; python_version >= '3.6' +ga4gh.vrs[extras]==0.8.0dev0 +ga4gh.vrsatile.pydantic==0.0.11 +-e . +gffutils==0.11.1 +h11==0.14.0 ; python_version >= '3.7' hgvs==1.5.2 -humanfriendly==10.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' -identify==2.4.12; python_version >= '3.7' -idna==3.3; python_version >= '3' -importlib-metadata==4.11.3; python_version < '3.10' -inflection==0.5.1; python_version >= '3.5' +humanfriendly==10.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' +identify==2.5.6 ; python_version >= '3.7' +idna==3.4 ; python_version >= '3.5' +importlib-metadata==5.0.0 ; python_version >= '3.7' +inflection==0.5.1 ; python_version >= '3.5' iniconfig==1.1.1 -ipykernel==6.9.2; python_version >= '3.7' +ipykernel==6.16.0 ; python_version >= '3.7' +ipython==8.5.0 ; python_version >= '3.8' ipython-genutils==0.2.0 -ipython==8.1.1; python_version >= '3.8' -jedi==0.18.1; python_version >= '3.6' -jinja2==3.1.0; python_version >= '3.7' -jmespath==1.0.0; python_version >= '3.7' -json5==0.9.6 +jedi==0.18.1 ; python_version >= '3.6' +jinja2==3.1.2 ; python_version >= '3.7' +jmespath==1.0.1 ; python_version >= '3.7' +json5==0.9.10 jsonschema==3.2.0 -jupyter-client==7.1.2; python_full_version >= '3.6.1' -jupyter-core==4.9.2; python_version >= '3.6' -jupyter-server==1.15.6; python_version >= '3.7' -jupyterlab-pygments==0.1.2 -jupyterlab-server==2.11.2; python_version >= '3.7' -jupyterlab==3.3.2 -lxml==4.8.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' -markdown==3.3.6; python_version >= '3.6' -markupsafe==2.1.1; python_version >= '3.7' -matplotlib-inline==0.1.3; python_version >= '3.5' -mccabe==0.6.1 -mistune==0.8.4 +jupyter-client==7.4.2 ; python_version >= '3.7' +jupyter-core==4.11.1 ; python_version >= '3.7' +jupyter-server==1.21.0 ; python_version >= '3.7' +jupyterlab==3.4.8 +jupyterlab-pygments==0.2.2 ; python_version >= '3.7' +jupyterlab-server==2.16.0 ; python_version >= '3.7' +lxml==4.9.1 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' +markdown==3.4.1 ; python_version >= '3.7' +markupsafe==2.1.1 ; python_version >= '3.7' +matplotlib-inline==0.1.6 ; python_version >= '3.5' +mccabe==0.7.0 ; python_version >= '3.6' +mistune==2.0.4 mock==4.0.3 -nbclassic==0.3.7; python_version >= '3.7' -nbclient==0.5.13; python_version >= '3.7' -nbconvert==6.4.4; python_version >= '3.7' -nbformat==5.2.0; python_version >= '3.7' -nest-asyncio==1.5.4; python_version >= '3.5' -nodeenv==1.6.0 -notebook-shim==0.1.0; python_version >= '3.7' -notebook==6.4.10; python_version >= '3.6' -numpy==1.22.3; python_version >= '3.8' -packaging==21.3; python_version >= '3.6' -pandocfilters==1.5.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +nbclassic==0.4.5 ; python_version >= '3.7' +nbclient==0.7.0 ; python_full_version >= '3.7.0' +nbconvert==7.2.1 ; python_version >= '3.7' +nbformat==5.7.0 ; python_version >= '3.7' +nest-asyncio==1.5.6 ; python_version >= '3.5' +nodeenv==1.7.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6' +notebook==6.5.1 ; python_version >= '3.7' +notebook-shim==0.2.0 ; python_version >= '3.7' +numpy==1.23.4 ; python_version >= '3.8' +packaging==21.3 ; python_version >= '3.6' +pandocfilters==1.5.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' parse==1.19.0 parsley==1.3 -parso==0.8.3; python_version >= '3.6' -pexpect==4.8.0; sys_platform != 'win32' +parso==0.8.3 ; python_version >= '3.6' +pexpect==4.8.0 ; sys_platform != 'win32' pickleshare==0.7.5 -platformdirs==2.5.1; python_version >= '3.7' -pluggy==1.0.0; python_version >= '3.6' -pre-commit==2.17.0 -prometheus-client==0.13.1; python_version >= '3.6' -prompt-toolkit==3.0.28; python_full_version >= '3.6.2' -psutil==5.9.0; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3' -psycopg2==2.9.3; python_version >= '3.6' +platformdirs==2.5.2 ; python_version >= '3.7' +pluggy==1.0.0 ; python_version >= '3.6' +pre-commit==2.20.0 +prometheus-client==0.15.0 ; python_version >= '3.6' +prompt-toolkit==3.0.31 ; python_full_version >= '3.6.2' +psutil==5.9.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +psycopg2==2.9.4 ; python_version >= '3.6' +psycopg2-binary==2.9.4 ptyprocess==0.7.0 pure-eval==0.2.2 -py==1.11.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' -pycodestyle==2.8.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' +py==1.11.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' +pycodestyle==2.9.1 ; python_version >= '3.6' pycparser==2.21 -pydantic==1.9.0 -pydocstyle==6.1.1; python_version >= '3.6' +pydantic==1.10.2 +pydocstyle==6.1.1 ; python_version >= '3.6' pyee==8.2.2 -pyfaidx==0.6.4 -pyflakes==2.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -pygments==2.11.2; python_version >= '3.5' -pyparsing==3.0.7; python_version >= '3.6' -pyppeteer==1.0.2; python_version >= '3.7' and python_version < '4.0' +pyfaidx==0.7.1 +pyflakes==2.5.0 ; python_version >= '3.6' +pygments==2.13.0 ; python_version >= '3.6' +pyparsing==3.0.9 ; python_full_version >= '3.6.8' +pyppeteer==1.0.2 ; python_version >= '3.7' and python_version < '4.0' pyquery==1.4.3 -pyrsistent==0.18.1; python_version >= '3.7' -pysam==0.18.0 -pytest-cov==3.0.0 -pytest==7.1.1 -python-dateutil==2.8.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +pyrsistent==0.18.1 ; python_version >= '3.7' +pysam==0.19.1 +pytest==7.1.3 +pytest-cov==4.0.0 +python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' python-jsonschema-objects==0.4.1 -pytz==2022.1 -pyyaml==6.0; python_version >= '3.6' -pyzmq==22.3.0; python_version >= '3.6' -requests-html==0.10.0; python_version >= '3.6' -requests==2.27.1 -s3transfer==0.5.2; python_version >= '3.6' +pytz==2022.4 +pyyaml==6.0 ; python_version >= '3.6' +pyzmq==24.0.1 ; python_version >= '3.6' +requests==2.28.1 +requests-html==0.10.0 ; python_full_version >= '3.6.0' +s3transfer==0.6.0 ; python_version >= '3.7' send2trash==1.8.0 -setuptools==61.0.0; python_version >= '3.7' -simplejson==3.17.6; python_version >= '2.5' and python_version not in '3.0, 3.1, 3.2, 3.3' -six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -sniffio==1.2.0; python_version >= '3.5' +setuptools==65.5.0 ; python_version >= '3.7' +simplejson==3.17.6 ; python_version >= '2.5' and python_version not in '3.0, 3.1, 3.2, 3.3' +six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +sniffio==1.3.0 ; python_version >= '3.7' snowballstemmer==2.2.0 -soupsieve==2.3.1; python_version >= '3.6' -sqlparse==0.4.2; python_version >= '3.5' -stack-data==0.2.0 -starlette==0.17.1; python_version >= '3.6' -tabulate==0.8.9 -terminado==0.13.3; python_version >= '3.7' -testpath==0.6.0; python_version >= '3.5' -toml==0.10.2; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3' -tomli==2.0.1; python_version >= '3.7' -tornado==6.1; python_version >= '3.5' -tqdm==4.63.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -traitlets==5.1.1; python_version >= '3.7' -typing-extensions==4.1.1; python_version >= '3.6' -urllib3==1.26.9; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4.0' -uvicorn==0.17.6 -virtualenv==20.13.4; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' -w3lib==1.22.0 +soupsieve==2.3.2.post1 ; python_version >= '3.6' +sqlparse==0.4.3 ; python_version >= '3.5' +stack-data==0.5.1 +starlette==0.20.4 ; python_version >= '3.7' +tabulate==0.9.0 ; python_version >= '3.7' +terminado==0.16.0 ; python_version >= '3.7' +tinycss2==1.2.0 ; python_version >= '3.7' +toml==0.10.2 ; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3' +tomli==2.0.1 ; python_version >= '3.7' +tornado==6.2 ; python_version >= '3.7' +tqdm==4.64.1 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +traitlets==5.4.0 ; python_version >= '3.7' +typing-extensions==4.4.0 ; python_version >= '3.7' +urllib3==1.26.12 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4' +uvicorn==0.18.3 +virtualenv==20.16.5 ; python_version >= '3.6' +w3lib==2.0.1 ; python_version >= '3.6' wcwidth==0.2.5 webencodings==0.5.1 -websocket-client==1.3.1; python_version >= '3.6' -websockets==10.2; python_version >= '3.7' -yoyo-migrations==7.3.2 -zipp==3.7.0; python_version >= '3.7' +websocket-client==1.4.1 ; python_version >= '3.7' +websockets==10.3 ; python_version >= '3.7' +-e . +yoyo-migrations==8.0.0 +zipp==3.9.0 ; python_version >= '3.7' diff --git a/requirements.txt b/requirements.txt index 7386be8f..bcf61a84 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,93 +1,19 @@ -# -# These requirements were autogenerated by pipenv -# To regenerate from the project's Pipfile, run: -# -# pipenv lock --requirements -# - -i https://pypi.org/simple -anyio==3.5.0; python_full_version >= '3.6.2' -appdirs==1.4.4 -appnope==0.1.2; sys_platform == 'darwin' -argcomplete==2.0.0; python_version >= '3.6' -argh==0.26.2 -asgiref==3.5.0; python_version >= '3.7' -asttokens==2.0.5 -attrs==21.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' -backcall==0.2.0 -beautifulsoup4==4.10.0 -biocommons.seqrepo==0.6.5 -bioutils==0.5.5; python_version >= '3.6' -boto3==1.21.26 -botocore==1.24.26; python_version >= '3.6' -bs4==0.0.1 -canonicaljson==1.6.0; python_version ~= '3.7' -certifi==2021.10.8 -charset-normalizer==2.0.12; python_version >= '3' -click==8.0.4 -coloredlogs==15.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' -configparser==5.2.0; python_version >= '3.6' -cssselect==1.1.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -decorator==5.1.1; python_version >= '3.5' -executing==0.8.3 -fake-useragent==0.1.11 -fastapi==0.75.0 -ga4gh.vrs[extras]==0.8.0.dev0 -ga4gh.vrsatile.pydantic==0.0.10 -gffutils==0.10.1 -h11==0.13.0; python_version >= '3.6' -hgvs==1.5.2 -humanfriendly==10.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' -idna==3.3; python_version >= '3' -importlib-metadata==4.11.3; python_version < '3.10' -inflection==0.5.1; python_version >= '3.5' -ipython==8.1.1; python_version >= '3.8' -jedi==0.18.1; python_version >= '3.6' -jmespath==1.0.0; python_version >= '3.7' -jsonschema==3.2.0 -lxml==4.8.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' -markdown==3.3.6; python_version >= '3.6' -matplotlib-inline==0.1.3; python_version >= '3.5' -numpy==1.22.3; python_version >= '3.8' -parse==1.19.0 -parsley==1.3 -parso==0.8.3; python_version >= '3.6' -pexpect==4.8.0; sys_platform != 'win32' -pickleshare==0.7.5 -prompt-toolkit==3.0.28; python_full_version >= '3.6.2' -psycopg2==2.9.3; python_version >= '3.6' -ptyprocess==0.7.0 -pure-eval==0.2.2 -pydantic==1.9.0 -pyee==8.2.2 -pyfaidx==0.6.4 -pygments==2.11.2; python_version >= '3.5' -pyppeteer==1.0.2; python_version >= '3.7' and python_version < '4.0' -pyquery==1.4.3 -pyrsistent==0.18.1; python_version >= '3.7' -pysam==0.18.0 -python-dateutil==2.8.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -python-jsonschema-objects==0.4.1 -pyyaml==6.0; python_version >= '3.6' -requests-html==0.10.0; python_version >= '3.6' -requests==2.27.1 -s3transfer==0.5.2; python_version >= '3.6' -setuptools==61.0.0; python_version >= '3.7' -simplejson==3.17.6; python_version >= '2.5' and python_version not in '3.0, 3.1, 3.2, 3.3' -six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -sniffio==1.2.0; python_version >= '3.5' -soupsieve==2.3.1; python_version >= '3.6' -sqlparse==0.4.2; python_version >= '3.5' -stack-data==0.2.0 -starlette==0.17.1; python_version >= '3.6' -tabulate==0.8.9 -tqdm==4.63.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' -traitlets==5.1.1; python_version >= '3.7' -typing-extensions==4.1.1; python_version >= '3.6' -urllib3==1.26.9; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4.0' -uvicorn==0.17.6 -w3lib==1.22.0 -wcwidth==0.2.5 -websockets==10.2; python_version >= '3.7' -yoyo-migrations==7.3.2 -zipp==3.7.0; python_version >= '3.7' +anyio==3.6.1 ; python_full_version >= '3.6.2' +boto3==1.24.92 +botocore==1.27.92 ; python_version >= '3.7' +click==8.1.3 +fastapi==0.85.1 +ga4gh.vrsatile.pydantic==0.0.11 +h11==0.14.0 ; python_version >= '3.7' +idna==3.4 ; python_version >= '3.5' +jmespath==1.0.1 ; python_version >= '3.7' +pydantic==1.10.2 +python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +s3transfer==0.6.0 ; python_version >= '3.7' +six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' +sniffio==1.3.0 ; python_version >= '3.7' +starlette==0.20.4 ; python_version >= '3.7' +typing-extensions==4.4.0 ; python_version >= '3.7' +urllib3==1.26.12 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4' +uvicorn==0.18.3 diff --git a/setup.cfg b/setup.cfg index 1dfcc3c0..9b99d78c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,18 +29,19 @@ install_requires = uvicorn click boto3 - beautifulsoup4 - gffutils - requests - biocommons.seqrepo - ga4gh.vrs[extras] >= 0.7.5.dev1 - ga4gh.vrsatile.pydantic >= 0.0.10 - + ga4gh.vrsatile.pydantic == 0.0.11 tests_require = pytest pytest-cov mock +[options.extras_require] +dev = + gffutils + biocommons.seqrepo + ga4gh.vrs[extras] == 0.8.0dev0 + psycopg2-binary + [tool:pytest] addopts = --ignore setup.py --ignore codebuild/ --ignore dynamodb_local_latest/ --doctest-modules --cov-report term-missing --cov . diff --git a/tests/unit/data/etl_data/ensembl_106.gff3 b/tests/unit/data/etl_data/ensembl_107.gff3 similarity index 100% rename from tests/unit/data/etl_data/ensembl_106.gff3 rename to tests/unit/data/etl_data/ensembl_107.gff3 diff --git a/tests/unit/test_database_and_etl.py b/tests/unit/test_database_and_etl.py index 25584a29..8b7d88fe 100644 --- a/tests/unit/test_database_and_etl.py +++ b/tests/unit/test_database_and_etl.py @@ -91,7 +91,7 @@ def test_ensembl_etl(test_get_seqrepo, processed_ids, dynamodb, etl_data_path, shutil.rmtree(e.src_data_dir) e._sequence_location.get_aliases = _get_aliases - e._data_src = etl_data_path / 'ensembl_106.gff3' + e._data_src = etl_data_path / 'ensembl_107.gff3' e._transform_data() e._add_meta() processed_ids += e._processed_ids diff --git a/tests/unit/test_ensembl_source.py b/tests/unit/test_ensembl_source.py index 907d88e4..8a27eb03 100644 --- a/tests/unit/test_ensembl_source.py +++ b/tests/unit/test_ensembl_source.py @@ -304,9 +304,9 @@ def test_meta_info(ensembl): assert resp.source_meta_.data_license == "custom" assert resp.source_meta_.data_license_url == \ "https://useast.ensembl.org/info/about/legal/disclaimer.html" - assert resp.source_meta_.version == "106" + assert resp.source_meta_.version == "107" assert resp.source_meta_.data_url == \ - "ftp://ftp.ensembl.org/pub/current_gff3/homo_sapiens/Homo_sapiens.GRCh38.106.gff3.gz" # noqa: E501 + "ftp://ftp.ensembl.org/pub/current_gff3/homo_sapiens/Homo_sapiens.GRCh38.107.gff3.gz" # noqa: E501 assert resp.source_meta_.rdp_url is None assert resp.source_meta_.genome_assemblies == ["GRCh38"] assert resp.source_meta_.data_license_attributes == {