Skip to content
Merged
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
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,19 @@ jobs:
run: |
sudo apt-get update -qq
python -m pip install --upgrade pip
python -m pip install flake8 pytest coveralls
python -m pip install ruff flake8 pytest coveralls
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: install package
run: |
pip install .
pip list


- name: Lint with ruff
run: |
ruff check .
ruff format --check .

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.0
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
14 changes: 12 additions & 2 deletions BGlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@
.. autosummary::
:toctree: _autosummary
"""

from importlib import import_module

from .__version__ import version as __version__
from . import be, gmode, misc

__all__ = ['__version__', 'be', 'gmode', 'misc']
__all__ = ["__version__", "be", "gmode", "misc"]


def __getattr__(name):
if name in {"be", "gmode", "misc"}:
module = import_module(f"{__name__}.{name}")
globals()[name] = module
return module
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
4 changes: 2 additions & 2 deletions BGlib/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = '0.0.5'
time = '2024-08-27 10:43:00'
version = "0.0.5"
time = "2024-08-27 10:43:00"
2 changes: 1 addition & 1 deletion BGlib/be/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@

from . import analysis, translators, viz

__all__ = ['analysis', 'translators', 'viz']
__all__ = ["analysis", "translators", "viz"]
2 changes: 1 addition & 1 deletion BGlib/be/analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
from .be_loop_fitter import BELoopFitter
from .be_relax_fit import BERelaxFit

__all__ = ['Fitter', 'BESHOfitter', 'BELoopFitter', 'utils', 'BERelaxFit']
__all__ = ["Fitter", "BESHOfitter", "BELoopFitter", "utils", "BERelaxFit"]
Loading
Loading