diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index f58e4c63..a138533e 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -7,5 +7,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: psf/black@stable + - name: Setup Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Run black + uses: psf/black@stable + + - name: Check for debugging print statements + run: | + if grep -rq "print(" mokapot; then + echo "Found the following print statements:" + grep -r "print(" mokapot + exit 1 + fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fb6d4aa..74476d11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog for mokapot +## [0.6.2] - 2021-03-12 +### Added +- Now checks to verify there are no debugging print statements in the code + base when linting. + +### Fixed +- Removed debugging print statements. + ## [0.6.1] - 2021-03-11 ### Fixed - Parsing Percolator tab-delimited files with a "DefaultDirection" line. diff --git a/mokapot/confidence.py b/mokapot/confidence.py index 5213c218..2ca812e1 100644 --- a/mokapot/confidence.py +++ b/mokapot/confidence.py @@ -453,7 +453,6 @@ def _assign_confidence(self, desc=True): scores[targets], scores[~targets], includeDecoys=True ) except SystemExit as msg: - print(msg) if "no decoy hits available for PEP calculation" in str(msg): pep = 0 else: diff --git a/mokapot/parsers/pin.py b/mokapot/parsers/pin.py index 69567cd0..a9186efd 100644 --- a/mokapot/parsers/pin.py +++ b/mokapot/parsers/pin.py @@ -87,14 +87,12 @@ def read_pin(pin_files, group_column=None, to_df=False, copy_data=False): raise ValueError(f"More than one '{name}' column found.") if not all([specid, peptides, proteins, labels, spectra]): - print([specid, peptides, proteins, labels, spectra]) raise ValueError( "This PIN format is incompatible with mokapot. Please" " verify that the required columns are present." ) # Convert labels to the correct format. - print(pin_df[labels[0]]) pin_df[labels[0]] = pin_df[labels[0]].astype(int) if any(pin_df[labels[0]] == -1): pin_df[labels[0]] = ((pin_df[labels[0]] + 1) / 2).astype(bool) @@ -148,7 +146,6 @@ def read_percolator(perc_file): psms = pd.concat((c for c in _parse_in_chunks(perc, cols)), copy=False) - print(psms.head()) return psms