diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 1b0d454..42db7c0 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -23,7 +23,7 @@ jobs: name: Make SDist runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6.0.1 + - uses: actions/checkout@v6.0.2 with: fetch-depth: 0 @@ -65,7 +65,7 @@ jobs: cibw_skip: "pp* *musllinux* cp314t*" steps: - - uses: actions/checkout@v6.0.1 + - uses: actions/checkout@v6.0.2 with: fetch-depth: 0 @@ -100,7 +100,7 @@ jobs: merge-multiple: true - name: Generate artifact attestations - uses: actions/attest-build-provenance@v3.1.0 + uses: actions/attest-build-provenance@v3.2.0 with: subject-path: "dist/*" diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index ff3ab40..3af5911 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -53,7 +53,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v4.1.4 with: fetch-depth: 0 @@ -194,7 +194,7 @@ jobs: fi - name: Store conda build artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 if: ${{ always() && steps.prepare-artifacts.outcome == 'success' }} with: name: ${{ steps.prepare-artifacts.outputs.BLD_ARTIFACT_NAME }} @@ -203,7 +203,7 @@ jobs: continue-on-error: true - name: Store conda build environment artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 # only relevant if build failed, see above if: ${{ always() && steps.determine-status.outputs.status == 'failure' && steps.prepare-artifacts.outcome == 'success' }} with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5b64070..db88872 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest name: flake8-black steps: - - uses: actions/checkout@v6.0.1 + - uses: actions/checkout@v6.0.2 - name: Set up Python environment uses: actions/setup-python@v6 with: diff --git a/python/digital_rf/digital_rf_deprecated_hdf5.py b/python/digital_rf/digital_rf_deprecated_hdf5.py index b44be4a..73513d7 100644 --- a/python/digital_rf/digital_rf_deprecated_hdf5.py +++ b/python/digital_rf/digital_rf_deprecated_hdf5.py @@ -13,6 +13,7 @@ $Id$ """ + from __future__ import absolute_import, division, print_function import datetime diff --git a/python/digital_rf/list_drf.py b/python/digital_rf/list_drf.py index d77819d..c95fc3f 100644 --- a/python/digital_rf/list_drf.py +++ b/python/digital_rf/list_drf.py @@ -7,6 +7,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Module for listing Digital RF/Metadata files in a directory.""" + from __future__ import absolute_import, division, print_function import bisect diff --git a/python/digital_rf/mirror.py b/python/digital_rf/mirror.py index a034b96..77dcac1 100644 --- a/python/digital_rf/mirror.py +++ b/python/digital_rf/mirror.py @@ -7,6 +7,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Module for mirroring Digital RF files from on directory to another.""" + from __future__ import absolute_import, division, print_function import datetime diff --git a/python/digital_rf/ringbuffer.py b/python/digital_rf/ringbuffer.py index 8094fc0..a081686 100644 --- a/python/digital_rf/ringbuffer.py +++ b/python/digital_rf/ringbuffer.py @@ -7,6 +7,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Module for watching a directory and deleting the oldest Digital RF files.""" + from __future__ import absolute_import, division, print_function import datetime diff --git a/python/digital_rf/util.py b/python/digital_rf/util.py index 641cab5..9fcc06d 100644 --- a/python/digital_rf/util.py +++ b/python/digital_rf/util.py @@ -7,6 +7,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Utility functions for Digital RF and Digital Metadata.""" + from __future__ import absolute_import, division, print_function import ast diff --git a/python/digital_rf/watchdog_drf.py b/python/digital_rf/watchdog_drf.py index d495721..cfd0318 100644 --- a/python/digital_rf/watchdog_drf.py +++ b/python/digital_rf/watchdog_drf.py @@ -7,6 +7,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Module for montoring creation/modification/deletion of Digital RF files.""" + from __future__ import absolute_import, division, print_function import datetime diff --git a/python/examples/beacon/beacon_analysis.py b/python/examples/beacon/beacon_analysis.py index 8c48469..1cc1777 100644 --- a/python/examples/beacon/beacon_analysis.py +++ b/python/examples/beacon/beacon_analysis.py @@ -15,6 +15,7 @@ """ + from __future__ import absolute_import, division, print_function import argparse @@ -37,7 +38,6 @@ import scipy.signal as sig from mpl_toolkits.basemap import Basemap - TLE_def = ( "CASSIOPE", "1 39265U 13055A 17015.93102647 +.00001768 +00000-0 +52149-4 0 9992", diff --git a/python/examples/beacon/beacon_record.py b/python/examples/beacon/beacon_record.py index 6174054..782f2d9 100644 --- a/python/examples/beacon/beacon_record.py +++ b/python/examples/beacon/beacon_record.py @@ -13,6 +13,7 @@ Example configurations are included along with this script. """ + from __future__ import absolute_import, division, print_function import datetime @@ -224,14 +225,14 @@ def max_satellite_bandwidth( None """ maxBandwidth = 0 - (satRise, satTransit, satSet) = satellite_rise_and_set( + satRise, satTransit, satSet = satellite_rise_and_set( opt, obsLat, obsLong, obsElev, objName, tle1, tle2, startDate ) if satRise == satTransit == satSet: return 0 while satRise < endDate: - (objBandwidth, shiftedFrequencies) = satellite_bandwidth( + objBandwidth, shiftedFrequencies = satellite_bandwidth( opt, obsLat, obsLong, @@ -246,7 +247,7 @@ def max_satellite_bandwidth( ) if objBandwidth > maxBandwidth: maxBandwidth = objBandwidth - (satRise, satTransit, satSet) = satellite_rise_and_set( + satRise, satTransit, satSet = satellite_rise_and_set( opt, obsLat, obsLong, @@ -324,7 +325,7 @@ def satellite_bandwidth( ) = satellite_values_at_time( opt, obsLat, obsLong, obsElev, objName, tle1, tle2, currTime ) - (dopplerFreq) = doppler_shift(beaconFreq, range_velocity) + dopplerFreq = doppler_shift(beaconFreq, range_velocity) dopplerFrequencies.append(dopplerFreq) dopplerBandwidth.append(dopplerFreq - beaconFreq) currTime = currTime + ephem.second * interval @@ -433,7 +434,7 @@ def get_next_object(opt, site, objects, ctime): c_dtime = datetime.datetime.fromtimestamp(ctime, tz=datetime.timezone.utc) c_ephem_time = ephem.Date(c_dtime) - (sat_rise, sat_transit, sat_set) = satellite_rise_and_set( + sat_rise, sat_transit, sat_set = satellite_rise_and_set( opt, obs_lat, obs_long, obs_elev, obj_name, obj_tle1, obj_tle2, c_ephem_time ) @@ -520,7 +521,7 @@ def ephemeris_passes(opt, st0, et0): c_ephem_time = ephem.Date(c_dtime) try: - (sat_rise, sat_transit, sat_set) = satellite_rise_and_set( + sat_rise, sat_transit, sat_set = satellite_rise_and_set( opt, obs_lat, obs_long, @@ -555,7 +556,7 @@ def ephemeris_passes(opt, st0, et0): obj_tle2, sat_transit, ) - (obj_bandwidth, obj_doppler) = satellite_bandwidth( + obj_bandwidth, obj_doppler = satellite_bandwidth( opt, obs_lat, obs_long, @@ -986,7 +987,7 @@ def parse_command_line(): help="Radio site configuration file.", ) - (options, args) = parser.parse_args() + options, args = parser.parse_args() return (options, args) diff --git a/python/examples/benchmark_rf_read_hdf5.py b/python/examples/benchmark_rf_read_hdf5.py index 27299d4..978c2d1 100644 --- a/python/examples/benchmark_rf_read_hdf5.py +++ b/python/examples/benchmark_rf_read_hdf5.py @@ -11,6 +11,7 @@ Assumes the benchmark write script has already been run. """ + from __future__ import absolute_import, division, print_function import os diff --git a/python/examples/benchmark_rf_write_hdf5.py b/python/examples/benchmark_rf_write_hdf5.py index e25ec65..a310474 100644 --- a/python/examples/benchmark_rf_write_hdf5.py +++ b/python/examples/benchmark_rf_write_hdf5.py @@ -7,6 +7,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Benchmark I/O of Digital RF write in different configurations.""" + from __future__ import absolute_import, division, print_function import os diff --git a/python/examples/example_read_digital_metadata.py b/python/examples/example_read_digital_metadata.py index bc888b1..b3c7729 100644 --- a/python/examples/example_read_digital_metadata.py +++ b/python/examples/example_read_digital_metadata.py @@ -11,6 +11,7 @@ Assumes the example Digital Metadata write script has already been run. """ + from __future__ import absolute_import, division, print_function import os diff --git a/python/examples/example_read_digital_rf.py b/python/examples/example_read_digital_rf.py index 747e7c2..b5d4a82 100644 --- a/python/examples/example_read_digital_rf.py +++ b/python/examples/example_read_digital_rf.py @@ -11,6 +11,7 @@ Assumes the example Digital RF write script has already been run. """ + from __future__ import absolute_import, division, print_function import os diff --git a/python/examples/example_write_digital_metadata.py b/python/examples/example_write_digital_metadata.py index 661b7d0..b3287b5 100644 --- a/python/examples/example_write_digital_metadata.py +++ b/python/examples/example_write_digital_metadata.py @@ -12,6 +12,7 @@ number of levels. """ + from __future__ import absolute_import, division, print_function import os diff --git a/python/examples/example_write_digital_rf.py b/python/examples/example_write_digital_rf.py index 3b1a3ec..ff090df 100644 --- a/python/examples/example_write_digital_rf.py +++ b/python/examples/example_write_digital_rf.py @@ -11,6 +11,7 @@ Writes continuous complex short data. """ + from __future__ import absolute_import, division, print_function import os diff --git a/python/examples/sounder/prc_analyze.py b/python/examples/sounder/prc_analyze.py index db44af2..d81f984 100755 --- a/python/examples/sounder/prc_analyze.py +++ b/python/examples/sounder/prc_analyze.py @@ -16,6 +16,7 @@ doi:10.5194/amt-9-829-2016, 2016. """ + from __future__ import absolute_import, division, print_function import datetime diff --git a/python/examples/sounder/tx.py b/python/examples/sounder/tx.py index 43f37d5..1c17151 100755 --- a/python/examples/sounder/tx.py +++ b/python/examples/sounder/tx.py @@ -8,6 +8,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Transmit waveforms with synchronized USRPs.""" + from __future__ import absolute_import, division, print_function import math @@ -303,9 +304,7 @@ def _parse_options(**kwargs): op.mboard_strs.append(s) if op.verbose: - opstr = ( - dedent( - """\ + opstr = dedent("""\ Main boards: {mboard_strs} Subdevices: {subdevs} Frequency: {centerfreqs} @@ -323,11 +322,7 @@ def _parse_options(**kwargs): Stream arguments: {stream_args} Tune arguments: {tune_args} Sample rate: {samplerate} - """ - ) - .strip() - .format(**op.__dict__) - ) + """).strip().format(**op.__dict__) print(opstr) # check that subdevice specifications are unique per-mainboard @@ -752,12 +747,10 @@ def run(self, starttime=None, endtime=None, duration=None, period=10): break_on_hyphens=False, subsequent_indent=" " * (len(scriptname) + 1), ) - egs = [ - """\ + egs = ["""\ {0} -m 192.168.10.2 -d "A:0" -f 440e6 -F 12.5e6 -G 0.25 -g 0 -r 1e6 code.bin - """ - ] + """] egs = [" \\\n".join(egtw.wrap(dedent(s.format(scriptname)))) for s in egs] epi = "\n" + "\n\n".join(epi_pars + egs) + "\n" diff --git a/python/examples/sounder/waveforms/create_waveform.py b/python/examples/sounder/waveforms/create_waveform.py index cd15bfd..6687dcd 100644 --- a/python/examples/sounder/waveforms/create_waveform.py +++ b/python/examples/sounder/waveforms/create_waveform.py @@ -17,6 +17,7 @@ doi:10.5194/amt-9-829-2016, 2016. """ + from __future__ import absolute_import, division, print_function, unicode_literals import math diff --git a/python/gr_digital_rf/digital_rf_sink.py b/python/gr_digital_rf/digital_rf_sink.py index f8e7338..dbd12b9 100644 --- a/python/gr_digital_rf/digital_rf_sink.py +++ b/python/gr_digital_rf/digital_rf_sink.py @@ -7,6 +7,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Module defining a Digital RF Source block.""" + from __future__ import absolute_import, division, print_function import os diff --git a/python/gr_digital_rf/raster.py b/python/gr_digital_rf/raster.py index 6f42286..b6c7de1 100644 --- a/python/gr_digital_rf/raster.py +++ b/python/gr_digital_rf/raster.py @@ -7,6 +7,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Module defining raster (periodic window) tools for GNU Radio.""" + from __future__ import absolute_import, division, print_function import numpy as np diff --git a/python/gr_digital_rf/vector.py b/python/gr_digital_rf/vector.py index 51ff7ca..23ee176 100644 --- a/python/gr_digital_rf/vector.py +++ b/python/gr_digital_rf/vector.py @@ -7,6 +7,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Module defining vector tools for GNU Radio.""" + from __future__ import absolute_import, division, print_function import numpy as np diff --git a/python/tools/digital_metadata_archive.py b/python/tools/digital_metadata_archive.py index 8075b2b..fb00e9c 100644 --- a/python/tools/digital_metadata_archive.py +++ b/python/tools/digital_metadata_archive.py @@ -11,6 +11,7 @@ $Id$ """ + from __future__ import absolute_import, division, print_function import argparse diff --git a/python/tools/digital_rf_archive.py b/python/tools/digital_rf_archive.py index 474abca..39ea259 100644 --- a/python/tools/digital_rf_archive.py +++ b/python/tools/digital_rf_archive.py @@ -11,6 +11,7 @@ $Id$ """ + from __future__ import absolute_import, division, print_function import argparse diff --git a/python/tools/digital_rf_upconvert.py b/python/tools/digital_rf_upconvert.py index 16f6948..78f4651 100644 --- a/python/tools/digital_rf_upconvert.py +++ b/python/tools/digital_rf_upconvert.py @@ -13,6 +13,7 @@ $Id$ """ + from __future__ import absolute_import, division, print_function import argparse diff --git a/python/tools/drf_cross_sti.py b/python/tools/drf_cross_sti.py index 80dc310..f6c1fa2 100644 --- a/python/tools/drf_cross_sti.py +++ b/python/tools/drf_cross_sti.py @@ -16,7 +16,6 @@ """ - import datetime import itertools as it import optparse @@ -554,7 +553,7 @@ def parse_command_line(): help="Print status messages to stdout.", ) - (options, args) = parser.parse_args() + options, args = parser.parse_args() return (options, args) @@ -570,7 +569,7 @@ def parse_command_line(): """ # Parse the Command Line for configuration -(options, args) = parse_command_line() +options, args = parse_command_line() if options.path is None: print("Please provide an input source with the -p option!") diff --git a/python/tools/drf_sound.py b/python/tools/drf_sound.py index aa083e9..b9fdfd3 100644 --- a/python/tools/drf_sound.py +++ b/python/tools/drf_sound.py @@ -15,6 +15,7 @@ directly to sounddevice or through a wave file save out. """ + from __future__ import absolute_import, division, print_function import datetime @@ -260,7 +261,7 @@ def parse_command_line(str_input=None): help="Number of blocks the file will be broken into.", ) - (options, args) = parser.parse_args() + options, args = parser.parse_args() return (options, args) @@ -277,7 +278,7 @@ def parse_command_line(str_input=None): # Parse the Command Line for configuration -(options, args) = parse_command_line() +options, args = parse_command_line() if options.path == None: print("Please provide an input source with the -p option!") diff --git a/python/tools/drf_sti.py b/python/tools/drf_sti.py index da9f699..779c25b 100644 --- a/python/tools/drf_sti.py +++ b/python/tools/drf_sti.py @@ -8,6 +8,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Create a spectral time intensity summary plot for a data set.""" + """Multithreaded variant by dsheen to handle much larger datasets smoothly 2025/06/04""" """Flag Added to use all samples in file and compute integration automatically 2025/07/14""" diff --git a/python/tools/thor.py b/python/tools/thor.py index 7cf6488..63f545e 100644 --- a/python/tools/thor.py +++ b/python/tools/thor.py @@ -8,6 +8,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Record data from synchronized USRPs in Digital RF format.""" + from __future__ import absolute_import, division, print_function import argparse @@ -430,9 +431,7 @@ def _parse_options(**kwargs): ) if op.verbose: - opstr = ( - dedent( - """\ + opstr = dedent("""\ Main boards: {mboard_str} Subdevices: {subdevs} Clock rates: {clock_rates} @@ -464,11 +463,7 @@ def _parse_options(**kwargs): Enable Message Passing: {message_interface} Message RX Port: {zmq_sub_port}, Message TX Port: {zmq_pub_port}, - """ - ) - .strip() - .format(**op.__dict__) - ) + """).strip().format(**op.__dict__) print(opstr) return op diff --git a/python/tools/thorosmo.py b/python/tools/thorosmo.py index aad1e40..ae9e913 100644 --- a/python/tools/thorosmo.py +++ b/python/tools/thorosmo.py @@ -8,6 +8,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Record data from SDRs using osmo pakcage to Digital RF format.""" + from __future__ import absolute_import, division, print_function import argparse @@ -392,9 +393,7 @@ def _parse_options(**kwargs): op.mboard_strs.append(s) if op.verbose: - opstr = ( - dedent( - """\ + opstr = dedent("""\ Radio Type: {radtype} Main boards: {mboard_strs} Subdevices: {subdevs} @@ -424,11 +423,7 @@ def _parse_options(**kwargs): Data dir: {datadir} Metadata: {metadata} UUID: {uuid} - """ - ) - .strip() - .format(**op.__dict__) - ) + """).strip().format(**op.__dict__) print(opstr) return op diff --git a/python/tools/thorpluto.py b/python/tools/thorpluto.py index f756981..96f7982 100644 --- a/python/tools/thorpluto.py +++ b/python/tools/thorpluto.py @@ -8,6 +8,7 @@ # The full license is in the LICENSE file, distributed with this software. # ---------------------------------------------------------------------------- """Record data from the ADALM Pluto using GNURadio to Digital RF format.""" + from __future__ import absolute_import, division, print_function import argparse @@ -364,9 +365,7 @@ def _parse_options(**kwargs): op.mboard_strs.append(s) if op.verbose: - opstr = ( - dedent( - """\ + opstr = dedent("""\ Main boards: {mboard_strs} Clock rates: {clock_rates} Clock sources: {clock_sources} @@ -389,11 +388,7 @@ def _parse_options(**kwargs): Data dir: {datadir} Metadata: {metadata} UUID: {uuid} - """ - ) - .strip() - .format(**op.__dict__) - ) + """).strip().format(**op.__dict__) print(opstr) return op diff --git a/python/tools/uhdtodrf.py b/python/tools/uhdtodrf.py index 2f94ab3..16fe3f2 100644 --- a/python/tools/uhdtodrf.py +++ b/python/tools/uhdtodrf.py @@ -404,9 +404,7 @@ def _parse_options(**kwargs): op.mboard_strs.append(s) if op.verbose: - opstr = ( - dedent( - """\ + opstr = dedent("""\ Main boards: {mboard_strs} Subdevices: {subdevs} Clock rates: {clock_rates} @@ -435,11 +433,7 @@ def _parse_options(**kwargs): Data dir: {datadir} Metadata: {metadata} UUID: {uuid} - """ - ) - .strip() - .format(**op.__dict__) - ) + """).strip().format(**op.__dict__) print(opstr) return op diff --git a/python/tools/verify_digital_rf_upconvert.py b/python/tools/verify_digital_rf_upconvert.py index 6799abc..2b8424b 100644 --- a/python/tools/verify_digital_rf_upconvert.py +++ b/python/tools/verify_digital_rf_upconvert.py @@ -11,6 +11,7 @@ $Id$ """ + from __future__ import absolute_import, division, print_function import argparse