Sunday, October 23, 2016

Change Log: 1.44.890 / 2.8.27

This release continues to migrate warehouse methods from V1 to V2 and make major progress on the general back-end architecture for the V2 API.

Also, notably, models and assets have been refactored to use Django-style classical inheritance (where you've got an assets object that has methods that tell you about what's available and you can also initialize a discreet monster or innovation or whatever object to work with it, etc.).

Not a lot of user-facing stuff in this one, but it makes major progress on the back end and puts me on track to deprecate the pickle-based warehousing routines in the next couple/few days.

Corrections and Fixes



  • v2/api/models/monster.py now uses the isdigit() method to try to duck-type monster level when initializing from a name string (rather than try/except, which clutters up the log and is fugly).

Improvements


  • V1: utils.py now checks for the "V1" tag when getting latest change log info from this blow.
  • V2: added an admin.py script for one-off admin operations and CLI maintenance work.
    • created a dump_doc_to_cli() method to express MDB docs and dictionary objects cleanly on the CLI
    • created a KillboardMaintenance object with methods that allow automatic and manual mdb.killboard querying and updating.
    • KillboardMaintenance.check_one_doc() uses models/monster.py to suggest updates to old mdb.killboard records.
  • V2: added a unit_tests/ folder off of the api/ root for module unit testing. Created unit tests for models/monsters.py and world.py:
    • created tests for the monster object
    • created tests for the one-off/helper methods
    • created tests for warehousing methods
  • V2: created a world.World.killboard() method to build a dynamic Kill Board based on monster models in assets/monsters.py and data from mdb.killboard()
  • V2: ported latest_kill() from world.py to world.World class.
  • V2: updated world.World.get_eligible_documents():
    • Now automatically sorts by "created_on" attrib
    • Supports limits via kwarg 
    • Supports mdb.killboard queries (enforcing our general rules for eligibility, etc.). 
    • The "required_attribs" kwarg is now optional and accepts a list.
  • V2: world.World.latest_fatality() now uses mdb.survivors instead of mdb.the_dead (which is useless, now that we no longer remove survivors from MDB on user remove).
  • V2: added -q flag to world.py for admin/CLI debug usage as a direct query runner.
  • V2: created models.py and models.GameAsset class as the base class for all models in the models/ folder. Updated models/monster.py to subclass models.GameAsset
  • V2: created assets/innovations.py and models/innovations.py and keyed in some innovation game assets (for use in world.World principles queries)
  • V2: implemented classical inheritance from Models.py to all modules in models/ and deprecated utils.search_dict() hack method.
  • V2: Models.AssetCollection.get_asset_from_name() method now has case-sensitivity controls (and is NOT case-sensitive by default...you know: for laziness).

No comments:

Post a Comment