Skip to content

Commit

Permalink
Merge pull request #88 from iheartradio/track-genre-is-optional
Browse files Browse the repository at this point in the history
Genre Is Optional
  • Loading branch information
Leonard Bedner authored Feb 14, 2019
2 parents 6264c0f + dc04af3 commit 43f53e1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Changelog
=========

Version 2.3.0
==============

Released 2019-02-13

- Update ``genre`` to be ``Optional``

Version 2.2.0
==============

Expand Down
4 changes: 2 additions & 2 deletions pipeline/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def validate_schema(schema, message, logger=None):
'copyright': copyright,
'duration': str,
'explicitLyrics': bool,
'genre': str,
Optional('genre'): Any(None, str),
Optional('id'): Any(None, int),
Optional('internalId'): Any(None, str),
Optional('media'): Any(None, media),
Expand Down Expand Up @@ -356,7 +356,7 @@ def validate_schema(schema, message, logger=None):
track_schema = product.schema.copy()
track_schema.update({
Optional('alternativeName'): Any(None, str),
'genre': str,
Optional('genre'): Any(None, str),
Optional('grid'): Any(None, str),
'index': int,
'isrcCode': str,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='pipeline',
version='2.2.0',
version='2.3.0',
packages=find_packages(exclude=['tests']),
install_requires=[
'Henson>=0.5.0',
Expand Down
4 changes: 2 additions & 2 deletions tests/data/schema/valid-nulled-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
},
"duration": "PT3M55S",
"explicitLyrics": false,
"genre": "Deutschspr. HipHop /- Rap",
"genre": null,
"grid": null,
"index": 0,
"internalId": null,
Expand Down Expand Up @@ -141,4 +141,4 @@
],
"upc": "4260100940705",
"version": null
}
}

0 comments on commit 43f53e1

Please sign in to comment.