-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Releases/2.4.1 #101
Merged
Merged
Releases/2.4.1 #101
Conversation
This file contains 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
Why? Combiner playlists that include playlist selectors previously did not include tracks that were added to those playlists in the same run. What? Delay the creation of the playlist selector tag -> track lookup until after any other TagParser implementations have been run. In addition, this MR inserts all auto-playlists into a folder called AUTO_PLAYLISTS so as to make it simpler to bulk import these playlists. Fixed broken image links for READMEs.
Why? The underlying `aiohttp` calls for the `spotify.playlist_builder` module occasionally timeout. These `TimeoutError` exceptions need to be caught so that potentially successful Reddit submissions retrievals can occur. What? Wrap the `asyncpraw` method that returns an AsyncGenerator with another generator which applies try / except logic that differentiates between `StopAsyncIteration` exceptions and other exceptions.
Why? Testing time should be minimized. What? Factor out `rekordbox.xml` loading into a session scoped fixture. Use `tmpdir_factory` to create a temporary directory which may be session scoped; use this temporary directory, in combination with the factored out `rekordbox.xml` loading fixture, in the `test_xml` fixture. Mock `os.system` calls in `test_upload_log` and `test_download_xml`. Minimize the amount of content in `rekordbox.xml` so as to speed up reading and writing that file.
Why? When looking at code using os.path operations, developers have to evaluate expressions the same way as the Python interpreter (inside -> out). By comparison, pathlib.Path uses method chaining which is much more intuitive. In addition, pathlib.Path accounts for the eccentricities of Windows paths under the hood; this means all the ridiculous `.replace(os.sep, "/")` calls can be removed. What? Replace all uses, where appropriate, of `os.path` with `pathlib.Path`.
Why? `USB_PATH` was being serialized as a `pathlib.Path` instead of a string when writing to `registered_users.yaml`. The return of the call to `subprocess.check_output` inside of `get_beatcloud_tracks` was not being decoded as a string. What? Have `USB_PATH` be a string type by default. Add a validator to `SyncConfig` to convert a non-empty string to a `pathlib.Path`. Add validation upon `SyncConfig` initialization to ensure `USB_PATH` exists before performing either the `DOWNLOAD_MUSIC` or `UPLOAD_MUSIC` operation. Cast `USB_PATH` to a string before writing it to `registered_users.yaml`. Fix bug where the output of `subprocess.check_output` was not being decoded.
* [FIX] Fix Unix/Windows discrepancies Why? The refactor to use `pathlib.Path` instead of `os.path` broke in some places where the paths used are still in the `WindowsPath` format. What? Ensure paths generated are in the Unix-style and, when not possible (in certain tests), comparisons are made with native path formats. Ensure Youtube-DL and `shutil.copyfile` are operating on posix paths.
[ENHANCEMENT] Collapse djtools directory Why? test_data was in the src directory creating an unnecessary level between the root and the library source. What? Move test_data to the project root, collapse src/djtools into djtools.
Why? The `--check-tracks` feature logs too verbosely and also omits info that would be nice to have such as the count of local files. There's also an uncaught error when trying to zip emtpy lists of tracks. What? Simplify logging and include local file counts. Skip comparison loop if there aren't any tracks.
* [ENHANCEMENT] Diataxis docs Why? There are no docs! What? Create docs. Use the Diataxis framework to organize the docs and use `mkdocs` and `mkdocstring` to generate the docs. Host the docs on GitHub Pages. Added a `.pylintrc` and linted the entire repo's `.py` files. A few functions were renamed for clarity. * `randomize_playlists` is not `shuffle_playlists` * `set_tag` is now `set_track_number` * `rekordbox_playlists` is now `build_playlists` * `get_playlist_track_locations` is now `get_playlist_tracks` The `Combiner` class was removed from `tag_parsers.py`, made to not inherit from `TagParser`, and moved into it's own module `playlist_combiner.py`.
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.
No description provided.