From: Jeremy Stanley Date: Sun, 27 Aug 2017 17:07:45 +0000 (+0000) Subject: Overhaul data management to get rid of __control__ X-Git-Tag: 0.0.1~136 X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=commitdiff_plain;h=182e0d2f5d588b71c57272686255a1f6684a2adf;hp=182e0d2f5d588b71c57272686255a1f6684a2adf Overhaul data management to get rid of __control__ 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. ---