Skip to content

Commit

Permalink
lowercase files
Browse files Browse the repository at this point in the history
  • Loading branch information
APN-Pucky committed Oct 11, 2024
1 parent 36b767b commit 822a579
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 17 deletions.
4 changes: 3 additions & 1 deletion src/babyyoda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
from .read import read, read_grogu, read_yoda
from .util import loc, overflow, underflow, rebin

from .Histo1D import Histo1D
from .histo1D import Histo1D
from .histo2D import Histo2D

__all__ = [
"Histo1D",
"Histo2D",
"read",
"loc",
"overflow",
Expand Down
4 changes: 2 additions & 2 deletions src/babyyoda/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import re
from histoprint import print_hist

from babyyoda.Histo1D import Histo1D
from babyyoda.Histo2D import Histo2D
from babyyoda.histo1D import Histo1D
from babyyoda.histo2D import Histo2D


def main():
Expand Down
9 changes: 7 additions & 2 deletions src/babyyoda/Histo1D.py → src/babyyoda/histo1D.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, *args, backend=None, **kwargs):

backend = yoda.Histo1D
except ImportError:
backend = babyyoda.grogu.histo1d_v3
backend = babyyoda.grogu.Histo1D_v3
target = backend(*args, **kwargs)

# unwrap target
Expand Down Expand Up @@ -269,7 +269,12 @@ def plot(self, *args, binwnorm=1.0, **kwargs):
import mplhep as hep

hep.histplot(
self, *args, yerr=self.variances() ** 0.5, binwnorm=binwnorm, **kwargs
self,
*args,
yerr=self.variances() ** 0.5,
w2method="sqrt",
binwnorm=binwnorm,
**kwargs,
)

def _ipython_display_(self):
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/babyyoda/read.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import warnings

from babyyoda import grogu
from babyyoda.Histo1D import Histo1D
from babyyoda.Histo2D import Histo2D
from babyyoda.histo1D import Histo1D
from babyyoda.histo2D import Histo2D


def read(file_path: str):
Expand Down
2 changes: 1 addition & 1 deletion tests/babyyoda/test_histo1d.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from babyyoda.Histo1D import Histo1D
from babyyoda.histo1D import Histo1D
from babyyoda.test import assert_equal_histo1d

import babyyoda.grogu as grogu
Expand Down
2 changes: 1 addition & 1 deletion tests/babyyoda/uhi/test_by_histo1d_access.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from babyyoda.Histo1D import Histo1D
from babyyoda.histo1D import Histo1D
from babyyoda.test import assert_value1d

import babyyoda
Expand Down
2 changes: 1 addition & 1 deletion tests/babyyoda/uhi/test_by_histo1d_slicing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from babyyoda.Histo1D import Histo1D
from babyyoda.histo1D import Histo1D
from babyyoda.test import assert_equal_histo1d

import babyyoda
Expand Down
2 changes: 1 addition & 1 deletion tests/grogu/uhi/test_gg_histo1d_setting.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from babyyoda.Histo1D import Histo1D
from babyyoda.histo1D import Histo1D
import babyyoda.grogu as yoda
from babyyoda.util import loc, overflow, underflow

Expand Down
2 changes: 1 addition & 1 deletion tests/grogu/uhi/test_gg_histo1d_slicing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from babyyoda.Histo1D import Histo1D
from babyyoda.histo1D import Histo1D
import babyyoda.grogu as yoda
from babyyoda.test import assert_equal_histo1d
from babyyoda.util import loc, overflow, underflow
Expand Down
4 changes: 2 additions & 2 deletions tests/yoda/test_yoda_vs_grogu.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
import babyyoda as by
from babyyoda.Histo1D import Histo1D
from babyyoda.Histo2D import Histo2D
from babyyoda.histo1D import Histo1D
from babyyoda.histo2D import Histo2D
from babyyoda.grogu.histo1d_v2 import GROGU_HISTO1D_V2
from babyyoda.grogu.histo2d_v2 import GROGU_HISTO2D_V2
from babyyoda.test import assert_ao, assert_equal_histo1d, assert_histo2d
Expand Down
2 changes: 1 addition & 1 deletion tests/yoda/uhi/test_yd_histo1d_access.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from babyyoda.Histo1D import Histo1D
from babyyoda.histo1D import Histo1D
from babyyoda.grogu.histo1d_v2 import GROGU_HISTO1D_V2
from babyyoda.test import assert_bin1d, assert_value1d
from babyyoda.util import loc, overflow, underflow
Expand Down
2 changes: 1 addition & 1 deletion tests/yoda/uhi/test_yd_histo1d_setting.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from babyyoda.Histo1D import Histo1D
from babyyoda.histo1D import Histo1D
from babyyoda.util import loc, overflow, underflow

# YODA1 does not support setting
Expand Down
2 changes: 1 addition & 1 deletion tests/yoda/uhi/test_yd_histo2d_access.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from babyyoda.Histo2D import Histo2D
from babyyoda.histo2D import Histo2D
from babyyoda.grogu.histo2d_v2 import GROGU_HISTO2D_V2
from babyyoda.test import assert_bin2d
from babyyoda.util import loc
Expand Down

0 comments on commit 822a579

Please sign in to comment.