theastropath / turbot

A Discord bot for tracking Animal Crossing: New Horizons turnip prices and fossil collections
MIT License
8 stars 1 forks source link

Refactors data models #158

Closed lexicalunit closed 4 years ago

lexicalunit commented 4 years ago

All the user data models (fish, bugs, fossils, preferences, prices) function so similarly that there should really be one piece of code that handles all of it the same way. If we can abstract away interacting with these models that's a step towards making them backend agnostic, meaning we could replace the backend with a database if we wanted to move away from csv files.

codecov-io commented 4 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@fb78073). Click here to learn what that means. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             master      #158   +/-   ##
==========================================
  Coverage          ?   100.00%           
==========================================
  Files             ?         1           
  Lines             ?        48           
  Branches          ?         6           
==========================================
  Hits              ?        48           
  Misses            ?         0           
  Partials          ?         0           
Impacted Files Coverage Δ
src/turbot/data.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fb78073...7f358f8. Read the comment docs.

lexicalunit commented 4 years ago

Feels good to delete about 300 lines of code.

Snapshot changes are from reordering the output on commands related to collectables. Now we always show results for things in the same order.