diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f67c2d6..4548f8a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,11 +17,11 @@ repos: - id: pretty-format-toml args: [--autofix] - repo: https://github.com/fsfe/reuse-tool - rev: v3.0.1 + rev: v3.1.0a1 hooks: - id: reuse - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell - repo: https://github.com/adamchainz/blacken-docs @@ -30,21 +30,21 @@ repos: - id: blacken-docs args: [-l 100] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.9.0 + rev: v1.10.0 hooks: - id: mypy files: simweights additional_dependencies: [numpy] exclude: ^contrib/ - repo: https://github.com/pycqa/pylint - rev: v3.1.0 + rev: v3.2.2 hooks: - id: pylint files: simweights exclude: ^contrib/ additional_dependencies: [numpy, pandas] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.5 + rev: v0.4.6 hooks: - id: ruff args: [--fix, --show-fixes] @@ -69,7 +69,7 @@ repos: - id: forbid-crlf - id: forbid-tabs - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-builtin-literals diff --git a/examples/effective_area.py b/examples/effective_area.py index 54cd608..2cefeb3 100755 --- a/examples/effective_area.py +++ b/examples/effective_area.py @@ -17,10 +17,10 @@ w = simweights.NuGenWeighter(f, nfiles=10) # create the energy and zenith bins energy_bins = np.geomspace(1e2, 1e8, 25) -zenith_bins = [-1, -0.5, 0, 0.5, 1] +cos_zenith_bins = [-1, -0.5, 0, 0.5, 1] # calculate the effective area in energy and zenith bins with all of the events in the sample -effective_area = w.effective_area(energy_bins, zenith_bins) +effective_area = w.effective_area(energy_bins, cos_zenith_bins) # make some labels for the different zenith bins zenith_labels = [ diff --git a/pyproject.toml b/pyproject.toml index ab70d5c..fa6d9d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,6 +34,7 @@ requires-python = "~=3.7" [project.optional-dependencies] dev = ["pytest", "pre-commit", "reuse", "black", "ruff", "pylint", "mypy"] docs = ["sphinx", "sphinx-rtd-theme", "pandas"] +examples = ['matplotlib'] test = [ "h5py", "tables < 3.8; python_version < '3.9'", @@ -53,7 +54,7 @@ Documentation = "https://docs.icecube.aq/simweights/main" Source = "https://github.com/icecube/simweights" [tool.codespell] -ignore-words-list = 'livetime' +ignore-words-list = 'livetime,assertIn' skip = '_build' [tool.coverage.report] @@ -98,8 +99,8 @@ fixable = ["I"] ignore = [ "ANN401", # any-type "S101", # assert-used - "COM812", # confilcts with ruff formatter - "ISC001", # confilcts with ruff formatter + "COM812", # conflicts with ruff formatter + "ISC001", # conflicts with ruff formatter "PLR0913" # Too many arguments in function definition ] select = ["ALL"]