Skip to content

Commit cdb3aec

Browse files
committed
Enhance project structure and functionality
- Introduced new `scanners` module with `AUScanner` and `VST3Scanner` classes for improved plugin scanning. - Added `__init__.py` files to `scanners` and `tests/scanners` directories to treat them as packages. - Updated `build.sh` for streamlined build and testing processes, including type checks and package installation. - Refactored `core.py` and `data.py` for better organization and type safety. - Improved `pyproject.toml` with updated dependencies and configurations for development tools. - Enhanced README.md with detailed project description and usage instructions. - Added unit tests for the new scanner classes to ensure functionality and reliability.
1 parent 4de68c4 commit cdb3aec

13 files changed

Lines changed: 2998 additions & 1672 deletions

File tree

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
- Created PLAN.md for implementation roadmap
12+
- Created TODO.md for task tracking
13+
- Created CHANGELOG.md for version history
14+
15+
### Changed
16+
- Refactored scanner architecture to use modular scanner classes
17+
- Improved type annotations throughout the codebase
18+
19+
### Fixed
20+
- Fixed duplicate imports in scanner.py
21+
- Fixed duplicate full_scan method definitions
22+
- Fixed missing attributes in PedalboardScanner class (ignores, ignores_path)
23+
- Fixed incorrect method calls to scanner instances
24+
- Fixed parameter order in save_json_file calls
25+
- Fixed VST3Scanner inheritance issue (removed BaseScanner dependency)
26+
- Fixed missing scan_plugin method implementations in scanner classes
27+
28+
### Removed
29+
- Removed obsolete scan_aufx_plugins and scan_vst3_plugins methods
30+
- Removed redundant BaseScanner class definition in scanner.py
31+
- Removed unnecessary type aliases in scanner modules
32+
33+
## [1.1.0] - Previous Release
34+
35+
### Added
36+
- Added `update` CLI command which only scans plugins that aren't cached yet
37+
- Added `json` and `yaml` CLI commands
38+
39+
### Changed
40+
- Additional refactorings
41+
42+
## [1.0.0] - Initial Release
43+
44+
### Added
45+
- Initial release with basic scanning and listing of both VST-3 and AU plugins
46+
- Command-line interface for easy interaction
47+
- Support for macOS and Windows (Windows untested)
48+
- Plugin parameter extraction with default values
49+
- JSON cache file for plugin information
50+
- Blacklist functionality for problematic plugins

PLAN.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Pedalboard Pluginary - Implementation Plan
2+
3+
## Overview
4+
This document outlines the implementation plan for improving Pedalboard Pluginary, a Python package that scans and catalogs VST-3 and AU audio plugins.
5+
6+
## Project Goals
7+
1. Improve type safety and code quality
8+
2. Add async support for better performance
9+
3. Implement progress callbacks for long-running operations
10+
4. Add caching mechanism for scan results
11+
5. Enhance error handling and resilience
12+
6. Update documentation and build tooling
13+
14+
## Current State Analysis
15+
- The project has a solid foundation with scanner classes for VST3 and AU plugins
16+
- Uses Pedalboard library for plugin loading
17+
- Has basic CLI interface using Fire
18+
- Includes test coverage with pytest
19+
- Has models.py with typed data structures (PluginInfo, PluginParameter)
20+
- Has duplicate code and inconsistencies in scanner.py
21+
22+
## Planned Improvements
23+
24+
### Phase 1: Code Cleanup and Consistency
25+
- [ ] Fix duplicate imports and class definitions in scanner.py
26+
- [ ] Remove redundant scanner methods (scan_aufx_plugins, scan_vst3_plugins)
27+
- [ ] Ensure consistent use of typed models throughout
28+
- [ ] Fix mypy type checking issues
29+
30+
### Phase 2: Enhanced Type Safety
31+
- [ ] Add proper type annotations for all functions
32+
- [ ] Create Protocol definitions for plugin interfaces
33+
- [ ] Add runtime type validation for external data
34+
- [ ] Ensure all pedalboard imports have proper type ignores
35+
36+
### Phase 3: Async Support
37+
- [ ] Convert scanner classes to support async operations
38+
- [ ] Add asyncio-based concurrent plugin scanning
39+
- [ ] Implement async file I/O for cache operations
40+
- [ ] Add CLI support for async operations
41+
42+
### Phase 4: Progress and Callbacks
43+
- [ ] Add progress callback interface to scanners
44+
- [ ] Implement tqdm progress bars for CLI
45+
- [ ] Add programmatic progress callbacks for library usage
46+
- [ ] Support cancellation of long-running scans
47+
48+
### Phase 5: Caching Improvements
49+
- [ ] Implement proper cache invalidation strategy
50+
- [ ] Add cache versioning for compatibility
51+
- [ ] Support partial cache updates
52+
- [ ] Add cache statistics and management commands
53+
54+
### Phase 6: Error Handling
55+
- [ ] Create custom exception hierarchy
56+
- [ ] Add retry logic for transient failures
57+
- [ ] Improve error messages and logging
58+
- [ ] Add plugin validation before caching
59+
60+
### Phase 7: Documentation and Tooling
61+
- [ ] Update README with new features
62+
- [ ] Add API documentation with examples
63+
- [ ] Configure GitHub Actions for CI/CD
64+
- [ ] Set up proper code coverage reporting
65+
- [ ] Add pre-commit hooks for code quality
66+
67+
## Technical Decisions
68+
1. Keep Python 3.9 as minimum version for wider compatibility
69+
2. Use asyncio for async support (not trio or other alternatives)
70+
3. Maintain backward compatibility with existing API
71+
4. Use pydantic for enhanced data validation (optional dependency)
72+
5. Keep Fire for CLI but add proper argument parsing
73+
74+
## Success Criteria
75+
- All tests pass with 90%+ coverage
76+
- Type checking passes with strict mypy settings
77+
- Documentation is complete and accurate
78+
- Performance improves for large plugin libraries
79+
- Error handling is robust and informative

TODO.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Pedalboard Pluginary - TODO List
2+
3+
## High Priority
4+
5+
### Code Cleanup
6+
- [x] Create PLAN.md and TODO.md files
7+
- [ ] Fix duplicate imports in scanner.py
8+
- [ ] Remove redundant BaseScanner class definition
9+
- [ ] Fix duplicate full_scan method in PedalboardScanner
10+
- [ ] Remove obsolete scan_aufx_plugins and scan_vst3_plugins methods
11+
- [ ] Clean up imports and organize them properly
12+
13+
### Type Safety
14+
- [ ] Fix mypy errors in scanner.py
15+
- [ ] Add proper type annotations for pedalboard imports
16+
- [ ] Fix PedalboardPluginType alias usage
17+
- [ ] Add Protocol definitions for plugin interfaces
18+
19+
### Critical Bugs
20+
- [ ] Fix scanner initialization (missing ignores attribute)
21+
- [ ] Fix scanner method calls in PedalboardScanner
22+
- [ ] Ensure proper plugin loading with correct pedalboard API
23+
24+
## Medium Priority
25+
26+
### Async Support
27+
- [ ] Create async versions of scanner classes
28+
- [ ] Implement concurrent plugin scanning
29+
- [ ] Add async file I/O operations
30+
- [ ] Update CLI to support async operations
31+
32+
### Progress Callbacks
33+
- [ ] Define progress callback protocol
34+
- [ ] Add progress support to scanner classes
35+
- [ ] Integrate tqdm for CLI progress
36+
- [ ] Add cancellation support
37+
38+
### Caching
39+
- [ ] Implement cache versioning
40+
- [ ] Add cache validation on load
41+
- [ ] Support incremental cache updates
42+
- [ ] Add cache management CLI commands
43+
44+
### Error Handling
45+
- [ ] Create custom exception classes
46+
- [ ] Add proper error handling in scanners
47+
- [ ] Implement retry logic for failures
48+
- [ ] Improve error messages
49+
50+
## Low Priority
51+
52+
### Documentation
53+
- [ ] Update README with new features
54+
- [ ] Add API documentation
55+
- [ ] Create usage examples
56+
- [ ] Document configuration options
57+
58+
### Build and CI
59+
- [ ] Set up GitHub Actions workflow
60+
- [ ] Configure codecov integration
61+
- [ ] Add pre-commit hooks
62+
- [ ] Update build.sh script
63+
64+
### Testing
65+
- [ ] Increase test coverage to 90%+
66+
- [ ] Add integration tests
67+
- [ ] Add performance benchmarks
68+
- [ ] Test on Windows platform
69+
70+
## Future Enhancements
71+
- [ ] Add plugin preset management
72+
- [ ] Support for CLAP plugins
73+
- [ ] Plugin categorization and tagging
74+
- [ ] Export to different formats (CSV, etc.)
75+
- [ ] Web UI for plugin management
76+
77+
## Notes
78+
- Maintain backward compatibility
79+
- Focus on reliability over features
80+
- Keep dependencies minimal
81+
- Ensure cross-platform compatibility

build.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
# this_file: build.sh
3+
4+
set -e # Exit on error
5+
6+
echo "🧹 Cleaning up previous builds..."
7+
rm -rf build/ dist/ *.egg-info .eggs/ .pytest_cache/ .coverage .tox/ .mypy_cache/
8+
9+
echo "🔍 Running type checks with mypy..."
10+
python -m mypy src/pedalboard_pluginary
11+
12+
echo "�� Running tests..."
13+
PYTHONPATH=src pytest tests/ -p no:flake8 -p no:briefcase
14+
15+
echo "📦 Building package..."
16+
python -m build
17+
18+
echo "🚀 Installing locally..."
19+
pip install -e .
20+
21+
echo "✨ Build and installation complete!"

0 commit comments

Comments
 (0)