diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b72d055..7a3d9c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,12 +20,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 0 - name: setup Python - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: "3.14" check-latest: true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7f48ffb..52815d0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,12 +13,12 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 0 - name: setup Python - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: "3.14" check-latest: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ce146b2..d31ca34 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,12 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: "3.14" check-latest: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4e9523d..97ef7f7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,12 +20,12 @@ jobs: - "3.14" steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} check-latest: true diff --git a/src/spectrumkit/dielectricspectrum.py b/src/spectrumkit/dielectricspectrum.py index efc49ac..9731636 100755 --- a/src/spectrumkit/dielectricspectrum.py +++ b/src/spectrumkit/dielectricspectrum.py @@ -121,7 +121,7 @@ def calculate_spectrum_from_dipole( dsusc = np.zeros(seglen, dtype=complex) # Loop over segments - for s in range(0, segs): + for s in range(segs): logging.info(f"\rSegment {s + 1} of {segs}") ss = 0 + 0j @@ -198,7 +198,6 @@ def calculate_spectrum_from_dipole( logging.info(f"Binned data consists of {len(susc)} datapoints") else: logging.info(f"Not binning data: there are {len(susc)} datapoints") - pass return results @@ -290,7 +289,7 @@ def calculate_spectrum_from_current( dsusc = np.zeros(seglen, dtype=complex) # Loop over segments - for s in range(0, segs): + for s in range(segs): logging.info(f"\rSegment {s + 1} of {segs}") ss = 0 + 0j @@ -777,7 +776,6 @@ def _conclude(self) -> None: ... @render_docs def save(self) -> None: """${SAVE_METHOD_DESCRIPTION}""" # noqa: D415 - ... def WienerKhinchin(time, timeseries, volume, temperature, spectrum_type="dipole"): diff --git a/src/spectrumkit/lib/preprocessing.py b/src/spectrumkit/lib/preprocessing.py index 0c6ca4f..85da39b 100644 --- a/src/spectrumkit/lib/preprocessing.py +++ b/src/spectrumkit/lib/preprocessing.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # Copyright (c) 2026 Authors and contributors # (see the AUTHORS.rst file for the full list of names) # diff --git a/src/spectrumkit/lib/util.py b/src/spectrumkit/lib/util.py index f12d964..46786ba 100644 --- a/src/spectrumkit/lib/util.py +++ b/src/spectrumkit/lib/util.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # Copyright (c) 2025 Authors and contributors # (see the AUTHORS.rst file for the full list of names) # @@ -38,7 +36,7 @@ def bin(a: np.ndarray, bins: np.ndarray) -> np.ndarray: count = np.zeros(len(bins), dtype=int) ic = -1 - for i in range(0, len(a)): + for i in range(len(a)): if i in bins: ic += 1 # index for new average avg[ic] += a[i] diff --git a/tests/data/__init__.py b/tests/data/__init__.py index 3f398a8..111d757 100644 --- a/tests/data/__init__.py +++ b/tests/data/__init__.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """init file for datafiles.""" # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # diff --git a/tests/lib/test_math.py b/tests/lib/test_math.py index 3fa00c7..3a79fbb 100644 --- a/tests/lib/test_math.py +++ b/tests/lib/test_math.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # Copyright (c) 2025 Authors and contributors # (see the AUTHORS.rst file for the full list of names) # diff --git a/tests/tests.py b/tests/tests.py index bae86a5..acaf8dc 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # Copyright (c) 2025 Authors and contributors # (see the AUTHORS.rst file for the full list of names) # @@ -18,7 +16,7 @@ from spectrumkit import DielectricSpectrum, calculate_spectrum_from_dipole sys.path.append(str(Path(__file__).parents[1])) -from data import WATER_TPR_NPT, WATER_TRR_NPT # noqa: E402 +from data import WATER_TPR_NPT, WATER_TRR_NPT class TestDielectricSpectrum: