Skip to content

Commit

Permalink
Merge pull request MannLabs#106 from MannLabs/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
swillems authored Apr 14, 2021
2 parents 82d2eb8 + 9b380a7 commit d9110e9
Show file tree
Hide file tree
Showing 27 changed files with 18,099 additions and 285 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,40 @@ on:
release_name:
description: 'Define release name'
required: true
body:
description: 'Define body'
required: true
prerelease:
description: 'Pre-Release?'
required: true
default: true
default: false
draft:
description: 'Draft?'
required: true
default: true

name: Create all Release
name: Create all GUI releases and publish on PyPi

jobs:
Create_Draft_Release:
Create_Draft_On_GitHub:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.draft_release.outputs.upload_url }}
steps:
- name: Create Release
id: create_release
- name: Draft Release
id: draft_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.event.inputs.release_name }}
release_name: Release ${{ github.event.inputs.release_name }}
body: Release ${{ github.event.inputs.body }}
draft: ${{ github.event.inputs.draft }}
prerelease: ${{ github.event.inputs.prerelease }}
Create_Linux_Release:
runs-on: ubuntu-latest
needs: Create_Draft_Release
needs: Create_Draft_On_GitHub
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -53,13 +59,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
asset_path: misc/one_click_linux/dist/alphatims_gui_installer_linux.deb
asset_name: alphatims_gui_installer_linux.deb
asset_content_type: application/octet-stream
Create_MacOS_Release:
runs-on: macos-latest
needs: Create_Draft_Release
needs: Create_Draft_On_GitHub
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -81,13 +87,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
asset_path: misc/one_click_macos/dist/alphatims_gui_installer_macos.pkg
asset_name: alphatims_gui_installer_macos.pkg
asset_content_type: application/octet-stream
Create_Windows_Release:
runs-on: windows-latest
needs: Create_Draft_Release
needs: Create_Draft_On_GitHub
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -102,19 +108,20 @@ jobs:
shell: bash -l {0}
run: |
cd misc/one_click_windows
. ./create_installer_windows.bat
# . ./create_installer_windows.bat
. ./create_installer_windows.sh
- name: Upload Windows Installer
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
asset_path: misc/one_click_windows/dist/alphatims_gui_installer_windows.exe
asset_name: alphatims_gui_installer_windows.exe
asset_content_type: application/octet-stream
Create_PyPi_Release:
runs-on: macos-latest
runs-on: ubuntu-latest
needs: [Create_Linux_Release, Create_MacOs_Release, Create_Windows_Release]
steps:
- name: Checkout code
Expand All @@ -126,7 +133,27 @@ jobs:
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Push release to PyPi
- name: Prepare distribution
shell: bash -l {0}
run: |
cd misc/one_click_windows
conda env create --force --name alphatims --file misc/conda_development_environment.yaml
conda activate alphatims
rm -rf dist
rm -rf build
python setup.py sdist bdist_wheel
twine check dist/*
conda deactivate
# - name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
56 changes: 0 additions & 56 deletions .github/workflows/release_linux.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,4 @@ misc/releases/*
misc/one_click_macos/alphatims.pkg
misc/one_click_macos/resources/LICENSE.txt
misc/one_click_macos/resources/alpha_logo.png
misc/one_click_windows/inno
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ A ddaPASEF dataset is available for [download from the release page](https://git

### DIA

The same sample was also acquired with diaPASEF and is also available for [download from the release page](https://github.com/MannLabs/alphatims/releases/download/0.1.210317/20201207_tims03_Evo03_PS_SA_HeLa_200ng_EvoSep_prot_high_speed_21min_8cm_S1-C8_1_22474.d.zip). The "high-speed" method (mass range: m/z 400 to 1000, 1/K0: 0.6 – 1.6 Vs cm- 2, diaPASEF windows: 8 x 25 Th) was used, as described in [Meier et al](https://www.nature.com/articles/s41592-020-00998-0).
The same sample was acquired with diaPASEF and is also available for [download from the release page](https://github.com/MannLabs/alphatims/releases/download/0.1.210317/20201207_tims03_Evo03_PS_SA_HeLa_200ng_EvoSep_prot_high_speed_21min_8cm_S1-C8_1_22474.d.zip). The "high-speed" method (mass range: m/z 400 to 1000, 1/K0: 0.6 – 1.6 Vs cm- 2, diaPASEF windows: 8 x 25 Th) was used, as described in [Meier et al](https://www.nature.com/articles/s41592-020-00998-0).

---
## Usage
Expand All @@ -170,7 +170,7 @@ There are three ways to use AlphaTims:
* [**CLI:**](#cli) This allows to incorporate AlphaTims in automated workflows.
* [**Python:**](#python-and-jupyter-notebooks) This allows to access data and explore it interactively.

The first time you use a fresh installation of AlphaTims is often quite slow because some functions might still need compilation on you local operating system and architecture. Subsequent use should be a lot faster.
NOTE: The first time you use a fresh installation of AlphaTims, it is often quite slow because some functions might still need compilation on you local operating system and architecture. Subsequent use should be a lot faster.

### GUI

Expand Down
2 changes: 1 addition & 1 deletion alphatims/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


__project__ = "alphatims"
__version__ = "0.2.0"
__version__ = "0.2.2"
__license__ = "Apache"
__description__ = "A Python package to index Bruker TimsTOF raw data for fast and easy accession and visualization"
__author__ = "Sander Willems, Eugenia Voytik"
Expand Down
2 changes: 1 addition & 1 deletion alphatims/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ def export_mgf(**kwargs):
@cli_option("quad_mz_bounds")
@cli_option("tof_mz_bounds")
@cli_option("intensity_bounds")
@cli_option("format")
@cli_option("x_axis")
@cli_option("y_axis")
@cli_option("format")
@cli_option("output_folder")
@cli_option("log_file")
@cli_option("threads")
Expand Down
Binary file modified alphatims/docs/gui_manual.pdf
Binary file not shown.
6 changes: 5 additions & 1 deletion misc/bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.0
current_version = 0.2.2
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand All @@ -15,12 +15,16 @@ serialize =

[bumpversion:file:one_click_linux/control]

[bumpversion:file:one_click_linux/create_installer_linux.sh]

[bumpversion:file:one_click_macos/distribution.xml]

[bumpversion:file:one_click_macos/Info.plist]

[bumpversion:file:one_click_macos/create_installer_macos.sh]

[bumpversion:file:one_click_windows/create_installer_windows.bat]

[bumpversion:file:one_click_windows/alphatims_innoinstaller.iss]
search = {current_version}
replace = {new_version}
Binary file modified misc/gui_manual.docx
Binary file not shown.
2 changes: 1 addition & 1 deletion misc/one_click_linux/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: AlphaTims
Version: 0.2.0
Version: 0.2.2
Architecture: all
Maintainer: Mann Labs <[email protected]>
Description: AlphaTims GUI
Expand Down
3 changes: 1 addition & 2 deletions misc/one_click_linux/create_installer_linux.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!bash
rm -rf dist
rm -rf build
conda env remove -n alphatimsinstaller
conda create -n alphatimsinstaller python=3.8 -y
# conda create -n alphatimsinstaller python=3.8
conda activate alphatimsinstaller
Expand All @@ -13,7 +12,7 @@ rm -rf dist
rm -rf build
python setup.py sdist bdist_wheel
cd misc/one_click_linux
pip install "../../dist/alphatims-0.2.0-py3-none-any.whl[plotting]"
pip install "../../dist/alphatims-0.2.2-py3-none-any.whl[plotting]"
pip install pyinstaller==4.2
pyinstaller ../pyinstaller/alphatims.spec -y
conda deactivate
Expand Down
4 changes: 2 additions & 2 deletions misc/one_click_macos/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>alphatims.0.2.0</string>
<string>alphatims.0.2.2</string>
<key>CFBundleShortVersionString</key>
<string>0.2.0</string>
<string>0.2.2</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
30 changes: 26 additions & 4 deletions misc/one_click_macos/create_installer_macos.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
rm -rf dist
rm -rf build
FILE=alphatims.pkg
if test -f "$FILE"; then
rm alphatims.pkg
fi
conda env remove -n alphatimsinstaller
conda create -n alphatimsinstaller python=3.8 -y
# conda create -n alphatimsinstaller python=3.8
Expand All @@ -12,8 +16,9 @@ rm -rf dist
rm -rf build
python setup.py sdist bdist_wheel
cd misc/one_click_macos
pip install "../../dist/alphatims-0.2.0-py3-none-any.whl[plotting]"
pip install pyinstaller==4.2
pip install "../../dist/alphatims-0.2.2-py3-none-any.whl[plotting]"
conda list
pyinstaller ../pyinstaller/alphatims.spec -y
conda deactivate
mkdir -p dist/alphatims/Contents/Resources
Expand All @@ -23,6 +28,23 @@ cp Info.plist dist/alphatims/Contents
cp alphatims_terminal dist/alphatims/Contents/MacOS
cp ../../LICENSE.txt Resources/LICENSE.txt
cp ../alpha_logo.png Resources/alpha_logo.png
pkgbuild --root dist/alphatims --identifier org.alphatims.0.2.0 --version 0.2.0 --install-location /Applications/AlphaTims.app --scripts scripts alphatims.pkg
productbuild --distribution distribution.xml --resources Resources --package-path alphatims.pkg dist/alphatims_gui_installer_macos.pkg
# productsign --sign "Developer ID Installer: John Doe" dist/alphatims_gui_installer_macos.pkg dist/alphatims_gui_installer_macos_signed.pkg

if false; then
# https://scriptingosx.com/2019/09/notarize-a-command-line-tool/
for f in $(find dist/alphatims -name '*.so' -or -name '*.dylib'); do codesign --sign "Developer ID Application: Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (7QSY5527AQ)" $f; done
codesign --sign "Developer ID Application: Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (7QSY5527AQ)" dist/alphatims/Contents/MacOS/alphatims_gui --force --options=runtime --entitlements entitlements.xml
pkgbuild --root dist/alphatims --identifier de.mpg.biochem.alphatims.app --version 0.2.2 --install-location /Applications/AlphaTims.app --scripts scripts alphatims.pkg --sign "Developer ID Installer: Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (7QSY5527AQ)"
productbuild --distribution distribution.xml --resources Resources --package-path alphatims.pkg dist/alphatims_gui_installer_macos.pkg --sign "Developer ID Installer: Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (7QSY5527AQ)"
requestUUID=$(xcrun altool --notarize-app --primary-bundle-id "de.mpg.biochem.alphatims.app" --username "[email protected]" --password "@keychain:Alphatims-develop" --asc-provider 7QSY5527AQ --file dist/alphatims_gui_installer_macos.pkg 2>&1 | awk '/RequestUUID/ { print $NF; }')
request_status="in progress"
while [[ "$request_status" == "in progress" ]]; do
echo "$request_status"
sleep 10
request_status=$(xcrun altool --notarization-info "$requestUUID" --username "[email protected]" --password "@keychain:Alphatims-develop" | awk -F ': ' '/Status:/ { print $2; }' )
done
xcrun altool --notarization-info "$requestUUID" --username "[email protected]" --password "@keychain:Alphatims-develop"
xcrun stapler staple dist/alphatims_gui_installer_macos.pkg
else
pkgbuild --root dist/alphatims --identifier de.mpg.biochem.alphatims.app --version 0.2.2 --install-location /Applications/AlphaTims.app --scripts scripts alphatims.pkg
productbuild --distribution distribution.xml --resources Resources --package-path alphatims.pkg dist/alphatims_gui_installer_macos.pkg
fi
2 changes: 1 addition & 1 deletion misc/one_click_macos/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>AlphaTims 0.2.0</title>
<title>AlphaTims 0.2.2</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
14 changes: 14 additions & 0 deletions misc/one_click_macos/entitlements.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion misc/one_click_windows/alphatims_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 "AlphaTims"
#define MyAppVersion "0.2.0"
#define MyAppVersion "0.2.2"
#define MyAppPublisher "Max Planck Institute of Biochemistry, Mann department"
#define MyAppURL "https://github.com/MannLabs/alphatims"
#define MyAppExeName "alphatims_gui.exe"
Expand Down
16 changes: 13 additions & 3 deletions misc/one_click_windows/create_installer_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,19 @@ call rmdir dist /s /q
call rmdir build /s /q
call python setup.py sdist bdist_wheel
call cd misc/one_click_windows
call pip install "../../dist/alphatims-0.2.0-py3-none-any.whl[plotting]"
call pip install "../../dist/alphatims-0.2.2-py3-none-any.whl[plotting]"
call pip install pyinstaller==4.2
call pyinstaller ../pyinstaller/alphatims.spec -y
call conda deactivate
call "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" alphatims_innoinstaller.iss
REM call iscc alphatims_innoinstaller.iss


if false; then
REM call mkdir inno
REM call pip install wget
REM call python -m wget https://jrsoftware.org/download.php/is.exe
call is.exe /SILENT /DIR=.
call inno\ISCC.exe alphatims_innoinstaller.iss
else
call "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" alphatims_innoinstaller.iss
REM call iscc alphatims_innoinstaller.iss
fi
Loading

0 comments on commit d9110e9

Please sign in to comment.