Tuesday, July 4, 2017

Change Log: 2.14.414

Before I get into change details, I want to mention a couple of housekeeping type details:

  1. I just updated the About page on this blog, which acknowledges people who have contributed or continue to contribute to the Manager in some way, shape or form. I don't acknowledge them enough on here, but without the users who write in with feature/enhancement and bug feedback, the Manager would suck way more than it already does!
  2. I also created a Twitter for the Manager yesterday. Ultimately, I plan to integrate it into the dashboard view, e.g. to use it to rapidly post short status updates, etc. for all users to see. For now, it isn't really implemented or used, but feel free to follow it!

Moving on form housekeeping to actual release details, the most important thing about release 2.14.414 is that it makes what I am pretty sure will be the final changes to the way the Manager is installed and deployed.

Today's deploy involved a restart of the World daemon, the API server and the CGI server and was completely issue-free: going forward, the deployments should be non-disruptive and fully automated.

In terms of new features and enhancements, the main thing about release 2.14.411 is that re-implements the Survivor Sheet Controls of Death in AngularJS and adds API methods for same: the Survivor Sheet no longer needs a reload/refresh to set (or unset) survivor death information.

This release also upgrades the Settlement Sheet Survival Limit controls. Adding new innovations can automatically increase the Survival Limit (where appropriate) and there's a new tooltip feature that provides additional detail about how Survival Limit is working in the current settlement.

As far as back-end/API enhancements, the front-end guys working on The Watcher have asked me to focus the API development effort on porting the survivor sheet methods from the legacy webapp to the API, so that is the main focus of this release and will likely continue to be the focus for the next month. It also explains why this release and the one before it have focused more on the Survivor Sheet than the Settlement Sheet.

So for now, the tl;dr is that you can expect another release with more Survivor Sheet enhancements in another couple of days...and then probably another one a couple of days after that and so on for the rest of July.

Thanks for using the Manager!


Corrections and Fixes

  • Survivor Sheet causes of death (Controls of Death) picker is now sorted alphabetically (see API Improvements for details).
  • Fixed an angularjs typo/bug that caused the "Resurrect" button to appear on the Controls of Death for living survivors.
  • Addressed an issue where survivor OIDs could show up in the Settlement Event Log.
  • Fixed an order-of-operations bug where the "First Story" settlement creation option did NOT place Founding Stones and Cloths in settlement storage.
  • Corrected install.sh routine for creating api.thewatcher.service file's Gunicorn syntax so that it actually creates a PID file.
  • Addressed an issue where Campaign Summary information re: available Endeavors was incorrect due to API data model issues. -Eugene Shuvaev
  • Fixed an API issue preventing older settlements from modifying settlement Endeavor Tokens due to weak typing. -Eugene Shuvaev
  • Fixed a bug where the World Daemon's PID file was not named correctly and broke dashboard reporting.

Application Improvements

  • Survivor Sheet Survival Actions are now effected (enabled/disabled) by a survivor's Fighting Arts (enhances the previous release, which only included A&Is). Disorders coming soon!
  • Refactored/re-implemented the Controls of Death:
    • The button that opens the CoD has been re-implemented in angularjs; deprecated old assets.Survivor class methods for writing the button code on page refresh.
    • Using the CoD no longer requires a reload/refresh of the Survivor Sheet!
    • Deprecated the penultimate, outstanding modifyAsset() call in survivorSheet.js. One down, one to go!
    • Deprecated custom death-related toggle code in assets.Survivor.toggle() method
    • Deprecated the following methods from the assets.Survivor class: update_cod(), death()
    • Removed support in assets.Survivor.modify() for working with COD
    • Removed custom code re: custom cause of death from assets.Survivor.render_html_form() method as well as comment references, etc. to Controls of Death
    • Removed the HTML form controls for resurrecting survivors from the CoD and replaced them with an angularjs controller called resurrect()
    • Deprecated legacy JS function controlsOfDeath.checkForCustomCOD()
  • Refactored the Settlement Sheet controls for Survival:
    • HTML controls refactored to use angularjs: paddles use the API now, as does the actual number element.
    • Deprecated calls related to Survival and Survival Limit from assets.Survivor.render_html_form() 
    • Deprecated survival limit enforcement hacks from assets.Survivor
    • The Settlement Sheet pops a little error when enforcing Survival Limit.
    • Deprecated legacy webapp methods for managing survivor Survival
  • The cod_error CSS class has been re-purposed as a general class for popping an error warning and showing it to users. 
  • Deprecated the Settlement Sheet HTML elements that used the legacy webapp functionality to represent Survival Limit and the minimum Survival Limit.
  • Implemented modal tool tips with the help of an awesome tutorial. Added one to the Settlement Sheet to explain more about what's happening w/r/t the settlement's Survival Limit. 
  • Created a new JS method to "re-initialize" the Settlement Sheet, i.e. so that we can update it without making the users reload the page (which pissed a lot of people off).
  • Settlement Sheet is re-initialized after innovations/locations are added and removed.
  • Settlement Sheet innovations/locations now re-alphabetize themselves (which, I mean, I don't know about you, but it was driving me nuts that they didn't so thank god).
  • Settlement Death Count is eligible to be auto-updated on Settlement Sheet re-init.
  • The settlement's minimum population is now enforced by the UI, which sets the current min-pop as the min of the number element on the Settlement Sheet.
  • Added a help-tip/tooltip for Settlement Sheet Population and Death Count.
  • Updated the 'About' page on the blog to include more links, better details and a few more contributors/helpers who deserve a shout-out.
  • Campaign Summary view expects principles to be handles (instead of names) now.
  • Deprecated legacy webapp methods assets.Settlement.set_principle() and assets.Settlement.increment_all_survivors() since they are now superseded by API methods
  • Revised assets.py settlement post-processing to use principle handles (rather than names) and to look them up from the API, rather than the legacy game_assets.py.

API Improvements

  • Ported Fighting Arts assets from legacy webapp game_assets.py to assets/fighting_arts.py
  • Settlements are now serialized with a game_assets element called 'fighting_arts' that includes all available FAs and SFAs. -Khoa
  • Survivor JSON has been enhanced to enable/disable Survival Actions based on a survivor's Fighting Arts.
  • Followed this guide to implement an exception class in utils.py that allows API methods to raise exceptions that get returned immediately to the requester.
  • models.settlements.Settlement.get_available_assets() now sorts dictionary/asset lists by 'name' attribute (instead of whatever it used to sort them on which made no sense).
  • Implemented models.survivors.Survivor.controls_of_death() and created documentation for it.
  • Created models.survivors.Survivor.pretty_name() which returns a string of the survivor's name and their effective sex. 
  • Enhanced models.settlements.Settlement.get_survival_limit() to accept a 'return_type' kwarg:
    • if this kwarg is bool, then you get back a True/False of whether the settlement is enforcing survival limit.
    • if this kwarg is 'min', then you get back the minimum Survival Limit for the settlement
  • Enhanced settlement JSON to include a sheet-level boolean attribute 'enforce_survival_limit' as well as a sheet-level int attribute, 'minimum_survival_limit'.
  • models.survivors.Survivor.update_survival() now checks to see if it should enforce the settlement's Survival Limit before capping an incoming value. I also updated the documentation to reflect this.
  • Enhanced the scope and functionality of Models.check_request_params()to a.) log the name of the function calling the check on failure to validate and b.) to raise its own exceptions, if required.
  • The Models.check_request_params() method now returns a 400 (bad request) and a descriptive little error message if the requester is missing a param.
  • Created models.survivors.Survivor.apply_survival_limit() method to a.) enforce zero as a lower Survival limit and b.) enforce settlement Survival Limit, according to settlement rules.
  • Added a new method called set_survival() to the survivor model, to work similarly to the update_survival() method, except that it just sets the value, instead of trying to add it. Just, you know, to give the front-end guys some options. Created documentation for the new method.
  • Added a new Settlement class method called get_death_count() that works similarly to get_survival_limit() and returns an int representing the attribute -OR- a minimum value, depending on kwarg use.
  • Restyled the API documentation subsection headers for improved readability.
  • Settlement JSON now includes 'minimum_death_count' and 'minimum_population' in the 'sheet' element.
  • Added an enforce_minimums() method to settlement serialization. Currently, it enforces Survival Limit, Death Count and Population minimums. 
  • Deprecated the get_locations_options() method from the Settlement class. As of two releases ago, we're going a different direction with the pickers (in both apps), so it is pointless now.
  • Alphabetized and organized Settlement class methods (because there are a ton of them now and they were chaotic and it was driving me nuts).
  • Broke up the models.settlements.Settlement.get_survivors() method into a few smaller, more explicit methods: get_eligible_parents() and get_survivor_weapon_masteries() are now their own things.
  • Moved the settlement JSON's 'eligible_parents' element from 'game_assets' to 'user_assets', where it belongs.  
  • Added a get_population() method to the Settlement class that works similarly to get_survival_limit() and get_death_count(). 
  • Updated Models.UserAsset class to include a kwarg called 'normalize_on_init', which contains a bool and determines whether or not the object normalizes itself when loaded. 
  • The Survivor class no longer causes the survivor's Settlement object to normalize on init. 
  • Created Settlement class methods for setting/unsetting principles: set_principle()
  • Principles are now automatically migrated from names to handles.
  • The Settlement class method get_principles_options() has been updated to expect handles (instead of names).
  • Deprecated legacy method get_principle_from_name() from assets.innovations.Assets class methods. 
  • Refactored the world.py code used to return the principle selection rate popularity contest
  • Refactored Settlement class method get_innovations() to ignore unknown/bogus innovation handles.
  • Created update_all_survivors() method for the Settlement class that accepts an 'operation' kwarg and a dictionary of attributes to modify. Supports 'increment' and 'decrement' operations, at present.
  • Added update_attribute() method to the Survivor model class. Basically apes the legacy functionality.
  • Ported the legacy settlement method increment_all_survivors() to update_all_survivors(). Created Survivor class object method update_attribute() and added it to the API/docs.
  • Added update_population() method to the Settlement class. Documented it.
  • Marking a survivor dead automatically decrements settlement population.
  • Started implementing lock/unlock methods in Models.py (but haven't added them to actual UserAsset methods yet).

No comments:

Post a Comment