diff --git a/.readthedocs.yaml b/.readthedocs.yaml index a6ab77b..9965c06 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,7 +8,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.10" + python: "3.11" jobs: post_create_environment: # Install poetry diff --git a/.riahub/workflows/build-project.yaml b/.riahub/workflows/build-project.yaml index 1651656..2cbd258 100644 --- a/.riahub/workflows/build-project.yaml +++ b/.riahub/workflows/build-project.yaml @@ -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: diff --git a/.riahub/workflows/tox.yaml b/.riahub/workflows/tox.yaml index 84b0f6b..fc31def 100644 --- a/.riahub/workflows/tox.yaml +++ b/.riahub/workflows/tox.yaml @@ -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: diff --git a/README.md b/README.md index d499a75..30d5c32 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ - Python Version + Python Version

diff --git a/pyproject.toml b/pyproject.toml index 48a9e1c..1acd4f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 diff --git a/src/ria_toolkit_oss_cli/ria_toolkit_oss/annotate.py b/src/ria_toolkit_oss_cli/ria_toolkit_oss/annotate.py index 6477d40..03389a7 100644 --- a/src/ria_toolkit_oss_cli/ria_toolkit_oss/annotate.py +++ b/src/ria_toolkit_oss_cli/ria_toolkit_oss/annotate.py @@ -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. diff --git a/tox.ini b/tox.ini index 107b46b..ffd59ee 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] isolated_build = true -envlist = py310, py311, py312, lint +envlist = py311, py312, lint skipsdist = true [testenv] @@ -30,6 +30,5 @@ per-file-ignores = __init__.py:F401 [gh-actions] python = - 3.10: py310, lint - 3.11: py311 + 3.11: py311, lint 3.12: py312