diff --git a/helixer/core/scripts.py b/helixer/core/scripts.py index aba6aeb..61d15ef 100644 --- a/helixer/core/scripts.py +++ b/helixer/core/scripts.py @@ -4,7 +4,7 @@ from pprint import pprint from termcolor import colored from abc import ABC, abstractmethod - +from importlib.metadata import version class ParameterParser(ABC): """Bundles code that parses script parameters from the command line and a config file.""" @@ -26,7 +26,7 @@ def __init__(self, config_file_path=''): self.data_group.add_argument('--no-multiprocess', action='store_true', help='Whether to not parallize the numerification of large sequences. Uses half the memory ' 'but can be much slower when many CPU cores can be utilized.') - + self.parser.add_argument('--version', action='version', version='%(prog)s ' + version('helixer')) # Default values have to be specified - and potentially added - here self.defaults = {'compression': 'gzip', 'no_multiprocess': False} diff --git a/helixer/export/exporter.py b/helixer/export/exporter.py index da105a8..a22b446 100644 --- a/helixer/export/exporter.py +++ b/helixer/export/exporter.py @@ -5,7 +5,7 @@ import sqlite3 import datetime import subprocess -import pkg_resources +from importlib.metadata import version import geenuff import helixer @@ -86,7 +86,7 @@ def _add_data_attrs(self): strip().decode() except subprocess.CalledProcessError: attrs[module.__name__ + '_commit'] = 'commit not found, version: {}'.format( - pkg_resources.require(module.__name__)[0].version + version(module.__name__) ) print('logged installed version in place of git commit for {}'.format(module.__name__)) os.chdir(pwd) diff --git a/helixer/prediction/HelixerModel.py b/helixer/prediction/HelixerModel.py index 189abe3..5ac0da5 100644 --- a/helixer/prediction/HelixerModel.py +++ b/helixer/prediction/HelixerModel.py @@ -14,7 +14,7 @@ import numcodecs import argparse import datetime -import pkg_resources +from importlib.metadata import version import subprocess import numpy as np import tensorflow as tf @@ -913,8 +913,7 @@ def _print_model_info(self, model): commit = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip().decode() print(f'Current Helixer branch: {branch} ({commit})') except subprocess.CalledProcessError: - version = pkg_resources.require('helixer')[0].version - print(f'Current Helixer version: {version}') + print(f'Current Helixer version: {version("helixer")}') try: if os.path.isfile(self.load_model_path): diff --git a/requirements.3.10.txt b/requirements.3.10.txt new file mode 100644 index 0000000..377fbf4 --- /dev/null +++ b/requirements.3.10.txt @@ -0,0 +1,93 @@ +absl-py==2.1.0 +appdirs==1.4.4 +astor==0.8.1 +astunparse==1.6.3 +cachetools==5.3.3 +certifi==2024.2.2 +charset-normalizer==3.3.2 +cloudpickle==3.0.0 +colorama==0.4.6 +contextlib2==21.6.0 +contourpy==1.2.0 +cycler==0.12.1 +dill==0.3.8 +#dustdas @ git+https://github.com/gglyptodon/dustdas@d95083163eae361853ad8ef967ed30224a9695ea +exceptiongroup==1.2.0 +filelock==3.11.0 +flatbuffers==24.3.7 +fonttools==4.50.0 +gast==0.5.4 +#geenuff @ git+https://github.com/weberlab-hhu/GeenuFF@702cbf3c2a8eba05dc2f26038a0d3aa0da8242b8 +google-auth==2.29.0 +google-auth-oauthlib==1.2.0 +google-pasta==0.2.0 +grpcio==1.62.1 +h5py==3.10.0 +#-e git+ssh://git@github-realname/weberlab-hhu/Helixer.git@887e09104cf0895f1e3937434ae75d0fc15ff21a#egg=helixer +HTSeq==2.0.5 +idna==3.6 +iniconfig==2.0.0 +intervaltree==3.1.0 +joblib==1.3.2 +json-tricks==3.17.3 +keras==2.15.0 +keras-layer-normalization==0.16.0 +kiwisolver==1.4.5 +libclang==18.1.1 +Markdown==3.6 +MarkupSafe==2.1.5 +matplotlib==3.8.3 +ml-dtypes==0.3.2 +multiprocess==0.70.16 +nni==2.10.1 +numcodecs==0.12.1 +numpy==1.26.4 +oauthlib==3.2.2 +opt-einsum==3.3.0 +packaging==24.0 +pandas==2.2.1 +pillow==10.2.0 +pluggy==1.4.0 +prettytable==3.10.0 +protobuf==4.25.3 +psutil==5.9.8 +pyasn1==0.5.1 +pyasn1-modules==0.3.0 +pyparsing==3.1.2 +pysam==0.22.0 +pytest==8.1.1 +python-dateutil==2.9.0.post0 +PythonWebHDFS==0.2.3 +pytz==2024.1 +PyYAML==6.0.1 +requests==2.31.0 +requests-oauthlib==2.0.0 +responses==0.25.0 +rsa==4.9 +schema==0.7.5 +scikit-learn==1.4.1.post1 +scipy==1.12.0 +seaborn==0.13.2 +simplejson==3.19.2 +six==1.16.0 +sortedcontainers==2.4.0 +SQLAlchemy==1.3.22 +tensorboard==2.15.2 +tensorboard-data-server==0.7.2 +tensorflow==2.15.1 +tensorflow-addons==0.23.0 +tensorflow-estimator==2.15.0 +tensorflow-io-gcs-filesystem==0.36.0 +termcolor==2.4.0 +terminaltables==3.1.10 +threadpoolctl==3.4.0 +tomli==2.0.1 +tqdm==4.66.2 +typeguard==2.13.3 +typing_extensions==4.10.0 +tzdata==2024.1 +urllib3==2.2.1 +wcwidth==0.2.13 +websockets==12.0 +Werkzeug==3.0.1 +wrapt==1.14.1 diff --git a/requirements.3.8.txt b/requirements.3.8.txt new file mode 100644 index 0000000..b1db28d --- /dev/null +++ b/requirements.3.8.txt @@ -0,0 +1,96 @@ +absl-py==2.1.0 +appdirs==1.4.4 +astor==0.8.1 +astunparse==1.6.3 +cachetools==5.3.3 +certifi==2024.2.2 +charset-normalizer==3.3.2 +cloudpickle==3.0.0 +colorama==0.4.6 +contextlib2==21.6.0 +contourpy==1.1.1 +cycler==0.12.1 +dill==0.3.8 +git+https://github.com/gglyptodon/dustdas@v0.2 +exceptiongroup==1.2.0 +filelock==3.11.0 +flatbuffers==24.3.7 +fonttools==4.50.0 +gast==0.4.0 +#geenuff==0.3.0 +google-auth==2.29.0 +google-auth-oauthlib==1.0.0 +google-pasta==0.2.0 +grpcio==1.62.1 +h5py==3.10.0 +#helixer==0.3.2 +HTSeq==2.0.5 +idna==3.6 +importlib-metadata==7.1.0 +importlib-resources==6.4.0 +iniconfig==2.0.0 +intervaltree==3.1.0 +joblib==1.3.2 +json-tricks==3.17.3 +keras==2.13.1 +keras-layer-normalization==0.16.0 +kiwisolver==1.4.5 +libclang==18.1.1 +Markdown==3.6 +MarkupSafe==2.1.5 +matplotlib==3.7.5 +multiprocess==0.70.16 +nni==3.0 +numcodecs==0.12.1 +numpy==1.24.3 +nvidia-ml-py==12.535.133 +oauthlib==3.2.2 +opt-einsum==3.3.0 +packaging==24.0 +pandas==2.0.3 +pillow==10.2.0 +pluggy==1.4.0 +prettytable==3.10.0 +protobuf==4.25.3 +psutil==5.9.8 +pyasn1==0.5.1 +pyasn1-modules==0.3.0 +pyparsing==3.1.2 +pysam==0.22.0 +pytest==8.1.1 +python-dateutil==2.9.0.post0 +PythonWebHDFS==0.2.3 +pytz==2024.1 +PyYAML==6.0.1 +requests==2.31.0 +requests-oauthlib==2.0.0 +responses==0.25.0 +rsa==4.9 +schema==0.7.5 +scikit-learn==1.3.2 +scipy==1.10.1 +seaborn==0.13.2 +simplejson==3.19.2 +six==1.16.0 +sortedcontainers==2.4.0 +SQLAlchemy==1.3.22 +tensorboard==2.13.0 +tensorboard-data-server==0.7.2 +tensorflow==2.13.1 +tensorflow-addons==0.21.0 +tensorflow-estimator==2.13.0 +tensorflow-io-gcs-filesystem==0.34.0 +termcolor==2.4.0 +terminaltables==3.1.10 +threadpoolctl==3.4.0 +tomli==2.0.1 +tqdm==4.66.2 +typeguard==4.1.2 +typing-extensions==4.10.0 +tzdata==2024.1 +urllib3==2.2.1 +wcwidth==0.2.13 +websockets==12.0 +werkzeug==3.0.1 +wrapt==1.16.0 +zipp==3.18.1 diff --git a/requirements.exact_pip_freeze.txt b/requirements.exact_pip_freeze.txt deleted file mode 100644 index 691632f..0000000 --- a/requirements.exact_pip_freeze.txt +++ /dev/null @@ -1,98 +0,0 @@ -absl-py==1.4.0 -appdirs==1.4.4 -astor==0.8.1 -astunparse==1.6.3 -cachetools==5.3.1 -certifi==2023.5.7 -charset-normalizer==3.2.0 -cloudpickle==2.2.1 -colorama==0.4.6 -contextlib2==21.6.0 -contourpy==1.1.0 -cycler==0.11.0 -Cython==0.29.36 -dill==0.3.6 -dustdas==0.1 -entrypoints==0.4 -exceptiongroup==1.1.2 -filelock==3.11.0 -flatbuffers==23.5.26 -fonttools==4.41.0 -gast==0.4.0 -geenuff==0.3.0 -google-auth==2.22.0 -google-auth-oauthlib==1.0.0 -google-pasta==0.2.0 -grpcio==1.56.0 -h5py==3.9.0 --e git+https://github.com/weberlab-hhu/Helixer.git@fbd1a6737eb24e007db0e753e709306f60d66b68#egg=helixer -HTSeq==2.0.3 -idna==3.4 -importlib-metadata==6.8.0 -importlib-resources==6.0.0 -iniconfig==2.0.0 -intervaltree==3.1.0 -joblib==1.3.1 -json-tricks==3.17.1 -keras==2.13.1 -keras-layer-normalization==0.16.0 -kiwisolver==1.4.4 -libclang==16.0.6 -Markdown==3.4.3 -MarkupSafe==2.1.3 -matplotlib==3.7.2 -multiprocess==0.70.14 -nni==2.10.1 -numcodecs==0.11.0 -numpy==1.24.4 -oauthlib==3.2.2 -opt-einsum==3.3.0 -packaging==23.1 -pandas==2.0.3 -Pillow==10.0.0 -pluggy==1.2.0 -prettytable==3.8.0 -protobuf==4.23.4 -psutil==5.9.5 -pyasn1==0.5.0 -pyasn1-modules==0.3.0 -pyparsing==3.0.9 -pysam==0.21.0 -pytest==7.4.0 -python-dateutil==2.8.2 -PythonWebHDFS==0.2.3 -pytz==2023.3 -PyYAML==6.0 -requests==2.31.0 -requests-oauthlib==1.3.1 -responses==0.23.1 -rsa==4.9 -schema==0.7.5 -scikit-learn==1.3.0 -scipy==1.10.1 -seaborn==0.12.2 -simplejson==3.19.1 -six==1.16.0 -sortedcontainers==2.4.0 -SQLAlchemy==1.3.22 -tensorboard==2.13.0 -tensorboard-data-server==0.7.1 -tensorflow==2.13.0 -tensorflow-addons==0.21.0 -tensorflow-estimator==2.13.0 -tensorflow-io-gcs-filesystem==0.32.0 -termcolor==2.3.0 -terminaltables==3.1.10 -threadpoolctl==3.2.0 -tomli==2.0.1 -tqdm==4.65.0 -typeguard==2.13.3 -types-PyYAML==6.0.12.10 -typing-extensions==4.5.0 -tzdata==2023.3 -urllib3==2.0.3 -wcwidth==0.2.6 -websockets==11.0.3 -Werkzeug==2.3.6 -wrapt==1.15.0 -zipp==3.16.2 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 88f2b6b..0000000 --- a/requirements.txt +++ /dev/null @@ -1,19 +0,0 @@ -sqlalchemy==1.3.22 -tensorflow>=2.6.2 -tensorflow_addons -nni -seaborn -Keras<3.0.0 -keras_layer_normalization -terminaltables -HTSeq -intervaltree -numpy -h5py -multiprocess -git+https://github.com/gglyptodon/dustdas@v0.2 -numcodecs -appdirs -# for testing only -pytest -requests diff --git a/setup.py b/setup.py index d40a9cf..fc3cf59 100644 --- a/setup.py +++ b/setup.py @@ -2,12 +2,27 @@ setup( name='helixer', - version='0.3.2', + version='0.3.3', description='Deep Learning fun on gene structure data', packages=['helixer', 'helixer.core', 'helixer.prediction', 'helixer.evaluation', 'helixer.tests', 'helixer.export'], package_data={'helixer': ['testdata/*.fa', 'testdata/*.gff']}, - install_requires=["geenuff @ https://github.com/weberlab-hhu/GeenuFF/archive/refs/heads/main.zip"], - dependency_links=["https://github.com/weberlab-hhu/GeenuFF/archive/refs/heads/main.zip#egg=geenuff"], + install_requires=["geenuff @ git+https://github.com/weberlab-hhu/GeenuFF@v0.3.2", + "sqlalchemy==1.3.22", + "tensorflow>=2.6.2", + "tensorflow-addons>=0.21.0", + "nni", + "seaborn", + "Keras<3.0.0", + "keras_layer_normalization", + "terminaltables", + "HTSeq", + "intervaltree", + "numpy", + "h5py", + "multiprocess", + "numcodecs", + "appdirs", + ], scripts=["Helixer.py", "fasta2h5.py", "geenuff2h5.py", "helixer/prediction/HybridModel.py", "scripts/fetch_helixer_models.py"], zip_safe=False, )