Skip to content

Commit 5c83e2c

Browse files
authored
installation improvements and version (#121)
* cleaning install & reqs * lenient req where one can be * consistency * fix * consistency again * ok
1 parent c4f4829 commit 5c83e2c

8 files changed

Lines changed: 213 additions & 127 deletions

File tree

helixer/core/scripts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from pprint import pprint
55
from termcolor import colored
66
from abc import ABC, abstractmethod
7-
7+
from importlib.metadata import version
88

99
class ParameterParser(ABC):
1010
"""Bundles code that parses script parameters from the command line and a config file."""
@@ -26,7 +26,7 @@ def __init__(self, config_file_path=''):
2626
self.data_group.add_argument('--no-multiprocess', action='store_true',
2727
help='Whether to not parallize the numerification of large sequences. Uses half the memory '
2828
'but can be much slower when many CPU cores can be utilized.')
29-
29+
self.parser.add_argument('--version', action='version', version='%(prog)s ' + version('helixer'))
3030
# Default values have to be specified - and potentially added - here
3131
self.defaults = {'compression': 'gzip', 'no_multiprocess': False}
3232

helixer/export/exporter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import sqlite3
66
import datetime
77
import subprocess
8-
import pkg_resources
8+
from importlib.metadata import version
99

1010
import geenuff
1111
import helixer
@@ -86,7 +86,7 @@ def _add_data_attrs(self):
8686
strip().decode()
8787
except subprocess.CalledProcessError:
8888
attrs[module.__name__ + '_commit'] = 'commit not found, version: {}'.format(
89-
pkg_resources.require(module.__name__)[0].version
89+
version(module.__name__)
9090
)
9191
print('logged installed version in place of git commit for {}'.format(module.__name__))
9292
os.chdir(pwd)

helixer/prediction/HelixerModel.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import numcodecs
1515
import argparse
1616
import datetime
17-
import pkg_resources
17+
from importlib.metadata import version
1818
import subprocess
1919
import numpy as np
2020
import tensorflow as tf
@@ -913,8 +913,7 @@ def _print_model_info(self, model):
913913
commit = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip().decode()
914914
print(f'Current Helixer branch: {branch} ({commit})')
915915
except subprocess.CalledProcessError:
916-
version = pkg_resources.require('helixer')[0].version
917-
print(f'Current Helixer version: {version}')
916+
print(f'Current Helixer version: {version("helixer")}')
918917

919918
try:
920919
if os.path.isfile(self.load_model_path):

requirements.3.10.txt

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
absl-py==2.1.0
2+
appdirs==1.4.4
3+
astor==0.8.1
4+
astunparse==1.6.3
5+
cachetools==5.3.3
6+
certifi==2024.2.2
7+
charset-normalizer==3.3.2
8+
cloudpickle==3.0.0
9+
colorama==0.4.6
10+
contextlib2==21.6.0
11+
contourpy==1.2.0
12+
cycler==0.12.1
13+
dill==0.3.8
14+
#dustdas @ git+https://github.com/gglyptodon/dustdas@d95083163eae361853ad8ef967ed30224a9695ea
15+
exceptiongroup==1.2.0
16+
filelock==3.11.0
17+
flatbuffers==24.3.7
18+
fonttools==4.50.0
19+
gast==0.5.4
20+
#geenuff @ git+https://github.com/weberlab-hhu/GeenuFF@702cbf3c2a8eba05dc2f26038a0d3aa0da8242b8
21+
google-auth==2.29.0
22+
google-auth-oauthlib==1.2.0
23+
google-pasta==0.2.0
24+
grpcio==1.62.1
25+
h5py==3.10.0
26+
#-e git+ssh://git@github-realname/weberlab-hhu/Helixer.git@887e09104cf0895f1e3937434ae75d0fc15ff21a#egg=helixer
27+
HTSeq==2.0.5
28+
idna==3.6
29+
iniconfig==2.0.0
30+
intervaltree==3.1.0
31+
joblib==1.3.2
32+
json-tricks==3.17.3
33+
keras==2.15.0
34+
keras-layer-normalization==0.16.0
35+
kiwisolver==1.4.5
36+
libclang==18.1.1
37+
Markdown==3.6
38+
MarkupSafe==2.1.5
39+
matplotlib==3.8.3
40+
ml-dtypes==0.3.2
41+
multiprocess==0.70.16
42+
nni==2.10.1
43+
numcodecs==0.12.1
44+
numpy==1.26.4
45+
oauthlib==3.2.2
46+
opt-einsum==3.3.0
47+
packaging==24.0
48+
pandas==2.2.1
49+
pillow==10.2.0
50+
pluggy==1.4.0
51+
prettytable==3.10.0
52+
protobuf==4.25.3
53+
psutil==5.9.8
54+
pyasn1==0.5.1
55+
pyasn1-modules==0.3.0
56+
pyparsing==3.1.2
57+
pysam==0.22.0
58+
pytest==8.1.1
59+
python-dateutil==2.9.0.post0
60+
PythonWebHDFS==0.2.3
61+
pytz==2024.1
62+
PyYAML==6.0.1
63+
requests==2.31.0
64+
requests-oauthlib==2.0.0
65+
responses==0.25.0
66+
rsa==4.9
67+
schema==0.7.5
68+
scikit-learn==1.4.1.post1
69+
scipy==1.12.0
70+
seaborn==0.13.2
71+
simplejson==3.19.2
72+
six==1.16.0
73+
sortedcontainers==2.4.0
74+
SQLAlchemy==1.3.22
75+
tensorboard==2.15.2
76+
tensorboard-data-server==0.7.2
77+
tensorflow==2.15.1
78+
tensorflow-addons==0.23.0
79+
tensorflow-estimator==2.15.0
80+
tensorflow-io-gcs-filesystem==0.36.0
81+
termcolor==2.4.0
82+
terminaltables==3.1.10
83+
threadpoolctl==3.4.0
84+
tomli==2.0.1
85+
tqdm==4.66.2
86+
typeguard==2.13.3
87+
typing_extensions==4.10.0
88+
tzdata==2024.1
89+
urllib3==2.2.1
90+
wcwidth==0.2.13
91+
websockets==12.0
92+
Werkzeug==3.0.1
93+
wrapt==1.14.1

requirements.3.8.txt

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
absl-py==2.1.0
2+
appdirs==1.4.4
3+
astor==0.8.1
4+
astunparse==1.6.3
5+
cachetools==5.3.3
6+
certifi==2024.2.2
7+
charset-normalizer==3.3.2
8+
cloudpickle==3.0.0
9+
colorama==0.4.6
10+
contextlib2==21.6.0
11+
contourpy==1.1.1
12+
cycler==0.12.1
13+
dill==0.3.8
14+
git+https://github.com/gglyptodon/dustdas@v0.2
15+
exceptiongroup==1.2.0
16+
filelock==3.11.0
17+
flatbuffers==24.3.7
18+
fonttools==4.50.0
19+
gast==0.4.0
20+
#geenuff==0.3.0
21+
google-auth==2.29.0
22+
google-auth-oauthlib==1.0.0
23+
google-pasta==0.2.0
24+
grpcio==1.62.1
25+
h5py==3.10.0
26+
#helixer==0.3.2
27+
HTSeq==2.0.5
28+
idna==3.6
29+
importlib-metadata==7.1.0
30+
importlib-resources==6.4.0
31+
iniconfig==2.0.0
32+
intervaltree==3.1.0
33+
joblib==1.3.2
34+
json-tricks==3.17.3
35+
keras==2.13.1
36+
keras-layer-normalization==0.16.0
37+
kiwisolver==1.4.5
38+
libclang==18.1.1
39+
Markdown==3.6
40+
MarkupSafe==2.1.5
41+
matplotlib==3.7.5
42+
multiprocess==0.70.16
43+
nni==3.0
44+
numcodecs==0.12.1
45+
numpy==1.24.3
46+
nvidia-ml-py==12.535.133
47+
oauthlib==3.2.2
48+
opt-einsum==3.3.0
49+
packaging==24.0
50+
pandas==2.0.3
51+
pillow==10.2.0
52+
pluggy==1.4.0
53+
prettytable==3.10.0
54+
protobuf==4.25.3
55+
psutil==5.9.8
56+
pyasn1==0.5.1
57+
pyasn1-modules==0.3.0
58+
pyparsing==3.1.2
59+
pysam==0.22.0
60+
pytest==8.1.1
61+
python-dateutil==2.9.0.post0
62+
PythonWebHDFS==0.2.3
63+
pytz==2024.1
64+
PyYAML==6.0.1
65+
requests==2.31.0
66+
requests-oauthlib==2.0.0
67+
responses==0.25.0
68+
rsa==4.9
69+
schema==0.7.5
70+
scikit-learn==1.3.2
71+
scipy==1.10.1
72+
seaborn==0.13.2
73+
simplejson==3.19.2
74+
six==1.16.0
75+
sortedcontainers==2.4.0
76+
SQLAlchemy==1.3.22
77+
tensorboard==2.13.0
78+
tensorboard-data-server==0.7.2
79+
tensorflow==2.13.1
80+
tensorflow-addons==0.21.0
81+
tensorflow-estimator==2.13.0
82+
tensorflow-io-gcs-filesystem==0.34.0
83+
termcolor==2.4.0
84+
terminaltables==3.1.10
85+
threadpoolctl==3.4.0
86+
tomli==2.0.1
87+
tqdm==4.66.2
88+
typeguard==4.1.2
89+
typing-extensions==4.10.0
90+
tzdata==2024.1
91+
urllib3==2.2.1
92+
wcwidth==0.2.13
93+
websockets==12.0
94+
werkzeug==3.0.1
95+
wrapt==1.16.0
96+
zipp==3.18.1

requirements.exact_pip_freeze.txt

Lines changed: 0 additions & 98 deletions
This file was deleted.

requirements.txt

Lines changed: 0 additions & 19 deletions
This file was deleted.

setup.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,27 @@
22

33
setup(
44
name='helixer',
5-
version='0.3.2',
5+
version='0.3.3',
66
description='Deep Learning fun on gene structure data',
77
packages=['helixer', 'helixer.core', 'helixer.prediction', 'helixer.evaluation', 'helixer.tests', 'helixer.export'],
88
package_data={'helixer': ['testdata/*.fa', 'testdata/*.gff']},
9-
install_requires=["geenuff @ https://github.com/weberlab-hhu/GeenuFF/archive/refs/heads/main.zip"],
10-
dependency_links=["https://github.com/weberlab-hhu/GeenuFF/archive/refs/heads/main.zip#egg=geenuff"],
9+
install_requires=["geenuff @ git+https://github.com/weberlab-hhu/GeenuFF@v0.3.2",
10+
"sqlalchemy==1.3.22",
11+
"tensorflow>=2.6.2",
12+
"tensorflow-addons>=0.21.0",
13+
"nni",
14+
"seaborn",
15+
"Keras<3.0.0",
16+
"keras_layer_normalization",
17+
"terminaltables",
18+
"HTSeq",
19+
"intervaltree",
20+
"numpy",
21+
"h5py",
22+
"multiprocess",
23+
"numcodecs",
24+
"appdirs",
25+
],
1126
scripts=["Helixer.py", "fasta2h5.py", "geenuff2h5.py", "helixer/prediction/HybridModel.py", "scripts/fetch_helixer_models.py"],
1227
zip_safe=False,
1328
)

0 commit comments

Comments
 (0)