Skip to content

Remove song#226

Open
CupOfGeo wants to merge 415 commits intojohnwmillr:masterfrom
CupOfGeo:remove_song
Open

Remove song#226
CupOfGeo wants to merge 415 commits intojohnwmillr:masterfrom
CupOfGeo:remove_song

Conversation

@CupOfGeo
Copy link

#225
Hey just wanted to add this little function sometimes i would get songs not even in english and would just have to filter while saving. lmk if i need to fix anything. The tests ran successful

johnwmillr and others added 30 commits December 4, 2018 08:09
…rics

Change self.artist to self.name in Artist.save_lyrics
…cs-again

Use proper get method on _body dict in Song objects
Add assertion requiring python3 in setup.py
Refactor artist to make use of Song.save_lyrics()
allerter and others added 23 commits September 27, 2020 10:50
Improve non-song filtering in search_song() and _get_item_from_search_response()
Add OAuth2 class, remaining API endpoints and some docs for contribution
…#162)

* made token optional in Genius,
moved Artist and Song to types
added TokenRequiredError
updated docs,

* docstring: method parameter updated

* docs: update snippet

* docstring: update search_song

* docstring: song.save_lyrics update

* updated check_token,
added public_api to methods (incomplete)

* added public_api to the rest,
added the public_api attr to Genius,
removed pytest from dependencies

* update validate_token,
update TokenRequiredError,
update overlapping methods

* fix flake8 error

* add docs

* updated docs, added test_suite

* Revert "updated docs, added test_suite"

This reverts commit 3386282644198706639e858098af18b560976ccd.

* added tearDown to close Session

* fix tearDown,
updated search_song,
updated genius.py imports

* added checking token in overlapping methods,
fixed a ArtistMethods test,
updated genius.song_annotations and genius.lyrics

* update artist.add_song

* add -tl arg to __main__,
add docs

* handle headers better in _make_request

* fix access_token=None

* fix doc8 error

* added class methods for token and code auth flow,
add examples to snippets

* add API methods to Genius docs,
update docs

* add fixtures to gitignore

* updated song_annotations returned result,
fixed test_song_annotations

* reconfigured types and added album

* add tests for album

* added retries,
made all imports relative,
moved save_lyrics to BsaeEntity,
changed _validate_token to check token when using Genius(token)

* add info to AssertionError

* removed token-less Genius

* fix import error

* fix OAuth2 and PublicMethods test errors

* fix test error

* switch to AWS Graviton2 for Travis CI builds

* fix flake8 error

* reconfigure types,
add Album and search_album,
add song_id to search_song
update adding info to song in search_artist

* add testing passing nothing or song ID to search_song

* fix search_song() test

* update determining filename in save_lyrics

* added getting token from env vars as fallback,
added auth_from_environment,
changed Travis CI dist to xenial

* removed redundant docstrings,
added artist to Song.to_dict

* fix test_auth_from_environment

* update types docs

* updated OAuth2 docstrings

* - removed _validate_token,
- added Song.lyrics defaulting to "" if lyrics amounts to False (when None is passed)
- added printing a more descriptive message when lyrics section isn't found,
- fixed a snippet

* revert Travis CI configs

* - updated unavailable public API endpoints (discussion methods),
- added "discussions" public API endpoint,
- updated docs

* fixed errors (1 flake8 error)

* * added Genius.tag(),
reconfigured Genius.lyrics() to:
    * fetch the page through the Sender
    * extract the lyrics not only more concisely, but also without changing the original format of the lyrics (adding newlines)
* reconfigured Sender to:
    * allow making requests to Genius at https://genius.com
    * remove SLEEP_TIME to allow users to supply their own rate limiting (by default 0.2) instead of enforcing it
    * move the authorization header to the authorization_header attribute instead of re-creating it for every API call

* * reconfigured _result_is_lyrics:
    * to check lyrics_state along with the title
* reconfigured search_* that return an object:
    * to check lyrics_state to avoid getting empty lyrics
* moved setting excluded_terms to __init__
* moved _clean_str to utils and renamed to clean_str
* added tests for genius.tag
* reordered some of the imports and the functions alphabetically

* - improve genius.tag()
- fix genius.tag() example

* * __main__.py: Fixed importing `Genius` and added `album` to `search_type`.

* * fixed `test_tag_first_result`

* Add stylistic changes for clarity in README

* Clarify wording in how_it_works.rst

* Remove line about optional access token

* Fix disscussion typo

* Fix typos

* * bumped sphinx to 3.3.0
* added text_format parameter to account()
* added try/finally close to test_manage_annotation to try to delete created annotation if an exception occurs

Co-authored-by: johnwmillr <john.w.millr@gmail.com>
* Update __main__.py

To fix error with printing unicode

* Update api.py

Fix problem with printing unicode

* added print_unicode,
added encoding='utf8' when saving text files

* updated __main__,
updated utils

* made token optional in Genius,
moved Artist and Song to types
added TokenRequiredError
updated docs,

* docstring: method parameter updated

* docs: update snippet

* docstring: update search_song

* docstring: song.save_lyrics update

* updated check_token,
added public_api to methods (incomplete)

* added public_api to the rest,
added the public_api attr to Genius,
removed pytest from dependencies

* update validate_token,
update TokenRequiredError,
update overlapping methods

* fix flake8 error

* add docs

* updated docs, added test_suite

* Revert "updated docs, added test_suite"

This reverts commit 3386282644198706639e858098af18b560976ccd.

* added tearDown to close Session

* fix tearDown,
updated search_song,
updated genius.py imports

* added checking token in overlapping methods,
fixed a ArtistMethods test,
updated genius.song_annotations and genius.lyrics

* update artist.add_song

* add -tl arg to __main__,
add docs

* handle headers better in _make_request

* fix access_token=None

* fix doc8 error

* added class methods for token and code auth flow,
add examples to snippets

* add API methods to Genius docs,
update docs

* add fixtures to gitignore

* updated song_annotations returned result,
fixed test_song_annotations

* reconfigured types and added album

* add tests for album

* added retries,
made all imports relative,
moved save_lyrics to BsaeEntity,
changed _validate_token to check token when using Genius(token)

* add info to AssertionError

* removed token-less Genius

* fix import error

* fix OAuth2 and PublicMethods test errors

* fix test error

* switch to AWS Graviton2 for Travis CI builds

* fix flake8 error

* reconfigure types,
add Album and search_album,
add song_id to search_song
update adding info to song in search_artist

* add testing passing nothing or song ID to search_song

* fix search_song() test

* update determining filename in save_lyrics

* added getting token from env vars as fallback,
added auth_from_environment,
changed Travis CI dist to xenial

* removed redundant docstrings,
added artist to Song.to_dict

* fix test_auth_from_environment

* update types docs

* updated OAuth2 docstrings

* - removed _validate_token,
- added Song.lyrics defaulting to "" if lyrics amounts to False (when None is passed)
- added printing a more descriptive message when lyrics section isn't found,
- fixed a snippet

* revert Travis CI configs

* - updated unavailable public API endpoints (discussion methods),
- added "discussions" public API endpoint,
- updated docs

* fixed errors (1 flake8 error)

* * added Genius.tag(),
reconfigured Genius.lyrics() to:
    * fetch the page through the Sender
    * extract the lyrics not only more concisely, but also without changing the original format of the lyrics (adding newlines)
* reconfigured Sender to:
    * allow making requests to Genius at https://genius.com
    * remove SLEEP_TIME to allow users to supply their own rate limiting (by default 0.2) instead of enforcing it
    * move the authorization header to the authorization_header attribute instead of re-creating it for every API call

* * reconfigured _result_is_lyrics:
    * to check lyrics_state along with the title
* reconfigured search_* that return an object:
    * to check lyrics_state to avoid getting empty lyrics
* moved setting excluded_terms to __init__
* moved _clean_str to utils and renamed to clean_str
* added tests for genius.tag
* reordered some of the imports and the functions alphabetically

* - improve genius.tag()
- fix genius.tag() example

* * __main__.py: Fixed importing `Genius` and added `album` to `search_type`.

* * fixed `test_tag_first_result`

* Add stylistic changes for clarity in README

* Clarify wording in how_it_works.rst

* Remove line about optional access token

* Fix disscussion typo

* Fix typos

* * bumped sphinx to 3.3.0
* added text_format parameter to account()
* added try/finally close to test_manage_annotation to try to delete created annotation if an exception occurs

* - added safe_unicode
- genius.tag(): replaced unicodedata.normalize with only replacing \xa0

* Delete artist.py

* Delete song.py

* Update base.py

* Update artist.py

Co-authored-by: Darrel Donald <darrel.donald@utdallas.edu>
Co-authored-by: Allerter <45076212+Allerter@users.noreply.github.com>
Co-authored-by: johnwmillr <john.w.millr@gmail.com>
Co-authored-by: John W. Miller <johnwmillr@users.noreply.github.com>
* Update to origin (johnwmillr#8)

* added auth

* added voting methods for annotations

* renamed client_access_token to access_token

* added documentation for authorization,
renamed all instances of client_access_token to access_token

* fixed instance parse_redirected_url didn't work with 'token' flow

* added OAuth2 documentation,
modified OAuth2 to make it user-friendlier

* removed Authenticating yourself from snippets,
added missing commas

* Revert "removed Authenticating yourself from snippets,"

This reverts commit d2e99bb.

* added missing comma

* added more missing commas

* added missing word in sippets

* changed get_user_auth_url to auth.url property,
changed 'all' scope type to tuple,
fixed combining scopes (changed ',' to ' ')

* changed calling get_user_auth_url to url

* fixed client_only_app not in OAuth2 attributes

* fixed parse_redirected_url

* set None in POST body params when optional annotation parameteres aren't supplied

* revert to current _make_request

* fixed typo

* added some docs, fixed new methods' payload

* fixed response for 204 response,
added tests

* fixed added test bugs

* fixed update_annotation and added its test,
added docs for contributing

* added example redirect uri to snippets

* commit changes

* add text_format to API annotation methods

* fixed prompt_user bug

* fix flake8 error

* fixed bugs, added auth tests

* fix test_url error

* fix wrong function name

* removed test_url

Co-authored-by: John W. Miller <johnwmillr@users.noreply.github.com>

* - added encoding using utf-8 when saving files
- removed binary encoding
- genius.tag(): replaced unicodedata.normalize with only replacing \xa0
- fixed IndentationError
- __main__: made import relative

* fix flake8 error

Co-authored-by: John W. Miller <johnwmillr@users.noreply.github.com>
* Added vcr support for consistent tests

* added vcr to tests

* changed displaying types attributes as table in docs

* add vcrpy to requirements

* test tox.ini

* Revert "test tox.ini"

This reverts commit 33f096c.

* removed except in tests

* merge pr/109 into docs

* merge pr/109 into docs

* - added checking for the instrumental attribute in song info
- added a couple comments

* added instrumental attribute to types.Song

* Revert "merge pr/109 into docs"

This reverts commit c1221ae.

* add Song.instrumental to docs

* - add instrumental to to_dict
- use dict.get to determine instrumental value

* set retries to 3

* - Genius: removed checking instrumental in search_artist (genius.artist_songs doesn't return that key in song info)
- types.Song: removed Song.instrumental
- clean_str(): change normalization method to NKFC
- docs/snippets: changes in snippets titles

* add some description for charts

* remove Song.instrumental references

* added raising TypeError when no token/empty token is passed

* - renamed album.songs to album.tracks
- added Track type
- docs: added 'release_data' to sort options in artist_songs
- docs: added track docs

* added importing Track from types

* - fixed issues in Track
- added __repr__ for track

* - reconfigured get_user_token to accept code and state parameters
- updated snippets
- added InvalidState for when self.state and passed state don't match

* - updated get_user_token docstring
- moved InvalidState exception to errors.py

* - removed test_get_user_token_client_flow as its unnecessary
- fixed prompt_user to allow the code flow

* - refactored get_user_token to allow use by token flow
- added some tests for auth

* removed redundant requirements.txt file

* fixed tests issue

* - added page_data endpoint to PublicAPI
- added newline after docstring where missing

* handle instance where error response might not be json

* added test for page_data

* fix typo in artist ID in example and test

* fixed TypeError when instantiating PublicAPI directly with no token present in env vars
fixed page_data for song which returned 404

* use built-in class name to define public api constructor

* genius.lyrics: broke down urlthing parameter into song_url and song_id

* added non-breaking space to punctuation words
(genius adds this character before strings that their first letter is lower case)

* linked to the snippets page in the usage page

* Revert "add vcrpy to requirements"
This reverts commit 92816fd.

* Revert adding vcrpy to tests

* Remove VCR from test_base.py

* Remove VCR from test_genius.py and test_public_methods.py

* Update version to 3.0.0

* added release notes for 3.0.0

* Set release date to 2021-02-08

Co-authored-by: ludehon <luciendehon@gmail.com>
Co-authored-by: johnwmillr <john.w.millr@gmail.com>
* Fix error when album contains only year information

* Update to 3.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.