Skip to content

Commit

Permalink
installation improvements and version (#121)
Browse files Browse the repository at this point in the history
* cleaning install & reqs

* lenient req where one can be

* consistency

* fix

* consistency again

* ok
  • Loading branch information
alisandra authored Mar 24, 2024
1 parent c4f4829 commit 5c83e2c
Show file tree
Hide file tree
Showing 8 changed files with 213 additions and 127 deletions.
4 changes: 2 additions & 2 deletions helixer/core/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand All @@ -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}

Expand Down
4 changes: 2 additions & 2 deletions helixer/export/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sqlite3
import datetime
import subprocess
import pkg_resources
from importlib.metadata import version

import geenuff
import helixer
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 2 additions & 3 deletions helixer/prediction/HelixerModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down
93 changes: 93 additions & 0 deletions requirements.3.10.txt
Original file line number Diff line number Diff line change
@@ -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
96 changes: 96 additions & 0 deletions requirements.3.8.txt
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
98 changes: 0 additions & 98 deletions requirements.exact_pip_freeze.txt

This file was deleted.

19 changes: 0 additions & 19 deletions requirements.txt

This file was deleted.

21 changes: 18 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]",
"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,
)

0 comments on commit 5c83e2c

Please sign in to comment.