Overhaul data management to get rid of __control__
authorJeremy Stanley <fungi@yuggoth.org>
Sun, 27 Aug 2017 17:07:45 +0000 (17:07 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Mon, 28 Aug 2017 04:53:30 +0000 (04:53 +0000)
Remap __control__ subkeys in data as follows:

    default_files -> .mudpy.filing.categories
    include_dirs -> _load
    include_files -> _load
    read_only -> _lock

Additionally, obsolete the __control__.private_files key by
switching from raw file/directory names to associative arrays in the
category defaults so that flags such as "private" can be added to
them, and make the category filenames automatically determined so
that they can be omitted unless specific overrides are required.

For the sake of future-proofing, rename the DataFile class to Data
and its "filename" attribute to "source" so that we avoid confusing
renames later when these might instead refer to some other storage
medium such as a table in a database. Similarly rename the Element
class attribute "filename" to "origin" attribute both to make it
more generic and to avoid confusion with "source" (an Element's
origin is a complete Data object, while a Data's source is just a
rooted-anchored file path currently).

Add a Universe.add_category convenience method to handle properly
guessing the corresponding fallback path and copying any declared
flags.


No differences found