Drop Python 3.10 support and fix all flake8 lint violations
Some checks failed
Build Sphinx Docs Set / Build Docs (pull_request) Successful in 22s
Test with tox / Test with tox (3.12) (pull_request) Failing after 17s
Test with tox / Test with tox (3.11) (pull_request) Failing after 30s
Build Project / Build Project (3.12) (pull_request) Successful in 1m5s
Build Project / Build Project (3.11) (pull_request) Successful in 1m7s
Some checks failed
Build Sphinx Docs Set / Build Docs (pull_request) Successful in 22s
Test with tox / Test with tox (3.12) (pull_request) Failing after 17s
Test with tox / Test with tox (3.11) (pull_request) Failing after 30s
Build Project / Build Project (3.12) (pull_request) Successful in 1m5s
Build Project / Build Project (3.11) (pull_request) Successful in 1m7s
- Remove py310 from tox envlist, CI matrix, readthedocs, README badge - Move lint env to run on 3.11 in gh-actions mapping - Fix E501 line-too-long in cusum_annotator, energy_detector, parallel_signal_separator, threshold_qualifier (split error string) - Fix E501 in annotate.py: wrap --sample-rate click.option decorators to black style (one arg per line with trailing comma) - Fix C901 in annotate.py: extract _log_separate_start() helper to reduce separate() complexity from 17 to 14 - Fix separate() signature wrapping to match black style Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
7ef3fe8fb1
commit
23d12875be
|
|
@ -8,7 +8,7 @@ version: 2
|
|||
build:
|
||||
os: ubuntu-22.04
|
||||
tools:
|
||||
python: "3.10"
|
||||
python: "3.11"
|
||||
jobs:
|
||||
post_create_environment:
|
||||
# Install poetry
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ '3.10', '3.11', '3.12' ]
|
||||
python-version: [ '3.11', '3.12' ]
|
||||
|
||||
name: Build Project
|
||||
steps:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.10', '3.11', '3.12']
|
||||
python-version: ['3.11', '3.12']
|
||||
|
||||
name: Test with tox
|
||||
steps:
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
</a>
|
||||
<!-- Python Version -->
|
||||
<a href="https://www.python.org/downloads">
|
||||
<img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="Python Version">
|
||||
<img src="https://img.shields.io/badge/python-3.11+-blue.svg" alt="Python Version">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ version = "0.1.5"
|
|||
description = "An open-source version of the RIA Toolkit, including the fundamental tools to get started developing, testing, and deploying radio intelligence applications"
|
||||
license = { text = "AGPL-3.0-only" }
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
requires-python = ">=3.11"
|
||||
authors = [
|
||||
{ name = "Qoherent Inc.", email = "info@qoherent.ai" },
|
||||
]
|
||||
|
|
@ -128,7 +128,7 @@ onnxruntime = {version = ">=1.17,<2.0", python = ">=3.11"}
|
|||
|
||||
[tool.black]
|
||||
line-length = 119
|
||||
target-version = ["py310"]
|
||||
target-version = ["py311"]
|
||||
exclude = '''
|
||||
/(
|
||||
\.git
|
||||
|
|
|
|||
|
|
@ -502,8 +502,10 @@ def clear(input, output, overwrite, force, quiet):
|
|||
help="Annotation type",
|
||||
)
|
||||
@click.option(
|
||||
"--sample-rate", type=float, default=None,
|
||||
help="Sample rate in Hz (overrides metadata; required if not in file)"
|
||||
"--sample-rate",
|
||||
type=float,
|
||||
default=None,
|
||||
help="Sample rate in Hz (overrides metadata; required if not in file)",
|
||||
)
|
||||
@click.option("--output", "-o", type=click.Path(), help="Output file path")
|
||||
@click.option("--overwrite", is_flag=True, help="Overwrite input file (non-SigMF only)")
|
||||
|
|
@ -617,8 +619,10 @@ def energy(
|
|||
help="Annotation type",
|
||||
)
|
||||
@click.option(
|
||||
"--sample-rate", type=float, default=None,
|
||||
help="Sample rate in Hz (overrides metadata; required if not in file)"
|
||||
"--sample-rate",
|
||||
type=float,
|
||||
default=None,
|
||||
help="Sample rate in Hz (overrides metadata; required if not in file)",
|
||||
)
|
||||
@click.option("--output", "-o", type=click.Path(), help="Output file path")
|
||||
@click.option("--overwrite", is_flag=True, help="Overwrite input file (non-SigMF only)")
|
||||
|
|
@ -707,8 +711,10 @@ def cusum(input, label, min_duration, window_size, tolerance, annotation_type, s
|
|||
)
|
||||
@click.option("--channel", type=int, default=0, help="Channel index to annotate (default: 0)")
|
||||
@click.option(
|
||||
"--sample-rate", type=float, default=None,
|
||||
help="Sample rate in Hz (overrides metadata; required if not in file)"
|
||||
"--sample-rate",
|
||||
type=float,
|
||||
default=None,
|
||||
help="Sample rate in Hz (overrides metadata; required if not in file)",
|
||||
)
|
||||
@click.option("--output", "-o", type=click.Path(), help="Output file path")
|
||||
@click.option("--overwrite", is_flag=True, help="Overwrite input file (non-SigMF only)")
|
||||
|
|
@ -780,20 +786,6 @@ def threshold(input, threshold, label, window_size, annotation_type, channel, sa
|
|||
# ============================================================================
|
||||
|
||||
|
||||
@annotate.command()
|
||||
@click.argument("input", type=click.Path(exists=True))
|
||||
@click.option("--indices", type=str, help="Comma-separated annotation indices to split (default: all)")
|
||||
@click.option("--nfft", type=int, default=65536, help="FFT size for spectral analysis")
|
||||
@click.option("--noise-threshold-db", type=float, help="Noise floor threshold in dB (auto-estimated if not specified)")
|
||||
@click.option("--min-component-bw", type=float, default=50e3, help="Min component bandwidth in Hz")
|
||||
@click.option(
|
||||
"--sample-rate", type=float, default=None,
|
||||
help="Sample rate in Hz (overrides metadata; required if not in file)"
|
||||
)
|
||||
@click.option("--output", "-o", type=click.Path(), help="Output file path")
|
||||
@click.option("--overwrite", is_flag=True, help="Overwrite input file (non-SigMF only)")
|
||||
@click.option("--quiet", is_flag=True, help="Quiet mode")
|
||||
@click.option("--verbose", is_flag=True, help="Verbose output (show detected components)")
|
||||
def _log_separate_start(quiet, recording, indices_list, nfft, noise_threshold_db, min_component_bw):
|
||||
if not quiet:
|
||||
click.echo("\nSplitting annotations by frequency components...")
|
||||
|
|
@ -808,8 +800,34 @@ def _log_separate_start(quiet, recording, indices_list, nfft, noise_threshold_db
|
|||
click.echo(f" Min component BW: {format_frequency(min_component_bw)}")
|
||||
|
||||
|
||||
@annotate.command()
|
||||
@click.argument("input", type=click.Path(exists=True))
|
||||
@click.option("--indices", type=str, help="Comma-separated annotation indices to split (default: all)")
|
||||
@click.option("--nfft", type=int, default=65536, help="FFT size for spectral analysis")
|
||||
@click.option("--noise-threshold-db", type=float, help="Noise floor threshold in dB (auto-estimated if not specified)")
|
||||
@click.option("--min-component-bw", type=float, default=50e3, help="Min component bandwidth in Hz")
|
||||
@click.option(
|
||||
"--sample-rate",
|
||||
type=float,
|
||||
default=None,
|
||||
help="Sample rate in Hz (overrides metadata; required if not in file)",
|
||||
)
|
||||
@click.option("--output", "-o", type=click.Path(), help="Output file path")
|
||||
@click.option("--overwrite", is_flag=True, help="Overwrite input file (non-SigMF only)")
|
||||
@click.option("--quiet", is_flag=True, help="Quiet mode")
|
||||
@click.option("--verbose", is_flag=True, help="Verbose output (show detected components)")
|
||||
def separate(
|
||||
input, indices, nfft, noise_threshold_db, min_component_bw, sample_rate, output, overwrite, quiet, verbose):
|
||||
input,
|
||||
indices,
|
||||
nfft,
|
||||
noise_threshold_db,
|
||||
min_component_bw,
|
||||
sample_rate,
|
||||
output,
|
||||
overwrite,
|
||||
quiet,
|
||||
verbose,
|
||||
):
|
||||
"""
|
||||
Auto-detect parallel frequency-offset signals and split into sub-bands.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user