|2.5.293 is not fooling around.|
There are several reasons for that:
- This release is 'yuge: not only did it take more than two weeks to put together, but it modifies almost 2000 lines of code. And while lines modified is no measure of quality/content, it's a definite measure of effort and a lot of effort went into release 2.5.293.
- This release includes major API enhancements: among other things, it is the first time a private (i.e. auth-required) route has been added that processes JWT authorization info and uses it to create a user asset. This is a big deal for us, in terms of Milestones for The Watcher, since it is the first release that supports external asset creation via a protected route. Woohoo!
- Release 2.5.293 also includes major API refactoring, including a non-trivial revision of the way that the internal request object is updated/managed and how logging works.
- I'm at like, hour 116 of The Witcher 3: Wild Hunt, and I have to beat it before I can move on and get back to my life.
At any rate and as usual, release 2.5.293 applies a couple/few usability and bug fixes for the legacy app (including some clean-up/reconciliation of the PotStars default timeline: hit the jump for full details on that).
Most of what this release does will not be noticeable in the legacy app, however. As the above suggests, this one is a major back-up update/overhaul/enhancement and most of the action is behind the scenes.
That said, these kinds of releases tend to break things in new and interesting (haha) ways, so even though this is the only major release I'm doing in March, there might be some tag-along break/fix stuff over the next week or two.
Thanks again for using the Manager!
- Fixed a Survivor Sheet bug where A&Is could not be removed. -kkrieten
- The PotStars timeline now uses Story Event titles/references, rather than timeline names for the following Lantern Years:
- LY20 - the p.22 Story Event "The Tomb" replaces "The Dragon's Tomb" (which is not a thing).
- LY25 - the p.27 Story Event "Death of the Dragon King" replaces "Nemesis Encounter - Death of the Dragon King" (since "Death of the Dragon King" is an SE, not an NE).
- Fixed a bug in the "First Story" macro where the "White Lion (First Story)" quarry monster was sometimes not set automatically at settlement creation time.
- Fixed a handful of "random" survivor names where missing commas caused name elision, (e.g. 'MaelcumMaximo', etc.)
- Adding multiple survivors now changes the current view to the Campaign Summary (rather than leaving it on whatever it is currentl yon, which was confusing, from a UX perspective).
- Fixed a JS bug where creating a new survivor and then immediately marking it dead created a new survivor immediately after marking the dead one dead (the function that submitted the dead form was doing location.reload() instead of location.assign() and therefore reloaded new survivor creation params).
- Fixed a bug where adding expansion content that removes timeline events could fail so badly that it would actually remove the LY from the timeline entirely. -phelle
- Refactored new settlement form; removed hacks for expansion/survivor toggles (i.e. hidden "None" values, etc.)
- Revised session.py processing of new settlement params to coerce the form output to JSON.
- Added retry decorators to api.post_JSON_to_route() and api.get_jwt_token() methods.
- Added a save() method to the session.Session class/object.
- The api.py module in the legacy app now submits the Authorization header when POSTing JSON to the API.
- session.py now also submits new settlement requests to the API (see below).
- The New Settlement form no longer uses unconventional param names, e.g. "settlement_name" instead of "name", etc. The form also uses handles from the API /new_settlement route instead of names.
- Added a new method to api.py called refresh_jwt_token(), which dials the API, gets a new token based on the old one (whether it's expired or not) and updates the session with that token.
- Created a new settlement param called "special" to include "macro" type settlement creation options, such as the "First Story" macro, etc. Refactored session.py to include this in the API request for a new settlement.
- Beefed up new settlement form value normalization for easy coercion to JSON. Included exception trapping (that triggers a render failure) and logs the whole param string.
- Keyed in a few new "random" survivor and settlement names.
- Deprecated modular_assets.settlement_names.py completely
- Refactored assets.Settlement.get_campaign() to use the API asset (and to remove all defaulting/data normalization, which is the API's job now).
- Updated the get_campaign() method to support for 'forbidden' as a return_type value. This gets you a list of all forbidden keys/handles (this is a legacy/transient thing and will go away when full API management for Sheet renders is completed).
- The get_campaign() method also now supports 'name' as a return_type value (and will return the name, instead of the handle, which is default behavior, obvi).
- Removed the hack/kludge for setting a 'cgi_params' attribute on the settlement object.
- Touched up the assets.Settlement.get_endeavors() method to return campaign names (instead of handles) for campaign-specific endeavors.
- Updated models.py to use assets.Settlement.get_campaign("forbidden") instead of building the list from legacy game assets.
- Dragon Traits modals are now named accordingly (i.e. they're no longer "constellation" traits) in the legacy app HTML stubs that render the Survivor Sheet.
- In browsers that support ES7 JS, expansion content that is included in the campaign's "settlement_sheet_init" cannot be toggled off.
- Clicking the submit button on the New Settlement view shows the full-page loader gif.
- Addressed an issue where logging was not correctly substituting user info when failing to set a 'current_settlement' value in models.users.py. -khoa
- Created a new static method in users.py that turns a valid "Authorization" header into a user object.
- Added a private /refresh_authorization route that allows expired tokens to be replaced with new ones. Updated the docs.
- Added a private /new/settlement route that checks the Authorization header and, if the user is legit, creates a settlement. Updated the docs.
- Developed a convention for adding the API-side user object (models.users.User) to the incoming request; added this to the /new/<asset_type> route, which will go live requiring an active token.
- Updated the models.user.User.__repr__() method to look more like the legacy app version, i.e. to fit with the way we want to log user activity.
- Disabled utils.basic_logging() in api.py (to remove duplicate log entries in the same file)
- Added _id attribute to user asset models upon initialization (i.e. touched up Models.load() so that it does this.)
- Added a method to the request_broker called new_user_asset() that brokers requests to create new assets.
- Added a new settlement creation method to the Settlement object: models.settlements.Settlement.new() is now capable of initializing a new settlement. -khoa
- User objects are now initialized with a login attribute (i.e. for laziness, i.e. instead of using user["login"] to get the user's login, this one is now a first class attrib).
- Added campaign_version to models.settlements.Settlement.normalize_data(); version 1 is handle instead of name.
- Created models.settlements.Settlement.convert_campaign_to_handle() method to enforce version 1 of the campaign attribute.
- models.settlements.Settlement.get_campaign() now uses handles, rather than strings. I also refactored this, slimmed it down, cleaned it up.
- Punched up the logic around defaulting a campaign attrib for legacy settlements and moved it from get_campaign() to convert_campaign_to_handle() where it belongs.
- New settlements are created with v1.1 timelines.
- Updated assets/campaigns.py timelines to be v1.1 type.
- Created a new method for models.settlements.Settlement called initialize_timeline(), which completely overwrites the settlement's timeline with the campaign's timeline template.
- Fixed the bug where API logging bounced back and forth between server.log and api.log, when asset collections were initialized.
- Migrated random settlement name selection from legacy app to API.
- Created new "names" modules under assets and models for working with "random" names.
- Ported the get_preference() method from the legacy app to models.users.User.
- Added user stanza (default user preferences) to settings.cfg
- Moved campaign "default" settlement storage from the main campaign definition to the settlement_sheet_init attrib (for organization/clarity/extensibility as well as for the ability to reset a settlement to defaults).
- Reorganized models.settlements.Settlement methods into like groups (for my own sanity).
- Added support for the expansion definition 'excluded_campaign' attribute to the models.settlements.Settlement.add_timeline_event() method (also touched up its twin method, rm_timeline_event() to the same effect).
- Updated add_timeline_event() and rm_timeline_event() to include 'save' kwarg (which enables/disables the end-of-method save).
- The models.settlements.Settlement.get_milestones_options() method now supports two return types, list and dict. The former gets you the standard list of dictionaries; the latter, which is new, get you a dictionary (where handles are keys).
- Updated settlement serialize() method to include milestones_dictionary under the game_assets attribute.
- Fixed a nasty bug where AssetCollection objects for innovations and A&Is were initialized without their base class methods (including their loggers!). This bug was causing bizarre output when settlements were serialized, among other things.
- Updated the documentation to include the general disclaimer and links to social media/blog.