Commit Graph

156 Commits

Author SHA1 Message Date
Correl Roush fba63c1e1f Add card artists 2024-05-10 14:09:28 -04:00
Correl Roush fc5c212db5 Split apart text lines in card details 2024-05-10 11:45:30 -04:00
Correl Roush d74b4db4e7 Fix card row height 2024-05-10 11:33:53 -04:00
Correl Roush 82868b28c6 Track external ID and use when importing 2024-03-12 21:08:07 -04:00
Correl Roush fc7671efd1 Log failure reason when skipping scryfall cards 2024-02-26 18:16:29 -05:00
Correl Roush 1d9723fb1f Store set type 2024-02-26 18:16:14 -05:00
Correl Roush 4a0fc6e539 Store set types 2024-02-26 18:07:27 -05:00
Correl Roush ed7ac88db0 Add USD price search 2024-02-26 08:46:08 -05:00
Correl Roush b30a467793 Add a status color line to cards in decks
This will eventually represent whether the card is available in the
collection for use in the deck, and whether a version was chosen from
those available.
2024-02-25 17:19:32 -05:00
Correl Roush 187c83b6f7 Fix IOLoop reference 2024-02-22 15:14:04 +00:00
Correl Roush 8303394ced Fix materialized views
Prices may not exist for some card versions, use a LEFT JOIN so cards
don't get omitted.
2024-02-21 23:13:03 -05:00
Correl Roush 4081634ad6 Fix deck query 2024-02-21 22:44:41 -05:00
Correl Roush 2f701156b3 Add exact name match search syntax 2024-02-21 22:42:15 -05:00
Correl Roush e74fd6b9ba Format code with black 2024-02-21 18:11:03 -05:00
Correl Roush 5c6862180b Trigger reload on openapi schema change 2024-02-21 18:09:48 -05:00
Correl Roush 7f9e19a74f Add autoreload option 2024-02-21 18:08:46 -05:00
Correl Roush cd3daf7525 Format code with black 2024-02-21 17:57:20 -05:00
Correl Roush 2666d80f92 Add coverage reporting to tests 2024-02-21 17:56:43 -05:00
Correl Roush 86675016c4 Correct errors in the deck api spec 2024-02-21 17:54:48 -05:00
Correl Roush 04ad554d3c Fix type errors 2024-02-21 17:38:20 -05:00
Correl Roush 61544ed521 Fix schema loading
Remove usage of deprecated importlib.resources.path
2024-02-21 17:26:20 -05:00
Correl Roush 2554900554 Add sort by created date 2024-02-09 23:43:29 -05:00
Correl Roush 1358f38419 Enumerate sorting options with a type 2024-02-09 23:37:35 -05:00
Correl Roush e6296f1fef Choose sort via dropdown 2024-02-09 23:28:50 -05:00
Correl Roush 33b3e9fb32 Store creation date for imported cards 2024-02-09 03:51:31 +00:00
Correl Roush 7b78473f24 Add missing deck list OpenAPI spec 2023-08-12 15:54:19 -04:00
Correl Roush 7f1735f200 Add endpoint for deck candidates 2023-08-12 15:54:03 -04:00
Correl Roush ee68b1e10c Explicitly set text color in price badges 2023-07-18 16:55:47 -04:00
Correl Roush a24ae30c9f Display foil prices for foil copies 2023-07-18 16:39:59 -04:00
Correl Roush 2247fb5bb4 Pin jsonschema library to 4.17 2023-07-17 23:53:42 -04:00
Correl Roush 03d577918c Update python version in Dockerfile 2023-07-10 00:05:55 -04:00
Correl Roush 2da33f3168 Update readme 2023-07-10 00:05:55 -04:00
Correl Roush 57ee24bd13 Create and delete decks 2023-07-07 01:28:19 -04:00
Correl Roush d84738f6c6 Fix template path directory 2023-07-06 23:55:14 -04:00
Correl Roush 168853bef8 Add elm-watch configuration 2023-07-06 15:16:58 -04:00
Correl Roush 2435ecb5ff Allow searching by collection 2023-07-04 17:45:32 -04:00
Correl Roush 144b1eb2ba Sort by price by default 2023-07-04 17:29:03 -04:00
Correl Roush 7c1050a7c2 Handle non-unique oracle card attributes
Though it should never be the case, a scryfall data dump included a card
wherein the oracle text differed between variants having the same oracle
id. Using DISTINCT ON with an ORDER BY clause will select just one
distinct version of these fields to be inserted into the database.

The dump from 20230617212037 included a single oracle entry breaking
this assumed guarantee with versions containing differing oracle text:

    \x on
    SELECT DISTINCT "oracle_id"
         , "name"
         , "color_identity"
         , "cmc"
         , "mana_cost"
         , "type_line"
         , "edhrec_rank"
         , "oracle_text"
    FROM "tmp_cards"
    WHERE "tmp_cards"."oracle_id" = '5feedfb0-30e6-400d-9e28-d541ea1aa14e';

    oracle_id	5feedfb0-30e6-400d-9e28-d541ea1aa14e
    name	Plague Spitter
    color_identity	B
    cmc	3.00
    mana_cost	{2}{B}
    type_line	Creature — Phyrexian Horror
    edhrec_rank	7226
    oracle_text	At the beginning of your upkeep, Plague Spitter deals 1 damage to each creature and each player.
    When Plague Spitter dies, Plague Spitter deals 1 damage to each creature and each player.

    oracle_id	5feedfb0-30e6-400d-9e28-d541ea1aa14e
    name	Plague Spitter
    color_identity	B
    cmc	3.00
    mana_cost	{2}{B}
    type_line	Creature — Phyrexian Horror
    edhrec_rank	7226
    oracle_text	At the beginning of your upkeep, Plague Spitter deals 1 damage to each creature and each player.
    When Plague Spitter dies, it deals 1 damage to each creature and each player.
2023-06-21 21:39:58 -04:00
Correl Roush 306d2f2ba0 Add logging for scryfall update 2023-06-20 15:26:38 -04:00
Correl Roush 2faee10169 Add status handler 2023-06-20 15:01:11 -04:00
Correl Roush a317dd31a8 Add deck POST/PUT 2023-06-14 21:42:10 -04:00
Correl Roush 3f6e84317a Fix retrieval of empty decks 2023-06-14 21:04:51 -04:00
Correl Roush 78cb4b768b Update poetry 2023-04-19 17:17:41 -04:00
Correl Roush e3bb38f8d3 Fix issue updating scryfall 2023-04-19 17:17:17 -04:00
Correl Roush 3790d98153 WIP: Formalize and implement deck API 2023-03-02 00:41:07 -05:00
Correl Roush 165429710a Adjust API documentation URL 2023-03-02 00:03:39 -05:00
Correl Roush e970ef569e Document the data models in OpenAPI 2023-02-24 22:41:32 -05:00
Correl Roush f266946c8c Add search tests 2023-02-24 00:41:32 -05:00
Correl Roush 74e44b1e8c Add server tests 2023-02-23 23:18:43 -05:00
Correl Roush 61c9d53cf3 Run mypy during tests 2023-02-14 00:11:26 -05:00