Skip to content
Snippets Groups Projects
Commit 48d943b4 authored by schmittu's avatar schmittu :beer:
Browse files

fix before new release

parent 062d5c2c
Branches development
No related tags found
No related merge requests found
Pipeline #24970 failed
stages:
- style
- test_code
- update_docs
- release
check_style:
stage: style
image: sissource.ethz.ch:5005/sispub/emzed/linux_base_images/ubuntu_19_10_for_emzed
image:
name: registry.gitlab.com/emzed3/linux-base-images:ubuntu-23_04
entrypoint: [ '/bin/bash', '-c', 'ln -snf /bin/bash /bin/sh && /bin/bash -c $0' ]
tags:
- docker-executor
script:
......@@ -18,24 +20,38 @@ windows_tests:
stage: test_code
tags:
- windows
before_script:
- $VENV = [System.IO.Path]::GetRandomFileName()
- Set-Content -Path venv.txt -Value $VENV
parallel:
matrix:
- PYTHON_VERSION: [ '3.9.13', '3.10.11', '3.11.3' ]
script:
- Import-Module Pscx
- Import-VisualStudioVars 2017 x86
- set "CI_TMP=%temp%\%time::=.%.emzed.tmp"
- if (Test-Path venv) { Remove-Item venv -Recurse; }
- python -m venv venv
- venv/Scripts/python -m pip install -U pip setuptools
- venv/Scripts/pip install --extra-index-url https://pypi-sissource.ethz.ch/simple emzed3
- venv/Scripts/pip install -e .
- venv/Scripts/pip install -r requirements_dev.txt
- venv/Scripts/python -c 'import emzed_ext_mzmine2 as e; e.init()'
- venv/Scripts/pytest -s tests
- Invoke-Expression "C:/home/Administrator/.pyenv/pyenv-win/versions/${Env:PYTHON_VERSION}/python.exe -m venv $VENV"
- Invoke-Expression "${VENV}/Scripts/activate.ps1"
- python -m pip install -U pip setuptools
- pip install -e .
- pip install -r requirements_dev.txt
- python -c 'import emzed_ext_mzmine2 as e; e.init()'
- pytest -s tests
after_script:
- $VENV = Get-Content -Path venv.txt
- Remove-Item $VENV -Recurse
.ubuntu: &ubuntu
stage: test_code
tags:
- docker-executor
script: &ubuntu-script
- pip install --extra-index-url https://pypi-sissource.ethz.ch/simple emzed3
parallel:
matrix:
- PYTHON_VERSION: [ '3.9.17', '3.10.12', '3.11.4' ]
script:
- /.pyenv/versions/${PYTHON_VERSION}/bin/python -m venv venv
- source venv/bin/activate
- pip install -e .
- pip install -r requirements_dev.txt
- sleep ${SLEEP:-0}
......@@ -46,31 +62,27 @@ windows_tests:
- htmlcov/
ubuntu_19_10:
ubuntu_22_04:
<<: *ubuntu
image: sissource.ethz.ch:5005/sispub/emzed/linux_base_images/ubuntu_19_10_for_emzed
image: registry.gitlab.com/emzed3/linux-base-images:ubuntu-22_04
ubuntu_20_04:
ubuntu_23_04:
<<: *ubuntu
image: sissource.ethz.ch:5005/sispub/emzed/linux_base_images/ubuntu_20_04_for_emzed
script:
- *ubuntu-script
- make build_docs
artifacts:
paths:
- docs/_build/html
image: registry.gitlab.com/emzed3/linux-base-images:ubuntu-23_04
update_docs:
stage: update_docs
image: sissource.ethz.ch:5005/sispub/emzed/linux_base_images/ubuntu_20_04_for_emzed
stage: release
image: registry.gitlab.com/emzed3/linux-base-images:ubuntu-23_04
tags:
- docker-executor
script:
- chmod 0600 ${SSH_PRIVATE_KEY}
- scp -r -i ${SSH_PRIVATE_KEY} -o 'StrictHostKeyChecking no' docs/_build/html/* w3_emzed2@emzed.ethz.ch:htdocs/3/emzed.ext.mzmine2
dependencies:
- ubuntu_20_04
rules:
- if: '$CI_COMMIT_MESSAGE =~ /(\[VERSION\])|\[DOCS\]/'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- if: '$CI_COMMIT_MESSAGE =~ /\[VERSION\]/ && $CI_COMMIT_REF_NAME == "main"'
script:
- pip install -e .
- pip install -r requirements_dev.txt
- make build_docs
- chmod 0600 ${SSH_PRIVATE_KEY_EMZED_WEBSITE}
- rsync -e "ssh -o StrictHostKeyChecking=no -i ${SSH_PRIVATE_KEY_EMZED_WEBSITE}" -v docs/_build/html/* "w3_emzed2@emzed.ethz.ch:3/emzed.ext.mzmine2"
......@@ -9,15 +9,11 @@
set -x
set -e
#JDK_HOME=/Users/uweschmitt/Downloads/jdk-11.0.2.jdk/Contents/Home/
#JDK_HOME=/Library/Java/JavaVirtualMachines/openjdk-12.0.2.jdk/Contents/Home/
JDK_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
JAVAC=${JDK_HOME}/bin/javac
JAR=${JDK_HOME}/bin/jar
#MZMINE_JARS=~/Downloads/MZmine-2.51-macOS/lib
#MZMINE_JARS=~/Projects/mzmine2/build/MZmine-2.52-macOS/lib # /mzmine2-2.52.jar
MZMINE_JARS=$(cat ~/.emzed3/emzed.ext.mzmine2/mzmine2/mzmine2_home)/lib
echo ${MZMINE_JARS}
cd src/emzed_ext_mzmine2/java
......@@ -28,4 +24,10 @@ mkdir -p ${BUILD_ROOT}
cp *.java ${BUILD_ROOT}
${JAVAC} -Xlint:unchecked -cp "${MZMINE_JARS}/*" ${BUILD_ROOT}/*.java
echo
${JAR} cf extensions.jar ${BUILD_ROOT}/../../../../../ch
set +x
echo
echo
echo DONE
......@@ -6,7 +6,7 @@
# Distributed under terms of the MIT license.
#
isort -y --multi-line 3 -rc src tests benchmarks
isort src tests benchmarks
black src tests benchmarks
java -jar development_tools/google-java-format-1.7-all-deps.jar --replace src/emzed_ext_mzmine2/java/*.java
......
from setuptools import find_packages, setup
install_requires = ("requests", "emzed3>=0.0.45")
install_requires = ("requests", "emzed>=3.0.0a1")
setup(
name="emzed_ext_mzmine2",
......
No preview for this file type
......@@ -61,8 +61,9 @@ def remove_shoulder_peaks(peakmap, parameters):
peakmap_back = PeakMap.load(temp_file_out)
# the mzXML parser of mzmine2 rounds rt values, we fix this here:
for s, s_back in zip(pm_ms_1, peakmap_back):
s_back._set_rt(s.rt)
with peakmap_back.spectra_for_modification() as spectra_back:
for s, s_back in zip(pm_ms_1, spectra_back):
s_back._set_rt(s.rt)
peakmap_back.merge(pm_ms_else)
......
......@@ -10,3 +10,4 @@ done
ID=$(docker ps | grep runner | grep concurrent | grep build | cut -d " " -f 1)
docker exec -it ${ID} bash
docker stop ${ID}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment