{"id":37386556,"url":"https://github.com/morria/continuous-wave","last_synced_at":"2026-01-16T05:21:40.904Z","repository":{"id":324450632,"uuid":"1097157802","full_name":"morria/continuous-wave","owner":"morria","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-15T22:36:55.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-15T23:25:26.701Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/morria.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-15T16:36:16.000Z","updated_at":"2025-11-15T22:18:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/morria/continuous-wave","commit_stats":null,"previous_names":["morria/continuous-wave"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/morria/continuous-wave","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morria%2Fcontinuous-wave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morria%2Fcontinuous-wave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morria%2Fcontinuous-wave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morria%2Fcontinuous-wave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morria","download_url":"https://codeload.github.com/morria/continuous-wave/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morria%2Fcontinuous-wave/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T05:21:40.830Z","updated_at":"2026-01-16T05:21:40.888Z","avatar_url":"https://github.com/morria.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# continuous-wave\n\nA modern, testable CW (Morse code) decoder library for Python.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)\n\n## Features\n\n- **Modular Pipeline Architecture**: Clean separation between audio processing, signal detection, and decoding stages\n- **Immutable Data Models**: All data structures are frozen dataclasses for thread-safety and predictability\n- **Comprehensive Testing**: High test coverage with unit, integration, and property-based tests\n- **Type-Safe**: Full type hints with strict mypy checking\n- **Configurable**: Flexible configuration with sensible defaults\n- **Modern Python**: Built for Python 3.11+ with modern best practices\n\n## Installation\n\n### Using pip\n\nInstall the latest version from PyPI (when published):\n\n```bash\npip install continuous-wave\n```\n\n### From source\n\nFor development or to use the latest version:\n\n```bash\n# Clone the repository\ngit clone https://github.com/morria/continuous-wave.git\ncd continuous-wave\n\n# Install in development mode\npip install -e .\n\n# Or install with development dependencies\npip install -e \".[dev]\"\n```\n\n### Using poetry\n\n```bash\npoetry add continuous-wave\n```\n\n### Using conda\n\n```bash\n# Create a new environment with the required Python version\nconda create -n cw python=3.11\nconda activate cw\n\n# Install via pip in conda environment\npip install continuous-wave\n```\n\n## Quick Start\n\n```python\nfrom continuous_wave import CWConfig, AudioSample\nimport numpy as np\n\n# Create a configuration\nconfig = CWConfig(\n    sample_rate=8000,\n    initial_wpm=20.0,\n    freq_range=(400.0, 1000.0)\n)\n\n# Create an audio sample\naudio_data = np.random.randn(1024).astype(np.float32)\nsample = AudioSample(\n    data=audio_data,\n    sample_rate=8000,\n    timestamp=0.0\n)\n\nprint(f\"Sample duration: {sample.duration:.3f} seconds\")\nprint(f\"Number of samples: {sample.num_samples}\")\n```\n\n## Dependencies\n\n### Core Dependencies\n\n- **numpy** (\u003e=1.24.0): Numerical computing\n- **scipy** (\u003e=1.10.0): Signal processing\n- **sounddevice** (\u003e=0.4.6): Audio I/O\n\n### Development Dependencies\n\nInstall with `pip install -e \".[dev]\"`:\n\n- **pytest** (\u003e=7.4.0): Testing framework\n- **pytest-asyncio** (\u003e=0.21.0): Async test support\n- **pytest-cov** (\u003e=4.1.0): Code coverage\n- **pytest-benchmark** (\u003e=4.0.0): Performance benchmarking\n- **hypothesis** (\u003e=6.82.0): Property-based testing\n- **mypy** (\u003e=1.5.0): Static type checking\n- **ruff** (\u003e=0.0.280): Linting and formatting\n\n### Optional Performance Dependencies\n\nInstall with `pip install -e \".[performance]\"`:\n\n- **numba** (\u003e=0.57.0): JIT compilation\n- **cython** (\u003e=3.0.0): Compiled extensions\n\n## Usage\n\n### Configuration\n\nThe library uses a centralized configuration object:\n\n```python\nfrom continuous_wave import CWConfig\n\n# Use defaults\nconfig = CWConfig()\n\n# Or customize settings\nconfig = CWConfig(\n    sample_rate=8000,\n    chunk_size=256,\n    freq_range=(200.0, 1200.0),\n    initial_wpm=25.0,\n    adaptive_timing=True\n)\n\n# Validate frequencies\nif config.validate_frequency(800.0):\n    print(\"800 Hz is in range\")\n\n# Check WPM range\nif config.validate_wpm(20.0):\n    print(\"20 WPM is valid\")\n```\n\n### Working with Audio Data\n\n```python\nfrom continuous_wave import AudioSample\nimport numpy as np\n\n# Create an audio sample\ndata = np.random.randn(1024).astype(np.float32)\nsample = AudioSample(\n    data=data,\n    sample_rate=8000,\n    timestamp=0.0\n)\n\n# Access properties\nprint(f\"Duration: {sample.duration} seconds\")\nprint(f\"Samples: {sample.num_samples}\")\n```\n\n### Morse Code Elements\n\n```python\nfrom continuous_wave import MorseElement, MorseSymbol\n\n# Work with Morse elements\ndot = MorseSymbol(\n    element=MorseElement.DOT,\n    duration=0.06,  # 60ms\n    timestamp=0.0\n)\n\ndash = MorseSymbol(\n    element=MorseElement.DASH,\n    duration=0.18,  # 180ms\n    timestamp=0.06\n)\n\nprint(f\"Dot: {dot.element.value}\")\nprint(f\"Dash: {dash.element.value}\")\n```\n\n## Development\n\n### Setting Up Development Environment\n\n```bash\n# Clone the repository\ngit clone https://github.com/morria/continuous-wave.git\ncd continuous-wave\n\n# Install with development dependencies\npip install -e \".[dev]\"\n\n# Install pre-commit hooks\npip install pre-commit\npre-commit install\n```\n\n### Running Tests\n\n```bash\n# Run all tests\npytest\n\n# Run with coverage\npytest --cov=continuous_wave --cov-report=html\n\n# Run specific test file\npytest tests/unit/test_models.py\n\n# Run with verbose output\npytest -v\n```\n\n### Code Quality\n\n```bash\n# Type checking\nmypy src/continuous_wave\n\n# Linting\nruff check src/continuous_wave\n\n# Format code\nruff format src/continuous_wave\n\n# Run all checks (via Makefile)\nmake lint\nmake test\n```\n\n## Architecture\n\nThe library is organized into modular components:\n\n- **models.py**: Immutable data structures (AudioSample, ToneEvent, MorseSymbol, etc.)\n- **config.py**: Configuration management with validation\n- **protocols.py**: Protocol definitions for pipeline components\n- **audio/**: Audio input/output handling\n- **signal/**: Signal processing (filtering, AGC, noise reduction)\n- **detection/**: Tone detection and frequency analysis\n- **timing/**: WPM detection and timing analysis\n- **decoder/**: Morse code decoding logic\n\nSee [DESIGN.md](docs/DESIGN.md) for detailed architecture documentation.\n\n## Claude Code Integration\n\nThis project includes a comprehensive Claude Code setup for automated code review and quality checking:\n\n### PR Review Agent\n\nBefore creating a pull request, use the PR review agent to ensure your code meets all quality standards:\n\n```\n/pre-pr\n```\n\nThe agent will:\n- ✅ Run all CI checks (formatting, linting, type checking, tests, build)\n- ✅ Critically analyze code quality and maintainability\n- ✅ Verify Pythonic patterns and best practices\n- ✅ Check file organization and architecture\n- ✅ Ensure contributor-friendliness\n\n**Benefits:**\n- Catch issues before CI runs\n- Get immediate feedback on code quality\n- Learn Python best practices\n- Faster PR reviews\n\nSee [`.claude/README.md`](.claude/README.md) for complete documentation.\n\n## Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](docs/CONTRIBUTING.md) for guidelines.\n\n### Quick Contribution Guide\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes\n4. Run tests and linting (`make test lint`)\n5. **(Recommended)** Run PR review if using Claude Code (`/pre-pr`)\n6. Commit your changes (`git commit -m 'Add amazing feature'`)\n7. Push to the branch (`git push origin feature/amazing-feature`)\n8. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Designed for ham radio enthusiasts and Morse code practitioners\n- Built with modern Python best practices\n- Inspired by traditional CW decoder implementations with a focus on testability\n\n## Links\n\n- **Repository**: https://github.com/morria/continuous-wave\n- **Issue Tracker**: https://github.com/morria/continuous-wave/issues\n- **Documentation**: [README.md](README.md), [DESIGN.md](docs/DESIGN.md), [CONTRIBUTING.md](docs/CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorria%2Fcontinuous-wave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorria%2Fcontinuous-wave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorria%2Fcontinuous-wave/lists"}