diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 226f246..9b37b5b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.x' - name: Install dependencies @@ -27,7 +27,7 @@ jobs: run: | python -m build --sdist --wheel . - name: Store the distribution packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: python-package-distributions path: dist/ @@ -47,7 +47,7 @@ jobs: steps: - name: Download all the dists - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: python-package-distributions path: dist/ diff --git a/crema/__init__.py b/crema/__init__.py index cdcccf3..1acd42f 100644 --- a/crema/__init__.py +++ b/crema/__init__.py @@ -1,4 +1,5 @@ """Initialize the crema package.""" + try: from importlib.metadata import version, PackageNotFoundError diff --git a/crema/confidence.py b/crema/confidence.py index a583698..cc45d9f 100644 --- a/crema/confidence.py +++ b/crema/confidence.py @@ -1,6 +1,7 @@ """The :py:class:`Confidence` class is used to define a collection of peptide-spectrum matches with calculated false discovery rates (FDR) and q-values. """ + import logging import numpy as np import pandas as pd diff --git a/crema/crema.py b/crema/crema.py index 3071bcd..60b1116 100644 --- a/crema/crema.py +++ b/crema/crema.py @@ -1,6 +1,7 @@ """ This is the command line interface for crema """ + import os import sys import time diff --git a/crema/dataset.py b/crema/dataset.py index 42bd7bc..da89481 100644 --- a/crema/dataset.py +++ b/crema/dataset.py @@ -1,6 +1,7 @@ """The :py:class:`PsmDataset` class is used to define a collection of peptide-spectrum matches. """ + import logging from .confidence import TdcConfidence diff --git a/crema/params.py b/crema/params.py index 23bd83e..b209de0 100644 --- a/crema/params.py +++ b/crema/params.py @@ -1,6 +1,7 @@ """The :py:class:`Params` class is used to define the details and arguments necessary for running crema from the command line. """ + import argparse import textwrap from . import __version__ diff --git a/crema/parsers/comet.py b/crema/parsers/comet.py index e532015..86f59c5 100644 --- a/crema/parsers/comet.py +++ b/crema/parsers/comet.py @@ -1,4 +1,5 @@ """A parser for Comet output""" + import re import logging diff --git a/crema/parsers/msamanda.py b/crema/parsers/msamanda.py index dfe6d83..8e01c0f 100644 --- a/crema/parsers/msamanda.py +++ b/crema/parsers/msamanda.py @@ -1,4 +1,5 @@ """A parser for the MSAmanda tab-delimited format""" + import re import logging diff --git a/crema/parsers/msfragger.py b/crema/parsers/msfragger.py index 9cc6f0d..17b8af4 100644 --- a/crema/parsers/msfragger.py +++ b/crema/parsers/msfragger.py @@ -1,4 +1,5 @@ """A parser for the MSFragger tab-delimited format""" + import re import logging diff --git a/crema/parsers/msgf.py b/crema/parsers/msgf.py index 5f3bc7d..d848003 100644 --- a/crema/parsers/msgf.py +++ b/crema/parsers/msgf.py @@ -1,4 +1,5 @@ """A parser for the MSGF+ tab-delimited format""" + import re import logging diff --git a/crema/parsers/mztab.py b/crema/parsers/mztab.py index 4a72c5d..2810081 100644 --- a/crema/parsers/mztab.py +++ b/crema/parsers/mztab.py @@ -1,4 +1,5 @@ """This module contains the parser for PSMs in mzTab format""" + import logging import pandas as pd diff --git a/crema/parsers/pepxml.py b/crema/parsers/pepxml.py index 742b3ee..fbac909 100644 --- a/crema/parsers/pepxml.py +++ b/crema/parsers/pepxml.py @@ -2,6 +2,7 @@ This module contains the parser for PSMs in pepXML format. This code is heavily based on Will Fondrie's Mokapot pepxml parser code """ + import logging from lxml import etree from functools import partial diff --git a/crema/parsers/tide.py b/crema/parsers/tide.py index 18fd330..2dd3345 100644 --- a/crema/parsers/tide.py +++ b/crema/parsers/tide.py @@ -1,4 +1,5 @@ """A parser for the Tide tab-delimited format""" + import re import logging diff --git a/crema/parsers/txt.py b/crema/parsers/txt.py index 40bc6b4..4631afd 100644 --- a/crema/parsers/txt.py +++ b/crema/parsers/txt.py @@ -1,4 +1,5 @@ """A parser for generic delmited text files.""" + import logging import pandas as pd diff --git a/crema/qvalues.py b/crema/qvalues.py index d17742a..8421d72 100644 --- a/crema/qvalues.py +++ b/crema/qvalues.py @@ -1,6 +1,7 @@ """ This module estimates q-values. """ + import logging import numpy as np diff --git a/crema/utils.py b/crema/utils.py index bd0ef98..9f4f12a 100644 --- a/crema/utils.py +++ b/crema/utils.py @@ -1,4 +1,5 @@ """Utility functions that are used in multiple modules""" + import pandas as pd import logging diff --git a/crema/writers/txt.py b/crema/writers/txt.py index 778e5a1..5eedfab 100644 --- a/crema/writers/txt.py +++ b/crema/writers/txt.py @@ -1,4 +1,5 @@ """Writer to save results in a tab-delmited format""" + from pathlib import Path from collections import defaultdict diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a4ea9c3..b994b52 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -3,7 +3,8 @@ ## [Unreleased] ### Fixed -## [0.0.10] - 2024-02-01 +## [0.0.10] - 2024-02-21 +- Upgraded Github action versions - Updated CLI documentation - Removed protein field requirement from create\_pairing\_from\_file function diff --git a/setup.py b/setup.py index 2865e37..77793d5 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ """ Setup the crema package. """ + import setuptools setuptools.setup() diff --git a/tests/conftest.py b/tests/conftest.py index f4bd26e..d8088a8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ """Fixtures that are used in multiple tests""" + from pathlib import Path import pytest diff --git a/tests/system_tests/test_cli.py b/tests/system_tests/test_cli.py index 64f29f5..a0424cc 100644 --- a/tests/system_tests/test_cli.py +++ b/tests/system_tests/test_cli.py @@ -1,4 +1,5 @@ """These tests verify that the crema CLI works as expected.""" + from pathlib import Path import subprocess diff --git a/tests/system_tests/test_crux_tdc.py b/tests/system_tests/test_crux_tdc.py index aed05c2..8d891c8 100644 --- a/tests/system_tests/test_crux_tdc.py +++ b/tests/system_tests/test_crux_tdc.py @@ -1,4 +1,5 @@ """These tests verify that confidence estimates are correctly produced via tdc through various parsers""" + import unittest import numpy as np diff --git a/tests/unit_tests/test_confidence.py b/tests/unit_tests/test_confidence.py index d7e83ff..c25b986 100644 --- a/tests/unit_tests/test_confidence.py +++ b/tests/unit_tests/test_confidence.py @@ -1,6 +1,7 @@ """ These tests verify the confidence implementations function as expected """ + import pytest import numpy as np diff --git a/tests/unit_tests/test_dataset.py b/tests/unit_tests/test_dataset.py index 8bbe274..b3ccc33 100644 --- a/tests/unit_tests/test_dataset.py +++ b/tests/unit_tests/test_dataset.py @@ -1,6 +1,7 @@ """ These are unit tests for the PSM Dataset Class: """ + import pytest import numpy as np import pandas as pd diff --git a/tests/unit_tests/test_parsers.py b/tests/unit_tests/test_parsers.py index 5968b62..d8db01e 100644 --- a/tests/unit_tests/test_parsers.py +++ b/tests/unit_tests/test_parsers.py @@ -1,6 +1,7 @@ """ These are unit tests for functions within parsers.py: """ + import pytest import pandas as pd diff --git a/tests/unit_tests/test_qvalues.py b/tests/unit_tests/test_qvalues.py index e63d41d..0d631bb 100644 --- a/tests/unit_tests/test_qvalues.py +++ b/tests/unit_tests/test_qvalues.py @@ -1,6 +1,7 @@ """ These tests verify that our q-value calculations are correct. """ + import logging import pytest