diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5f19725e..808f91ea 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,14 +1,13 @@ -name: Linting -on: [push] +name: Lint +on: [push, pull_request] jobs: - lint: + format: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: "3.9" - - run: python -m pip install black[jupyter] - - run: | - black . --check + - run: python -m pip install ruff + - run: ruff check . diff --git a/pyhdx/__init__.py b/pyhdx/__init__.py index 12af1371..acdffeb2 100644 --- a/pyhdx/__init__.py +++ b/pyhdx/__init__.py @@ -1,12 +1,12 @@ +from pyhdx.__version__ import __version__ +from pyhdx.datasets import read_dynamx +from pyhdx.fitting_torch import TorchFitResult, TorchFitResultSet from pyhdx.models import ( - HDXTimepoint, - HDXMeasurement, Coverage, + HDXMeasurement, HDXMeasurementSet, + HDXTimepoint, ) -from pyhdx.datasets import read_dynamx -from pyhdx.fitting_torch import TorchFitResult, TorchFitResultSet -from pyhdx.__version__ import __version__ VERSION_STRING = f"PyHDX {__version__}" @@ -14,3 +14,15 @@ from pyhdx.output import FitReport except ModuleNotFoundError: pass + + +__all__ = [ + "HDXTimepoint", + "HDXMeasurement", + "Coverage", + "HDXMeasurementSet", + "read_dynamx", + "TorchFitResult", + "TorchFitResultSet", + "FitReport", +] diff --git a/pyhdx/config.py b/pyhdx/config.py index faa22ead..2e6c446a 100644 --- a/pyhdx/config.py +++ b/pyhdx/config.py @@ -3,7 +3,7 @@ from contextlib import contextmanager from os import PathLike from pathlib import Path -from typing import Union, Dict, Any, Optional, Generator +from typing import Union, Any, Optional, Generator import torch from omegaconf import OmegaConf, DictConfig, DictKeyType diff --git a/pyhdx/web/constructor.py b/pyhdx/web/constructor.py index 46fa0ea9..1cf1a0d0 100644 --- a/pyhdx/web/constructor.py +++ b/pyhdx/web/constructor.py @@ -1,8 +1,10 @@ import collections +import param from distributed import Client from pyhdx.support import gen_subclasses +from pyhdx.web.cache import Cache from pyhdx.web.controllers import * from pyhdx.web.main_controllers import MainController from pyhdx.web.opts import OptsBase @@ -10,7 +12,6 @@ from pyhdx.web.tools import supported_tools from pyhdx.web.transforms import * from pyhdx.web.views import View -from pyhdx.web.cache import Cache element_count = 0 diff --git a/pyhdx/web/tools.py b/pyhdx/web/tools.py index 5f9ca5fd..498eb916 100644 --- a/pyhdx/web/tools.py +++ b/pyhdx/web/tools.py @@ -1,6 +1,5 @@ from bokeh.models.tools import * - supported_tools = { "pan": PanTool, "wheel_pan": WheelPanTool, diff --git a/templates/01_load_secb_data.py b/templates/01_load_secb_data.py index 7e1bcd9b..8e9a157c 100644 --- a/templates/01_load_secb_data.py +++ b/templates/01_load_secb_data.py @@ -4,8 +4,9 @@ import numpy as np -from pyhdx import HDXMeasurement, read_dynamx from pyhdx.datasets import filter_peptides +from pyhdx.fileIO import read_dynamx +from pyhdx.models import HDXMeasurement from pyhdx.process import apply_control, correct_d_uptake # %%