Skip to content

Commit

Permalink
clean up api
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed May 6, 2024
1 parent a0b9459 commit 57f7130
Show file tree
Hide file tree
Showing 11 changed files with 168 additions and 227 deletions.
36 changes: 16 additions & 20 deletions rose/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
UnsupportedFiletypeError,
)
from rose.cache import (
STORED_DATA_FILE_REGEX,
Collage,
DescriptorEntry,
GenreEntry,
Expand All @@ -13,27 +12,26 @@
Release,
Track,
artist_exists,
calculate_release_logtext,
calculate_track_logtext,
collage_exists,
descriptor_exists,
genre_exists,
get_collage,
get_collage_releases,
get_path_of_track_in_playlist,
get_playlist,
get_playlist_cover_path,
get_playlist_tracks,
get_release,
get_track,
get_tracks_associated_with_release,
get_tracks_of_release,
label_exists,
list_artists,
list_collages,
list_descriptors,
list_genres,
list_labels,
list_playlists,
make_release_logtext,
make_track_logtext,
maybe_invalidate_cache_database,
playlist_exists,
update_cache,
update_cache_evict_nonexistent_collages,
update_cache_evict_nonexistent_playlists,
Expand Down Expand Up @@ -91,27 +89,26 @@
from rose.templates import (
PathContext,
PathTemplate,
eval_release_template,
eval_track_template,
evaluate_release_template,
evaluate_track_template,
preview_path_templates,
)
from rose.tracks import dump_all_tracks, dump_track, run_actions_on_track

__all__ = [
# Plumbing
"initialize_logging",
"VERSION", # TODO: get_version()
"VERSION",
# Errors
"RoseError",
"RoseExpectedError",
"UnsupportedFiletypeError",
# Utilities
"sanitize_dirname",
"sanitize_filename",
"calculate_release_logtext", # TODO: Rename.
"calculate_track_logtext", # TODO: Rename.
"STORED_DATA_FILE_REGEX", # TODO: Revise: is_release_directory() / is_track_file()
"SUPPORTED_AUDIO_EXTENSIONS", # TODO: is_supported_audio_file()
"make_release_logtext",
"make_track_logtext",
"SUPPORTED_AUDIO_EXTENSIONS",
# Configuration
"Config",
# Cache
Expand All @@ -136,8 +133,8 @@
# Path Templates
"PathContext",
"PathTemplate",
"eval_release_template", # TODO: Rename.
"eval_track_template", # TODO: Rename.
"evaluate_release_template",
"evaluate_track_template",
"preview_path_templates",
# Releases
"Release",
Expand All @@ -155,7 +152,7 @@
"dump_all_tracks",
"dump_track",
"get_track",
"get_tracks_associated_with_release", # TODO: Rename: `get_tracks_of_release` / `dump_release(with_tracks=tracks)`
"get_tracks_of_release",
# Artists
"Artist",
"ArtistMapping",
Expand All @@ -176,30 +173,29 @@
# Collages
"Collage",
"add_release_to_collage",
"collage_exists",
"create_collage",
"delete_collage",
"dump_all_collages",
"dump_collage",
"edit_collage_in_editor", # TODO: Move editor part to CLI, make this file-submissions.
"get_collage",
"get_collage_releases",
"list_collages",
"remove_release_from_collage",
"rename_collage",
# Playlists
"Playlist",
"add_track_to_playlist",
"list_playlists",
"playlist_exists",
"create_playlist",
"delete_playlist",
"delete_playlist_cover_art",
"get_playlist",
"get_playlist_tracks",
"dump_all_playlists",
"dump_playlist",
"edit_playlist_in_editor", # TODO: Move editor part to CLI, make this file-submissions.
"get_path_of_track_in_playlist", # TODO: Redesign.
"get_playlist_cover_path", # TODO: Remove.
"remove_track_from_playlist",
"rename_playlist",
"set_playlist_cover_art",
Expand Down
Loading

0 comments on commit 57f7130

Please sign in to comment.