Skip to content

Commit

Permalink
explicite requirement txt for stable and loose
Browse files Browse the repository at this point in the history
  • Loading branch information
jalew188 committed Sep 12, 2024
1 parent d275dd4 commit 38dd362
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 15 deletions.
8 changes: 6 additions & 2 deletions peptdeep/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
"PyPi": __pypi__,
}
__extra_requirements__ = {
"development": "requirements_development.txt",
"gui": "requirements_gui.txt",
"development-stable": "development-stable.txt",
"gui-stable": "gui-stable.txt",
"hla-stable": "hla-stable.txt",
"development": "development.txt",
"gui": "gui.txt",
"hla": "hla.txt",
}
File renamed without changes.
20 changes: 20 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
pywin32; sys_platform=='win32'
pythonnet; sys_platform=='win32'

click
pandas
numpy<2
torch
tqdm
numba
psutil
biopython
transformers
scikit-learn
streamlit-aggrid
lxml
pyteomics

streamlit>=1.23.0
alphabase>=1.1.0
alpharaw>=0.2.0
File renamed without changes.
44 changes: 44 additions & 0 deletions requirements/development.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
pywin32; sys_platform=='win32'
pythonnet; sys_platform=='win32'

jupyter
twine
bumpversion
pipdeptree
ipykernel
tqdm
wget
pyinstaller

click
pandas
numpy<2
seaborn
matplotlib
numba
psutil
biopython
streamlit-aggrid # df interact
transformers
scikit-learn
lxml

# sphinx
autodocsumm
myst_parser
sphinx
nbsphinx
jinja2
contextfilter
furo

#--extra-index-url https://download.pytorch.org/whl/cu116
torch

streamlit>=1.23.0
alphabase>=1.1.0
alpharaw>=0.2.0

pytest
pre-commit==3.7.0
nbmake==1.5.3
File renamed without changes.
19 changes: 19 additions & 0 deletions requirements/gui.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pywin32; sys_platform=='win32'
pythonnet; sys_platform=='win32'

click
pandas
numpy<2
torch
tqdm
numba
psutil
biopython
transformers
scikit-learn
streamlit-aggrid
lxml

streamlit>=1.23.0
alphabase>=1.1.0
alpharaw>=0.2.0
File renamed without changes.
1 change: 1 addition & 0 deletions requirements/hla.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pydivsufsort # used by alphabase.protein.lcp_digest
15 changes: 2 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,16 @@ def get_long_description():
def get_requirements():
extra_requirements = {}
requirement_file_names = package2install.__extra_requirements__
requirement_file_names[""] = "requirements.txt"
requirement_file_names[""] = "base.txt"
for extra, requirement_file_name in requirement_file_names.items():
full_requirement_file_name = os.path.join(
"requirements",
requirement_file_name,
)
with open(full_requirement_file_name) as requirements_file:
if extra != "":
extra_stable = f"{extra}-stable"
else:
extra_stable = "stable"
extra_requirements[extra_stable] = []
extra_requirements[extra] = []
for line in requirements_file:
extra_requirements[extra_stable].append(line)
# conditional requirements like: pywin32; sys_platform=='win32'
line, *conditions = line.split(";")
requirement, *comparison = re.split("[><=~!]", line)
requirement = requirement.strip()
requirement = ";".join([requirement] + conditions)
extra_requirements[extra].append(requirement)
extra_requirements[extra].append(line)
requirements = extra_requirements.pop("")
return requirements, extra_requirements

Expand Down

0 comments on commit 38dd362

Please sign in to comment.