Skip to content

Commit

Permalink
autoformat, fix format problem
Browse files Browse the repository at this point in the history
  • Loading branch information
jhazentia committed Mar 5, 2024
1 parent a683cf8 commit 74cac26
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.1
hooks:
- id: pyupgrade
args: ["--py38-plus"]
Expand All @@ -30,12 +30,12 @@ repos:
types: [file, python]
args: ["--profile", "black", "--filter-files", "--gitignore"]
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.2.0
hooks:
- id: black
types: [file, python]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.38.0
rev: v0.39.0
hooks:
- id: markdownlint
types: [file, markdown]
Expand Down
1 change: 1 addition & 0 deletions sample_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This is a sample file showing how an action be created and called for debugging purposes
using a mock signal analyzer.
"""

import json

from scos_actions.actions.acquire_single_freq_fft import SingleFrequencyFftAcquisition
Expand Down
12 changes: 5 additions & 7 deletions scos_actions/actions/acquire_sea_data_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,9 +639,9 @@ def capture_iq(self, params: dict) -> dict:
# Store some metadata with the IQ
measurement_result.update(params)
if self.cal_adjust:
measurement_result[
"sensor_cal"
] = self.sensor.signal_analyzer.sensor_calibration_data
measurement_result["sensor_cal"] = (
self.sensor.signal_analyzer.sensor_calibration_data
)
toc = perf_counter()
logger.debug(
f"IQ Capture ({duration_ms} ms @ {(params[FREQUENCY]/1e6):.1f} MHz) completed in {toc-tic:.2f} s."
Expand Down Expand Up @@ -1136,8 +1136,7 @@ def create_capture_segment(
),
)
if self.cal_adjust:
capture_segment.sensor_calibration = (
ntia_sensor.Calibration(
capture_segment.sensor_calibration = ntia_sensor.Calibration(
datetime=measurement_result["sensor_cal"]["datetime"],
gain=round(measurement_result["sensor_cal"]["gain"], 3),
noise_figure=round(
Expand All @@ -1147,8 +1146,7 @@ def create_capture_segment(
measurement_result["sensor_cal"]["temperature"], 1
),
reference=DATA_REFERENCE_POINT,
),
)
)
self.sigmf_builder.add_capture(capture_segment)

def get_sigmf_builder(
Expand Down
1 change: 1 addition & 0 deletions scos_actions/hardware/mocks/mock_sigan.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Mock a signal analyzer for testing."""

import logging
from collections import namedtuple
from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions scos_actions/signal_processing/tests/test_calibration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit test for scos_actions.signal_processing.calibration
"""

import numpy as np
from scipy.constants import Boltzmann

Expand Down
1 change: 1 addition & 0 deletions scos_actions/signal_processing/tests/test_fft.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit test for scos_actions.signal_processing.fft
"""

import numpy as np
import pytest
from scipy.signal import get_window
Expand Down
1 change: 1 addition & 0 deletions scos_actions/signal_processing/tests/test_filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
tests mostly exist to ensure that tests will fail if substantial changes
are made to the wrappers.
"""

import numpy as np
import pytest
from scipy.signal import ellip, ellipord, firwin, kaiserord, sos2zpk, sosfreqz
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit test for scos_actions.signal_processing.power_analysis
"""

from enum import EnumMeta

import numpy as np
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Unit test for scos_actions.signal_processing.unit_conversion
"""

import numpy as np
import pytest

Expand Down

0 comments on commit 74cac26

Please sign in to comment.