Skip to content

Commit

Permalink
Merge pull request #38 from MannLabs/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
jalew188 authored Jan 4, 2024
2 parents 901f0b5 + d64afc6 commit 52c6e75
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.2.0
current_version = 1.3.0
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
4 changes: 2 additions & 2 deletions alphaviz/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!python

__project__ = "alphaviz"
__version__ = "1.2.0"
__version__ = "1.3.0"
__license__ = "Apache"
__description__ = "A interactive Dashboard to explore mass spectrometry data."
__author__ = "Eugenia Voytik"
Expand All @@ -16,7 +16,7 @@
"bioinformatics",
"visualization"
]
__python_version__ = ">=3.8,<3.9"
__python_version__ = ">=3.8,<3.12"
__classifiers__ = [
# "Development Status :: 1 - Planning",
# "Development Status :: 2 - Pre-Alpha",
Expand Down
3 changes: 0 additions & 3 deletions alphaviz/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import json
import warnings
import pandas as pd
from pandas.core.common import SettingWithCopyWarning
from io import StringIO

import alphatims.bruker
Expand All @@ -23,8 +22,6 @@
import alphaviz.preprocessing
import alphaviz.plotting

warnings.simplefilter(action="ignore", category=SettingWithCopyWarning)


def get_css_style(
file_name="dashboard_style.css",
Expand Down
2 changes: 1 addition & 1 deletion release/one_click_linux_gui/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: alphaviz
Version: 1.2.0
Version: 1.3.0
Architecture: all
Maintainer: Mann Labs <opensource@alphapept.com>
Description: alphaviz
Expand Down
2 changes: 1 addition & 1 deletion release/one_click_linux_gui/create_installer_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ python setup.py sdist bdist_wheel
# Setting up the local package
cd release/one_click_linux_gui
# Make sure you include the required extra packages and always use the stable or very-stable options!
pip install "../../dist/alphaviz-1.2.0-py3-none-any.whl[stable,gui-stable]"
pip install "../../dist/alphaviz-1.3.0-py3-none-any.whl[stable,gui-stable]"

# Creating the stand-alone pyinstaller folder
pip install pyinstaller==4.10
Expand Down
4 changes: 2 additions & 2 deletions release/one_click_macos_gui/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<key>CFBundleIconFile</key>
<string>alpha_logo.icns</string>
<key>CFBundleIdentifier</key>
<string>alphaviz.1.2.0</string>
<string>alphaviz.1.3.0</string>
<key>CFBundleShortVersionString</key>
<string>1.2.0</string>
<string>1.3.0</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
4 changes: 2 additions & 2 deletions release/one_click_macos_gui/create_installer_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ python setup.py sdist bdist_wheel

# Setting up the local package
cd release/one_click_macos_gui
pip install "../../dist/alphaviz-1.2.0-py3-none-any.whl[stable,gui-stable]"
pip install "../../dist/alphaviz-1.3.0-py3-none-any.whl[stable,gui-stable]"

# Creating the stand-alone pyinstaller folder
pip install pyinstaller==4.10
Expand All @@ -40,5 +40,5 @@ cp ../../LICENSE.txt Resources/LICENSE.txt
cp ../logos/alpha_logo.png Resources/alpha_logo.png
chmod 777 scripts/*

pkgbuild --root dist/alphaviz --identifier de.mpg.biochem.alphaviz.app --version 1.2.0 --install-location /Applications/alphaviz.app --scripts scripts alphaviz.pkg
pkgbuild --root dist/alphaviz --identifier de.mpg.biochem.alphaviz.app --version 1.3.0 --install-location /Applications/alphaviz.app --scripts scripts alphaviz.pkg
productbuild --distribution distribution.xml --resources Resources --package-path alphaviz.pkg dist/alphaviz_gui_installer_macos.pkg
2 changes: 1 addition & 1 deletion release/one_click_macos_gui/distribution.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-script minSpecVersion="1.000000">
<title>alphaviz 1.2.0</title>
<title>alphaviz 1.3.0</title>
<background mime-type="image/png" file="alpha_logo.png" scaling="proportional"/>
<welcome file="welcome.html" mime-type="text/html" />
<conclusion file="conclusion.html" mime-type="text/html" />
Expand Down
2 changes: 1 addition & 1 deletion release/one_click_windows_gui/alphaviz_innoinstaller.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "alphaviz"
#define MyAppVersion "1.2.0"
#define MyAppVersion "1.3.0"
#define MyAppPublisher "Max Planck Institute of Biochemistry and the University of Copenhagen, Mann Labs"
#define MyAppURL "https://github.com/MannLabs/alphaviz"
#define MyAppExeName "alphaviz_gui.exe"
Expand Down
6 changes: 3 additions & 3 deletions release/one_click_windows_gui/create_installer_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rm -rf dist
rm -rf build

# Creating a conda environment
conda create -n alphaviz_installer python=3.8 -y
conda create -n alphaviz_installer python=3.9 -y
conda activate alphaviz_installer

# Creating the wheel
Expand All @@ -17,10 +17,10 @@ python setup.py sdist bdist_wheel
# Setting up the local package
cd release/one_click_windows_gui
# Make sure you include the required extra packages and always use the stable or very-stable options!
pip install "../../dist/alphaviz-1.2.0-py3-none-any.whl[stable,gui-stable]"
pip install "../../dist/alphaviz-1.3.0-py3-none-any.whl[stable,gui-stable]"

# Creating the stand-alone pyinstaller folder
pip install pyinstaller==4.10
pip install pyinstaller
pyinstaller ../pyinstaller/alphaviz.spec -y
conda deactivate

Expand Down
35 changes: 23 additions & 12 deletions release/pyinstaller/alphaviz.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import pkg_resources
import importlib.metadata
import alphaviz

from PyInstaller.utils.hooks import copy_metadata
from transformers.dependency_versions_check import pkgs_to_check_at_runtime


##################### User definitions
exe_name = 'alphaviz_gui'
Expand Down Expand Up @@ -75,18 +78,26 @@ else:
hidden_imports = [h for h in hidden_imports if "__pycache__" not in h]
datas = [d for d in datas if ("__pycache__" not in d[0]) and (d[1] not in [".", "Resources", "scripts"])]

if sys.platform[:5] == "win32":
base_path = os.path.dirname(sys.executable)
library_path = os.path.join(base_path, "Library", "bin")
dll_path = os.path.join(base_path, "DLLs")
libcrypto_dll_path = os.path.join(dll_path, "libcrypto-1_1-x64.dll")
libssl_dll_path = os.path.join(dll_path, "libssl-1_1-x64.dll")
libcrypto_lib_path = os.path.join(library_path, "libcrypto-1_1-x64.dll")
libssl_lib_path = os.path.join(library_path, "libssl-1_1-x64.dll")
if not os.path.exists(libcrypto_dll_path):
datas.append((libcrypto_lib_path, "."))
if not os.path.exists(libssl_dll_path):
datas.append((libssl_lib_path, "."))
#if sys.platform[:5] == "win32":
# base_path = os.path.dirname(sys.executable)
# library_path = os.path.join(base_path, "Library", "bin")
# dll_path = os.path.join(base_path, "DLLs")
# libcrypto_dll_path = os.path.join(dll_path, "libcrypto-1_1-x64.dll")
# libssl_dll_path = os.path.join(dll_path, "libssl-1_1-x64.dll")
# libcrypto_lib_path = os.path.join(library_path, "libcrypto-1_1-x64.dll")
# libssl_lib_path = os.path.join(library_path, "libssl-1_1-x64.dll")
# if not os.path.exists(libcrypto_dll_path):
# datas.append((libcrypto_lib_path, "."))
# if not os.path.exists(libssl_dll_path):
# datas.append((libssl_lib_path, "."))

for _pkg in ["python","accelerate"]:
if _pkg in pkgs_to_check_at_runtime:
pkgs_to_check_at_runtime.remove(_pkg)
for _pkg in pkgs_to_check_at_runtime:
datas += copy_metadata(_pkg)

datas += copy_metadata('datashader')

a = Analysis(
[script_name],
Expand Down
4 changes: 1 addition & 3 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ peptdeep
alphabase
alpharaw

holoviews
xarray
dask
multipledispatch
plotly
plotly
12 changes: 4 additions & 8 deletions requirements/requirements_development.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
jupyter==1.0.0
jupyter_contrib_nbextensions==0.5.1
pyinstaller==4.10
autodocsumm==0.2.6
sphinx-rtd-theme==0.5.2
twine==3.4.1
bumpversion==0.6.0
pipdeptree==2.1.0
ipykernel==6.4.0
tqdm==4.61.1
psutil==5.8.0
pytest==6.2.5
tqdm
psutil
bumpversion
pyinstaller

pywin32; sys_platform=='win32'

alphatims
peptdeep
alphabase
4 changes: 0 additions & 4 deletions requirements/requirements_gui.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,3 @@ requests==2.27.1
#selenium
#chromedriver-binary
jinja2==3.0.2

alphatims
peptdeep
alphabase
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,7 @@ def create_pip_wheel():
entry_points={
"console_scripts": package2install.__console_scripts__,
},
install_requires=requirements + [
# TODO Remove hardcoded requirement?
"pywin32==225; sys_platform=='win32'"
],
install_requires=requirements,
extras_require=extra_requirements,
python_requires=package2install.__python_version__,
)
Expand Down

0 comments on commit 52c6e75

Please sign in to comment.