Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint #352

Merged
merged 7 commits into from
Jun 14, 2024
Merged

Lint #352

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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 .
22 changes: 17 additions & 5 deletions pyhdx/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
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__}"

try:
from pyhdx.output import FitReport
except ModuleNotFoundError:
pass


__all__ = [
"HDXTimepoint",
"HDXMeasurement",
"Coverage",
"HDXMeasurementSet",
"read_dynamx",
"TorchFitResult",
"TorchFitResultSet",
"FitReport",
]
2 changes: 1 addition & 1 deletion pyhdx/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion pyhdx/web/constructor.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
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
from pyhdx.web.sources import *
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

Expand Down
1 change: 0 additions & 1 deletion pyhdx/web/tools.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from bokeh.models.tools import *


supported_tools = {
"pan": PanTool,
"wheel_pan": WheelPanTool,
Expand Down
3 changes: 2 additions & 1 deletion templates/01_load_secb_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

# %%
Expand Down
Loading