diff --git a/README.rst b/README.rst index a109529..d1c0afa 100644 --- a/README.rst +++ b/README.rst @@ -171,6 +171,8 @@ Development - Add exclusion of card layouts (to catch tokens in non-token sets) - Add (optional, default) exclusion of non-English cards/sets (e.g. Renaissance) +- Add (optional, default) merging of set promos into their respective + sets 2.3.0 ----- diff --git a/mtg_ssm/containers/bundles.py b/mtg_ssm/containers/bundles.py index bd45001..a2d8576 100644 --- a/mtg_ssm/containers/bundles.py +++ b/mtg_ssm/containers/bundles.py @@ -19,19 +19,38 @@ def filter_cards_and_sets( exclude_card_layouts: Optional[Set[ScryCardLayout]] = None, exclude_digital: bool = False, exclude_foreing_only: bool = False, + merge_promos: bool = False, ) -> ScryfallDataSet: """Filter a ScryfallDataSet to exclude desired set types, card layouts, and digital only products.""" accepted_setcodes = set() + remapped_setcodes = {} for set_ in scryfall_data.sets: if exclude_set_types and set_.set_type in exclude_set_types: continue if exclude_digital and set_.digital: continue + if ( + merge_promos + and set_.set_type == ScrySetType.PROMO + and set_.parent_set_code is not None + ): + remapped_setcodes[set_.code] = set_.parent_set_code + continue accepted_setcodes.add(set_.code) accepted_cards = [] nonempty_setcodes = set() for card in scryfall_data.cards: + while card.set in remapped_setcodes: + collector_number = card.collector_number + if collector_number.isdigit(): + collector_number += "p" + card = card.copy( + update={ + "set": remapped_setcodes[card.set], + "collector_number": collector_number, + } + ) if card.set not in accepted_setcodes: continue if exclude_card_layouts and card.layout in exclude_card_layouts: diff --git a/mtg_ssm/serialization/xlsx.py b/mtg_ssm/serialization/xlsx.py index acdaa8b..857c0e2 100644 --- a/mtg_ssm/serialization/xlsx.py +++ b/mtg_ssm/serialization/xlsx.py @@ -163,8 +163,8 @@ def style_all_cards(sheet: Worksheet) -> None: "have", "value", "name", + "number", "scryfall_id", - "collector_number", "artist", "price", "foil_price", @@ -215,8 +215,8 @@ def create_set_sheet( HAVE_TMPL.format(rownum=rownum), VALUE_TMPL.format(rownum=rownum), card.name, - str(card.id), card.collector_number, + str(card.id), card.artist, (card.prices or {}).get("usd", None), (card.prices or {}).get("usd_foil", None), @@ -230,17 +230,17 @@ def create_set_sheet( def style_set_sheet(sheet: Worksheet) -> None: """Apply styles to a set sheet.""" - sheet.freeze_panes = sheet["C2"] + sheet.freeze_panes = sheet["E2"] col_width_hidden_format = [ ("A", 5, False, None), ("B", 9, False, FORMAT_CURRENCY_USD_SIMPLE), ("C", 24, False, None), - ("D", 10, True, None), - ("E", 8, True, None), + ("D", 7, False, None), + ("E", 10, True, None), ("F", 20, True, None), ("G", 9, True, FORMAT_CURRENCY_USD_SIMPLE), ("H", 9, True, FORMAT_CURRENCY_USD_SIMPLE), - ("I", 8, False, None), + ("I", 7, False, None), ("J", 6, False, None), ("K", 10, False, None), ] diff --git a/mtg_ssm/ssm.py b/mtg_ssm/ssm.py index f40b787..7ffc0df 100644 --- a/mtg_ssm/ssm.py +++ b/mtg_ssm/ssm.py @@ -77,6 +77,13 @@ def get_args(args: Optional[List[str]] = None) -> argparse.Namespace: help="Include foreign only cards/sets (e.g. Renaissance)", ) + parser.add_argument( + "--separate-promos", + default=False, + action="store_true", + help="Treat set promos as a separate set/tab", + ) + default_exclude_set_types = {ScrySetType.MEMORABILIA, ScrySetType.TOKEN} parser.add_argument( "--exclude-set-types", @@ -178,6 +185,7 @@ def get_oracle( exclude_card_layouts: Set[ScryCardLayout], include_digital: bool, include_foreign_only: bool, + separate_promos: bool, ) -> Oracle: """Get a card_db with current mtgjson data.""" scrydata = fetcher.scryfetch() @@ -187,6 +195,7 @@ def get_oracle( exclude_card_layouts=exclude_card_layouts, exclude_digital=not include_digital, exclude_foreing_only=not include_foreign_only, + merge_promos=not separate_promos, ) return Oracle(scrydata) @@ -279,6 +288,7 @@ def main() -> None: exclude_card_layouts=args.exclude_card_layouts, include_digital=args.include_digital, include_foreign_only=args.include_foreign_only, + separate_promos=args.separate_promos, ) args.func(args, oracle) diff --git a/tests/serialization/snapshots/test_xlsx/test_create_set_sheet/ICE.csv b/tests/serialization/snapshots/test_xlsx/test_create_set_sheet/ICE.csv index 2c1a153..19b1ced 100644 --- a/tests/serialization/snapshots/test_xlsx/test_create_set_sheet/ICE.csv +++ b/tests/serialization/snapshots/test_xlsx/test_create_set_sheet/ICE.csv @@ -1,6 +1,6 @@ -have,value,name,scryfall_id,collector_number,artist,price,foil_price,nonfoil,foil,others -=I2+J2,=I2*G2+J2*H2,Dark Ritual,4ebcd681-1871-4914-bcd7-6bd95829f6e0,120,Justin Hampton,1.05,,,,"=IF('LEA'!A3>0,""LEA: ""&'LEA'!A3&"", "","""")&IF('HOP'!A3>0,""HOP: ""&'HOP'!A3&"", "","""")" -=I3+J3,=I3*G3+J3*H3,Forest,fbdcbd97-90a9-45ea-94f6-2a1c6faaf965,380,Pat Morrissey,0.88,,1,, -=I4+J4,=I4*G4+J4*H4,Forest,b346b784-7bde-49d0-bfa9-56236cbe19d9,381,Pat Morrissey,1.01,,,2, -=I5+J5,=I5*G5+J5*H5,Forest,768c4d8f-5700-4f0a-9ff2-58422aeb1dac,382,Pat Morrissey,0.4,,3,4, -=I6+J6,=I6*G6+J6*H6,Snow-Covered Forest,4c0ad95c-d62c-4138-ada0-fa39a63a449e,383,Pat Morrissey,1.88,,,, +have,value,name,number,scryfall_id,artist,price,foil_price,nonfoil,foil,others +=I2+J2,=I2*G2+J2*H2,Dark Ritual,120,4ebcd681-1871-4914-bcd7-6bd95829f6e0,Justin Hampton,1.05,,,,"=IF('LEA'!A3>0,""LEA: ""&'LEA'!A3&"", "","""")&IF('HOP'!A3>0,""HOP: ""&'HOP'!A3&"", "","""")" +=I3+J3,=I3*G3+J3*H3,Forest,380,fbdcbd97-90a9-45ea-94f6-2a1c6faaf965,Pat Morrissey,0.88,,1,, +=I4+J4,=I4*G4+J4*H4,Forest,381,b346b784-7bde-49d0-bfa9-56236cbe19d9,Pat Morrissey,1.01,,,2, +=I5+J5,=I5*G5+J5*H5,Forest,382,768c4d8f-5700-4f0a-9ff2-58422aeb1dac,Pat Morrissey,0.4,,3,4, +=I6+J6,=I6*G6+J6*H6,Snow-Covered Forest,383,4c0ad95c-d62c-4138-ada0-fa39a63a449e,Pat Morrissey,1.88,,,, diff --git a/tests/serialization/snapshots/test_xlsx/test_write/02 - LEA.csv b/tests/serialization/snapshots/test_xlsx/test_write/02 - LEA.csv index 1f7b487..ac4b225 100644 --- a/tests/serialization/snapshots/test_xlsx/test_write/02 - LEA.csv +++ b/tests/serialization/snapshots/test_xlsx/test_write/02 - LEA.csv @@ -1,5 +1,5 @@ -have,value,name,scryfall_id,collector_number,artist,price,foil_price,nonfoil,foil,others -=I2+J2,=I2*G2+J2*H2,Air Elemental,69c3b2a3-0daa-4d42-832d-fcdfda6555ea,46,Richard Thomas,,,,, -=I3+J3,=I3*G3+J3*H3,Dark Ritual,ebb6664d-23ca-456e-9916-afcd6f26aa7f,98,Sandra Everingham,309,,,,"=IF('ICE'!A2>0,""ICE: ""&'ICE'!A2&"", "","""")&IF('HOP'!A3>0,""HOP: ""&'HOP'!A3&"", "","""")" -=I4+J4,=I4*G4+J4*H4,Forest,6f1c8cb0-38eb-408b-94e8-16db83999b3b,294,Christopher Rush,60.28,,,, -=I5+J5,=I5*G5+J5*H5,Forest,f20c89d9-71c9-45f5-a9cb-6e253b0a7cca,295,Christopher Rush,84.35,,,, +have,value,name,number,scryfall_id,artist,price,foil_price,nonfoil,foil,others +=I2+J2,=I2*G2+J2*H2,Air Elemental,46,69c3b2a3-0daa-4d42-832d-fcdfda6555ea,Richard Thomas,,,,, +=I3+J3,=I3*G3+J3*H3,Dark Ritual,98,ebb6664d-23ca-456e-9916-afcd6f26aa7f,Sandra Everingham,309,,,,"=IF('ICE'!A2>0,""ICE: ""&'ICE'!A2&"", "","""")&IF('HOP'!A3>0,""HOP: ""&'HOP'!A3&"", "","""")" +=I4+J4,=I4*G4+J4*H4,Forest,294,6f1c8cb0-38eb-408b-94e8-16db83999b3b,Christopher Rush,60.28,,,, +=I5+J5,=I5*G5+J5*H5,Forest,295,f20c89d9-71c9-45f5-a9cb-6e253b0a7cca,Christopher Rush,84.35,,,, diff --git a/tests/serialization/snapshots/test_xlsx/test_write/03 - FEM.csv b/tests/serialization/snapshots/test_xlsx/test_write/03 - FEM.csv index 0aa1534..24d55b7 100644 --- a/tests/serialization/snapshots/test_xlsx/test_write/03 - FEM.csv +++ b/tests/serialization/snapshots/test_xlsx/test_write/03 - FEM.csv @@ -1,5 +1,5 @@ -have,value,name,scryfall_id,collector_number,artist,price,foil_price,nonfoil,foil,others -=I2+J2,=I2*G2+J2*H2,Thallid,4caaf31b-86a9-485b-8da7-d5b526ed1233,74a,"Edward P. Beard, Jr.",0.23,,,, -=I3+J3,=I3*G3+J3*H3,Thallid,80f8f778-ae31-45cd-b27f-f93a07853ede,74b,Jesper Myrfors,0.19,,,, -=I4+J4,=I4*G4+J4*H4,Thallid,2cf2f3da-9101-439d-8caa-910ff40bfbb3,74c,Ron Spencer,0.24,,,, -=I5+J5,=I5*G5+J5*H5,Thallid,01827286-b104-41c5-bac9-7c38414bc40e,74d,Daniel Gelon,0.18,,,, +have,value,name,number,scryfall_id,artist,price,foil_price,nonfoil,foil,others +=I2+J2,=I2*G2+J2*H2,Thallid,74a,4caaf31b-86a9-485b-8da7-d5b526ed1233,"Edward P. Beard, Jr.",0.23,,,, +=I3+J3,=I3*G3+J3*H3,Thallid,74b,80f8f778-ae31-45cd-b27f-f93a07853ede,Jesper Myrfors,0.19,,,, +=I4+J4,=I4*G4+J4*H4,Thallid,74c,2cf2f3da-9101-439d-8caa-910ff40bfbb3,Ron Spencer,0.24,,,, +=I5+J5,=I5*G5+J5*H5,Thallid,74d,01827286-b104-41c5-bac9-7c38414bc40e,Daniel Gelon,0.18,,,, diff --git a/tests/serialization/snapshots/test_xlsx/test_write/04 - ICE.csv b/tests/serialization/snapshots/test_xlsx/test_write/04 - ICE.csv index 57a5e87..128c0e3 100644 --- a/tests/serialization/snapshots/test_xlsx/test_write/04 - ICE.csv +++ b/tests/serialization/snapshots/test_xlsx/test_write/04 - ICE.csv @@ -1,6 +1,6 @@ -have,value,name,scryfall_id,collector_number,artist,price,foil_price,nonfoil,foil,others -=I2+J2,=I2*G2+J2*H2,Dark Ritual,4ebcd681-1871-4914-bcd7-6bd95829f6e0,120,Justin Hampton,1.05,,,,"=IF('LEA'!A3>0,""LEA: ""&'LEA'!A3&"", "","""")&IF('HOP'!A3>0,""HOP: ""&'HOP'!A3&"", "","""")" -=I3+J3,=I3*G3+J3*H3,Forest,fbdcbd97-90a9-45ea-94f6-2a1c6faaf965,380,Pat Morrissey,0.88,,,, -=I4+J4,=I4*G4+J4*H4,Forest,b346b784-7bde-49d0-bfa9-56236cbe19d9,381,Pat Morrissey,1.01,,,, -=I5+J5,=I5*G5+J5*H5,Forest,768c4d8f-5700-4f0a-9ff2-58422aeb1dac,382,Pat Morrissey,0.4,,,, -=I6+J6,=I6*G6+J6*H6,Snow-Covered Forest,4c0ad95c-d62c-4138-ada0-fa39a63a449e,383,Pat Morrissey,1.88,,,, +have,value,name,number,scryfall_id,artist,price,foil_price,nonfoil,foil,others +=I2+J2,=I2*G2+J2*H2,Dark Ritual,120,4ebcd681-1871-4914-bcd7-6bd95829f6e0,Justin Hampton,1.05,,,,"=IF('LEA'!A3>0,""LEA: ""&'LEA'!A3&"", "","""")&IF('HOP'!A3>0,""HOP: ""&'HOP'!A3&"", "","""")" +=I3+J3,=I3*G3+J3*H3,Forest,380,fbdcbd97-90a9-45ea-94f6-2a1c6faaf965,Pat Morrissey,0.88,,,, +=I4+J4,=I4*G4+J4*H4,Forest,381,b346b784-7bde-49d0-bfa9-56236cbe19d9,Pat Morrissey,1.01,,,, +=I5+J5,=I5*G5+J5*H5,Forest,382,768c4d8f-5700-4f0a-9ff2-58422aeb1dac,Pat Morrissey,0.4,,,, +=I6+J6,=I6*G6+J6*H6,Snow-Covered Forest,383,4c0ad95c-d62c-4138-ada0-fa39a63a449e,Pat Morrissey,1.88,,,, diff --git a/tests/serialization/snapshots/test_xlsx/test_write/05 - S00.csv b/tests/serialization/snapshots/test_xlsx/test_write/05 - S00.csv index b084916..a7228f3 100644 --- a/tests/serialization/snapshots/test_xlsx/test_write/05 - S00.csv +++ b/tests/serialization/snapshots/test_xlsx/test_write/05 - S00.csv @@ -1,2 +1,2 @@ -have,value,name,scryfall_id,collector_number,artist,price,foil_price,nonfoil,foil,others -=I2+J2,=I2*G2+J2*H2,Rhox,5d5f3f57-410f-4ee2-b93c-f5051a068828,43,Mark Zug,,0.76,7,12, +have,value,name,number,scryfall_id,artist,price,foil_price,nonfoil,foil,others +=I2+J2,=I2*G2+J2*H2,Rhox,43,5d5f3f57-410f-4ee2-b93c-f5051a068828,Mark Zug,,0.76,7,12, diff --git a/tests/serialization/snapshots/test_xlsx/test_write/06 - CHK.csv b/tests/serialization/snapshots/test_xlsx/test_write/06 - CHK.csv index b94f3fd..fa7ce36 100644 --- a/tests/serialization/snapshots/test_xlsx/test_write/06 - CHK.csv +++ b/tests/serialization/snapshots/test_xlsx/test_write/06 - CHK.csv @@ -1,3 +1,3 @@ -have,value,name,scryfall_id,collector_number,artist,price,foil_price,nonfoil,foil,others -=I2+J2,=I2*G2+J2*H2,Bushi Tenderfoot // Kenzo the Hardhearted,864ad989-19a6-4930-8efc-bbc077a18c32,2,Mark Zug,0.2,7.79,,, -=I3+J3,=I3*G3+J3*H3,"Boseiju, Who Shelters All",0180d9a8-992c-4d55-8ac4-33a587786993,273,Ralph Horsley,28.15,108.88,,, +have,value,name,number,scryfall_id,artist,price,foil_price,nonfoil,foil,others +=I2+J2,=I2*G2+J2*H2,Bushi Tenderfoot // Kenzo the Hardhearted,2,864ad989-19a6-4930-8efc-bbc077a18c32,Mark Zug,0.2,7.79,,, +=I3+J3,=I3*G3+J3*H3,"Boseiju, Who Shelters All",273,0180d9a8-992c-4d55-8ac4-33a587786993,Ralph Horsley,28.15,108.88,,, diff --git a/tests/serialization/snapshots/test_xlsx/test_write/07 - BOK.csv b/tests/serialization/snapshots/test_xlsx/test_write/07 - BOK.csv index 0bed9b5..31bd907 100644 --- a/tests/serialization/snapshots/test_xlsx/test_write/07 - BOK.csv +++ b/tests/serialization/snapshots/test_xlsx/test_write/07 - BOK.csv @@ -1,2 +1,2 @@ -have,value,name,scryfall_id,collector_number,artist,price,foil_price,nonfoil,foil,others -=I2+J2,=I2*G2+J2*H2,"Faithful Squire // Kaiso, Memory of Loyalty",758abd53-6ad2-406e-8615-8e48678405b4,3,Mark Zug,0.14,0.31,,, +have,value,name,number,scryfall_id,artist,price,foil_price,nonfoil,foil,others +=I2+J2,=I2*G2+J2*H2,"Faithful Squire // Kaiso, Memory of Loyalty",3,758abd53-6ad2-406e-8615-8e48678405b4,Mark Zug,0.14,0.31,,, diff --git a/tests/serialization/snapshots/test_xlsx/test_write/08 - SOK.csv b/tests/serialization/snapshots/test_xlsx/test_write/08 - SOK.csv index de891f4..53009b7 100644 --- a/tests/serialization/snapshots/test_xlsx/test_write/08 - SOK.csv +++ b/tests/serialization/snapshots/test_xlsx/test_write/08 - SOK.csv @@ -1,2 +1,2 @@ -have,value,name,scryfall_id,collector_number,artist,price,foil_price,nonfoil,foil,others -=I2+J2,=I2*G2+J2*H2,"Erayo, Soratami Ascendant // Erayo's Essence",0b61d772-2d8b-4acf-9dd2-b2e8b03538c8,35,Matt Cavotta,6.2,57.38,,, +have,value,name,number,scryfall_id,artist,price,foil_price,nonfoil,foil,others +=I2+J2,=I2*G2+J2*H2,"Erayo, Soratami Ascendant // Erayo's Essence",35,0b61d772-2d8b-4acf-9dd2-b2e8b03538c8,Matt Cavotta,6.2,57.38,,, diff --git a/tests/serialization/snapshots/test_xlsx/test_write/09 - HOP.csv b/tests/serialization/snapshots/test_xlsx/test_write/09 - HOP.csv index c3a52e0..37112e4 100644 --- a/tests/serialization/snapshots/test_xlsx/test_write/09 - HOP.csv +++ b/tests/serialization/snapshots/test_xlsx/test_write/09 - HOP.csv @@ -1,3 +1,3 @@ -have,value,name,scryfall_id,collector_number,artist,price,foil_price,nonfoil,foil,others -=I2+J2,=I2*G2+J2*H2,Akroma's Vengeance,b8f5e276-d7c3-4b4b-ac5b-9bb1aeeca8d0,1,Greg Hildebrandt & Tim Hildebrandt,0.42,,,, -=I3+J3,=I3*G3+J3*H3,Dark Ritual,c8c774f2-110e-476c-a4ff-cc86d31c6ae7,24,Clint Langley,0.74,,,,"=IF('LEA'!A3>0,""LEA: ""&'LEA'!A3&"", "","""")&IF('ICE'!A2>0,""ICE: ""&'ICE'!A2&"", "","""")" +have,value,name,number,scryfall_id,artist,price,foil_price,nonfoil,foil,others +=I2+J2,=I2*G2+J2*H2,Akroma's Vengeance,1,b8f5e276-d7c3-4b4b-ac5b-9bb1aeeca8d0,Greg Hildebrandt & Tim Hildebrandt,0.42,,,, +=I3+J3,=I3*G3+J3*H3,Dark Ritual,24,c8c774f2-110e-476c-a4ff-cc86d31c6ae7,Clint Langley,0.74,,,,"=IF('LEA'!A3>0,""LEA: ""&'LEA'!A3&"", "","""")&IF('ICE'!A2>0,""ICE: ""&'ICE'!A2&"", "","""")" diff --git a/tests/serialization/snapshots/test_xlsx/test_write/10 - PMBS.csv b/tests/serialization/snapshots/test_xlsx/test_write/10 - PMBS.csv index 0157754..048df17 100644 --- a/tests/serialization/snapshots/test_xlsx/test_write/10 - PMBS.csv +++ b/tests/serialization/snapshots/test_xlsx/test_write/10 - PMBS.csv @@ -1,3 +1,3 @@ -have,value,name,scryfall_id,collector_number,artist,price,foil_price,nonfoil,foil,others -=I2+J2,=I2*G2+J2*H2,Hero of Bladehold,8829efa0-498a-43ca-91aa-f9caeeafe298,8★,Scott Chou,,13.48,,,"=IF('MBS'!A2>0,""MBS: ""&'MBS'!A2&"", "","""")" -=I3+J3,=I3*G3+J3*H3,Black Sun's Zenith,dd88131a-2811-4a1f-bb9a-c82e12c1493b,39,James Paick,,26.36,,,"=IF('MBS'!A3>0,""MBS: ""&'MBS'!A3&"", "","""")" +have,value,name,number,scryfall_id,artist,price,foil_price,nonfoil,foil,others +=I2+J2,=I2*G2+J2*H2,Hero of Bladehold,8★,8829efa0-498a-43ca-91aa-f9caeeafe298,Scott Chou,,13.48,,,"=IF('MBS'!A2>0,""MBS: ""&'MBS'!A2&"", "","""")" +=I3+J3,=I3*G3+J3*H3,Black Sun's Zenith,39,dd88131a-2811-4a1f-bb9a-c82e12c1493b,James Paick,,26.36,,,"=IF('MBS'!A3>0,""MBS: ""&'MBS'!A3&"", "","""")" diff --git a/tests/serialization/snapshots/test_xlsx/test_write/11 - MBS.csv b/tests/serialization/snapshots/test_xlsx/test_write/11 - MBS.csv index 4c34243..e50d031 100644 --- a/tests/serialization/snapshots/test_xlsx/test_write/11 - MBS.csv +++ b/tests/serialization/snapshots/test_xlsx/test_write/11 - MBS.csv @@ -1,3 +1,3 @@ -have,value,name,scryfall_id,collector_number,artist,price,foil_price,nonfoil,foil,others -=I2+J2,=I2*G2+J2*H2,Hero of Bladehold,8a3853ec-e307-46e0-96d7-0706b5c45c5e,8,Austin Hsu,13.76,26.96,,,"=IF('PMBS'!A2>0,""PMBS: ""&'PMBS'!A2&"", "","""")" -=I3+J3,=I3*G3+J3*H3,Black Sun's Zenith,03bdcf52-50b8-42c0-9665-931d83f5f314,39,Daniel Ljunggren,5.09,11.67,,,"=IF('PMBS'!A3>0,""PMBS: ""&'PMBS'!A3&"", "","""")" +have,value,name,number,scryfall_id,artist,price,foil_price,nonfoil,foil,others +=I2+J2,=I2*G2+J2*H2,Hero of Bladehold,8,8a3853ec-e307-46e0-96d7-0706b5c45c5e,Austin Hsu,13.76,26.96,,,"=IF('PMBS'!A2>0,""PMBS: ""&'PMBS'!A2&"", "","""")" +=I3+J3,=I3*G3+J3*H3,Black Sun's Zenith,39,03bdcf52-50b8-42c0-9665-931d83f5f314,Daniel Ljunggren,5.09,11.67,,,"=IF('PMBS'!A3>0,""PMBS: ""&'PMBS'!A3&"", "","""")" diff --git a/tests/serialization/snapshots/test_xlsx/test_write/12 - NEO.csv b/tests/serialization/snapshots/test_xlsx/test_write/12 - NEO.csv index 4195298..1e09cd8 100644 --- a/tests/serialization/snapshots/test_xlsx/test_write/12 - NEO.csv +++ b/tests/serialization/snapshots/test_xlsx/test_write/12 - NEO.csv @@ -1,4 +1,4 @@ -have,value,name,scryfall_id,collector_number,artist,price,foil_price,nonfoil,foil,others -=I2+J2,=I2*G2+J2*H2,"Boseiju, Who Endures",2135ac5a-187b-4dc9-8f82-34e8d1603416,266,Chris Ostrowski,27.01,29.23,,,"=IF('PNEO'!A2+'PNEO'!A3>0,""PNEO: ""&'PNEO'!A2+'PNEO'!A3&"", "","""")" -=I3+J3,=I3*G3+J3*H3,"Boseiju, Who Endures",0055ea30-20fb-4324-a632-8fed87628f05,412,Esuthio,37.66,68.29,,,"=IF('PNEO'!A2+'PNEO'!A3>0,""PNEO: ""&'PNEO'!A2+'PNEO'!A3&"", "","""")" -=I4+J4,=I4*G4+J4*H4,"Boseiju, Who Endures",2488a80b-6882-4b59-8232-f02f800204a9,501,Chris Ostrowski,28.8,34.56,,,"=IF('PNEO'!A2+'PNEO'!A3>0,""PNEO: ""&'PNEO'!A2+'PNEO'!A3&"", "","""")" +have,value,name,number,scryfall_id,artist,price,foil_price,nonfoil,foil,others +=I2+J2,=I2*G2+J2*H2,"Boseiju, Who Endures",266,2135ac5a-187b-4dc9-8f82-34e8d1603416,Chris Ostrowski,27.01,29.23,,,"=IF('PNEO'!A2+'PNEO'!A3>0,""PNEO: ""&'PNEO'!A2+'PNEO'!A3&"", "","""")" +=I3+J3,=I3*G3+J3*H3,"Boseiju, Who Endures",412,0055ea30-20fb-4324-a632-8fed87628f05,Esuthio,37.66,68.29,,,"=IF('PNEO'!A2+'PNEO'!A3>0,""PNEO: ""&'PNEO'!A2+'PNEO'!A3&"", "","""")" +=I4+J4,=I4*G4+J4*H4,"Boseiju, Who Endures",501,2488a80b-6882-4b59-8232-f02f800204a9,Chris Ostrowski,28.8,34.56,,,"=IF('PNEO'!A2+'PNEO'!A3>0,""PNEO: ""&'PNEO'!A2+'PNEO'!A3&"", "","""")" diff --git a/tests/serialization/snapshots/test_xlsx/test_write/13 - PNEO.csv b/tests/serialization/snapshots/test_xlsx/test_write/13 - PNEO.csv index adadfe4..696ad60 100644 --- a/tests/serialization/snapshots/test_xlsx/test_write/13 - PNEO.csv +++ b/tests/serialization/snapshots/test_xlsx/test_write/13 - PNEO.csv @@ -1,3 +1,3 @@ -have,value,name,scryfall_id,collector_number,artist,price,foil_price,nonfoil,foil,others -=I2+J2,=I2*G2+J2*H2,"Boseiju, Who Endures",dda82840-1f3f-4be7-9bc7-66ff551ef5c0,266p,Chris Ostrowski,26.5,27.55,,,"=IF('NEO'!A2+'NEO'!A3+'NEO'!A4>0,""NEO: ""&'NEO'!A2+'NEO'!A3+'NEO'!A4&"", "","""")" -=I3+J3,=I3*G3+J3*H3,"Boseiju, Who Endures",2a2f63b7-c33c-41d0-9c8f-7bddd1821f15,266s,Chris Ostrowski,,32.17,,,"=IF('NEO'!A2+'NEO'!A3+'NEO'!A4>0,""NEO: ""&'NEO'!A2+'NEO'!A3+'NEO'!A4&"", "","""")" +have,value,name,number,scryfall_id,artist,price,foil_price,nonfoil,foil,others +=I2+J2,=I2*G2+J2*H2,"Boseiju, Who Endures",266p,dda82840-1f3f-4be7-9bc7-66ff551ef5c0,Chris Ostrowski,26.5,27.55,,,"=IF('NEO'!A2+'NEO'!A3+'NEO'!A4>0,""NEO: ""&'NEO'!A2+'NEO'!A3+'NEO'!A4&"", "","""")" +=I3+J3,=I3*G3+J3*H3,"Boseiju, Who Endures",266s,2a2f63b7-c33c-41d0-9c8f-7bddd1821f15,Chris Ostrowski,,32.17,,,"=IF('NEO'!A2+'NEO'!A3+'NEO'!A4>0,""NEO: ""&'NEO'!A2+'NEO'!A3+'NEO'!A4&"", "","""")" diff --git a/tests/test_ssm.py b/tests/test_ssm.py index f25441e..2c78651 100644 --- a/tests/test_ssm.py +++ b/tests/test_ssm.py @@ -50,6 +50,7 @@ def mock_scryfetch() -> Oracle: dialect={}, include_digital=False, include_foreign_only=False, + separate_promos=False, exclude_set_types={ScrySetType.TOKEN, ScrySetType.MEMORABILIA}, exclude_card_layouts={ ScryCardLayout.ART_SERIES, @@ -68,6 +69,7 @@ def mock_scryfetch() -> Oracle: dialect={}, include_digital=True, include_foreign_only=False, + separate_promos=False, exclude_set_types={ScrySetType.TOKEN, ScrySetType.MEMORABILIA}, exclude_card_layouts={ ScryCardLayout.ART_SERIES, @@ -86,6 +88,7 @@ def mock_scryfetch() -> Oracle: dialect={"csv": "terse"}, include_digital=False, include_foreign_only=False, + separate_promos=False, exclude_set_types={ScrySetType.TOKEN, ScrySetType.MEMORABILIA}, exclude_card_layouts={ ScryCardLayout.ART_SERIES, @@ -104,6 +107,7 @@ def mock_scryfetch() -> Oracle: dialect={}, include_digital=False, include_foreign_only=False, + separate_promos=False, exclude_set_types={ ScrySetType.TOKEN, ScrySetType.MEMORABILIA, @@ -126,6 +130,7 @@ def mock_scryfetch() -> Oracle: dialect={}, include_digital=False, include_foreign_only=False, + separate_promos=False, exclude_set_types={ScrySetType.TOKEN, ScrySetType.MEMORABILIA}, exclude_card_layouts={ ScryCardLayout.ART_SERIES, @@ -145,6 +150,7 @@ def mock_scryfetch() -> Oracle: dialect={}, include_digital=False, include_foreign_only=False, + separate_promos=False, exclude_set_types={ScrySetType.TOKEN, ScrySetType.MEMORABILIA}, exclude_card_layouts={ ScryCardLayout.ART_SERIES, @@ -164,6 +170,7 @@ def mock_scryfetch() -> Oracle: dialect={}, include_digital=False, include_foreign_only=False, + separate_promos=False, exclude_set_types={ScrySetType.TOKEN, ScrySetType.MEMORABILIA}, exclude_card_layouts={ ScryCardLayout.ART_SERIES, @@ -184,6 +191,7 @@ def mock_scryfetch() -> Oracle: dialect={}, include_digital=False, include_foreign_only=False, + separate_promos=False, exclude_set_types={ScrySetType.TOKEN, ScrySetType.MEMORABILIA}, exclude_card_layouts={ ScryCardLayout.ART_SERIES,