refactor: migrate to audio_downloader package, fix promo to Spots, filter NW date files, add --download-promo#5
Open
wardbryan3 wants to merge 11 commits into
Open
refactor: migrate to audio_downloader package, fix promo to Spots, filter NW date files, add --download-promo#5wardbryan3 wants to merge 11 commits into
wardbryan3 wants to merge 11 commits into
Conversation
Source files now live inside the audio_downloader/ package, so sibling module imports are updated from bare names to the package-qualified form (e.g. 'from config import' -> 'from audio_downloader.config import'). Also remove the sys.path.insert hack from main.py that is no longer needed now that the code is importable as a package.
- Update all bare imports (config, sources, browser_manager, download_utils) to use audio_downloader. prefix - Fix tests/__init__.py sys.path to point to project root (parent.parent) - Add sys.path.insert to test_downloads.py for project root discovery - Update mock patch paths in test_integration.py and test_browser_manager.py to use audio_downloader. prefix - Keep sys.path.insert lines in test files for direct execution
- audio_downloader/__main__.py enables 'python -m audio_downloader' - pyproject.toml enables 'pip install -e .' with setuptools backend - Declares dependencies: selenium, webdriver-manager, psutil
- bat scripts: cd to %~dp0.. to navigate from scripts/ to repo root - AGENTS.md: update all references from root-level .py files to audio_downloader/ paths - CI: update sed/git add to target audio_downloader/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reorganize the project into a proper
audio_downloaderPython package, fix promo file handling across multiple sources, and add CLI improvements for promo downloads.Changes
Package Reorganization (10 commits)
main.py,config.py,gui.py,browser_manager.py,constants.py,download_utils.py,sources/) intoaudio_downloader/packagepyproject.tomlwith setuptools build config andaudio_downloader/__main__.pyforpython -m audio_downloaderentry pointaudio_downloader.prefix, removingsys.path.insert(0,...)workaroundstests/and Windows batch files toscripts/for cleaner project rootAudioDownloader.spec) with new package paths and hidden imports.github/workflows/windows_build.ymlfor new file locationsAGENTS.mdwith new project structure and developer commandsPromo File Handling Fixes
Spots/directory instead of staying in the global features output directory. Promos are moved toSpots/WITC_PROMO_MM-DD-YY.mp3with dated filenames.NWoutdoors<6digits>.mp3are now skipped after ZIP extraction, preventing stale date-stamped content from being copied into the global features folder.Config & Path Changes
get_spots_dir()toConfigManager— creates and manages aSpots/subdirectory under the output baseSpots/toensure_folders()andvalidate_config()checks.gitignore: adddocs/superpowers/to ignore AI design docsCLI Improvements
--download-promoflag andrun_promo_download()function for downloading the Northwest Outdoors promo standalone via CLIpython -m audio_downloader --download-promoas a supported invocationscripts/download_global_features.bat,scripts/download_promos.bat) to use correct working directory (%~dp0..instead of%~dp0)Documentation
scripts/witc_promo_rename.bat— PowerShell-based WITC promo renaming script that finds the upcoming Saturday's promo and copies it toWITC_PROMO.mp3docs/superpowers/specs/2026-06-26-weekly-automation-design.mdcovering the future consolidated weekly download pipelineTesting
audio_downloader.prefix, new module paths)audio_downloader.package referencestest_weekend_in_the_country.py) to verify promos are moved toSpots/directory instead of staying in-place — all 8 tests passtest_northwest_outdoors_date_stamped_file_filtertotest_sources.py— verifies the regex pattern for filteringNWoutdoors<6digits>.mp3filessys.path.insert(0,...)hacks from test files, using proper package imports insteadTest Plan