From b984a2cdcf1e021650dad56ee29b7ff58d21405d Mon Sep 17 00:00:00 2001 From: Ralf Date: Thu, 7 May 2020 23:42:21 +0200 Subject: [PATCH 1/2] Fix logging string formatting issues --- conversion_tools/maxquant_to_peprec.py | 2 +- ms2pip/ms2pipC.py | 6 +++--- setup.py | 22 +++++++++++----------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/conversion_tools/maxquant_to_peprec.py b/conversion_tools/maxquant_to_peprec.py index 5393bcf3..9162cb09 100644 --- a/conversion_tools/maxquant_to_peprec.py +++ b/conversion_tools/maxquant_to_peprec.py @@ -149,7 +149,7 @@ def scan_mgf(peprec, mgf_folder, filename_col='raw_file', scan_num_col='scan_num found = False if found and line[-4:] != '0.0\n': out.write(line) - logging.info("{}/{} spectra found and written to new MGF file.".format(count, len(peprec))) + logging.info("%i/%i spectra found and written to new MGF file.", count, len(peprec)) def ArgParse(): diff --git a/ms2pip/ms2pipC.py b/ms2pip/ms2pipC.py index 7a7bf665..a66a5cfa 100644 --- a/ms2pip/ms2pipC.py +++ b/ms2pip/ms2pipC.py @@ -762,8 +762,8 @@ def run(self): "{}_correlations.csv".format(self.output_filename), index=True ) logger.info( - "median correlations: %f", - correlations.groupby("ion")["pearsonr"].median(), + "median correlations: \n%s", + str(correlations.groupby("ion")["pearsonr"].median()), ) elif self.match_spectra: results = self._process_peptides() @@ -822,7 +822,7 @@ def _read_peptide_information(self): num_pep_filtered = num_pep - len(data) if num_pep_filtered > 0: logger.info( - "Removed {} unsupported peptide sequences (< 3, > 99 \ + "Removed %i unsupported peptide sequences (< 3, > 99 \ amino acids, or containing B, J, O, U, X or Z).", num_pep_filtered, ) diff --git a/setup.py b/setup.py index 47929ce9..e1ff7787 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,13 @@ -VERSION = "3.6.1" +import os +from glob import glob + +from setuptools import setup +from setuptools.extension import Extension +from Cython.Distutils import build_ext +import numpy + + +VERSION = "3.6.2.dev" NAME = "ms2pip" LICENSE = "apache-2.0" @@ -43,15 +52,6 @@ ] PYTHON_REQUIRES = ">=3.6,<4" -import os -from glob import glob - -from setuptools import setup -from setuptools.extension import Extension -from Cython.Distutils import build_ext -import numpy - - with open("README.md", "r") as fh: LONG_DESCRIPTION = fh.read() @@ -59,7 +59,7 @@ "ms2pip/cython_modules/ms2pip_pyx.c*", "ms2pip/cython_modules/ms2pip_pyx.so", ] -_ = [[os.remove(f) for f in glob(pat)] for pat in to_remove] +#_ = [[os.remove(f) for f in glob(pat)] for pat in to_remove] extensions = [ Extension( From 00cf360c9fd1641589f63021fba4884ff53d8f70 Mon Sep 17 00:00:00 2001 From: Ralf Date: Thu, 7 May 2020 23:44:03 +0200 Subject: [PATCH 2/2] Update upload-artifact action to v2 --- .github/workflows/build_and_publish.yaml | 2 +- .github/workflows/test.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_publish.yaml b/.github/workflows/build_and_publish.yaml index 81de795a..d1088e8c 100644 --- a/.github/workflows/build_and_publish.yaml +++ b/.github/workflows/build_and_publish.yaml @@ -49,7 +49,7 @@ jobs: twine upload wheelhouse/ms2pip*-manylinux1_x86_64.whl twine upload dist/*.tar.gz - - uses: actions/upload-artifact@v2-preview + - uses: actions/upload-artifact@v2 with: name: wheels path: wheelhouse/ms2pip*-manylinux1_x86_64.whl diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a246e29d..9f30cf2e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,8 +34,7 @@ jobs: - name: Test with pytest run: | pytest - - uses: actions/upload-artifact@v2-preview + - uses: actions/upload-artifact@v2 with: name: wheels path: dist/ms2pip*.whl - \ No newline at end of file