summaryrefslogtreecommitdiff
path: root/morphlib/morphloader.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/danielfirth/RT241'Lars Wirzenius2013-10-081-1/+3
|\ | | | | | | | | Reviewed-by: Lars Wirzenius Reviewed-by: Richard Maw
| * Added 'description' field to static defaults for cluster morphologiesDan Firth2013-10-071-1/+3
| |
* | Merge remote-tracking branch 'origin/danielfirth/RT189'Lars Wirzenius2013-10-081-16/+20
|\ \ | |/ |/| | | Changed the error (exception) to list all obsolete fields.
| * 'system-kind' and 'disk-size' system morphology fields now raise ↵Dan Firth2013-10-011-0/+19
| | | | | | | | ObsoleteFieldError
| * Dropped support for 'system-kind' from system morphology filesDan Firth2013-09-271-15/+0
| |
| * Dropped support for 'disk-size' from system morphology files'Dan Firth2013-09-271-1/+0
|/
* morphloader: Add method to unset default valuesRichard Maw2013-08-301-2/+23
| | | | | | | | | | | | | The original contents of the morphology is not generally trackable, comments are lost for example, and it's simpler to output a canonical format than attempt to preserve everything of the original. However, we don't want to clutter the output with fields that have been filled out to be the defaults, so provide a method to remove fields that are the same as their default. This also removes a check in set_defaults that it is a valid kind, since it explicitly declares it assumes the morphology is valid.
* Add initial code to support clusters in morphloaderTiago Gomes2013-08-161-5/+14
| | | | | | | Although clusters morphologies are still loaded using the old code, `checkout` in the new branch-and-merge plugin tries to load and validate the morphology using morphloader.
* Fix variable nameLars Wirzenius2013-08-161-1/+1
|
* Use isinstance instead of type when checking morphology object typeLars Wirzenius2013-08-151-1/+1
| | | | Suggested by Richard Maw
* Check for empty strata earlierLars Wirzenius2013-08-151-4/+4
| | | | Suggested by Richard Maw
* Fix how stratum empty build deps check is doneLars Wirzenius2013-08-151-1/+1
| | | | | | | The old code, which MorphologyLoader will replace, allows build-mode test as well as bootstrap, so the new code needs to do that too. Suggested by Richard Maw.
* Systematically use spec instead of infoLars Wirzenius2013-08-151-4/+4
| | | | | | | | We don't have a real name for the dict that tells us what chunk (or stratum) to use in a stratum (or system). The code was sometimes using spec, and sometimes info. It now uses spec always. Suggested by Richard Maw
* Rename method to MorphologyLoader.parse_morphology_textLars Wirzenius2013-08-151-3/+5
| | | | | | | The new name is more descriptive, since it turns out that the method doesn't just parse strings, but also open file handles. Suggested by Richard Maw.
* Drop use of explicit StringIO with the yaml moduleLars Wirzenius2013-08-151-5/+2
| | | | | | | It turns out the yaml module can handle strings directly, and does not need explicit file handles. Suggested by Richard Maw.
* Add new morphology abstraction and morphology loading/savingLars Wirzenius2013-08-141-0/+343
The old code is somewhat weird. The new code is meant to be cleaner and more straightforward to understand and to use. For example, the old code has setting of defaults in both the Morphology and MorphologyFactory classes. The new code has a minimally simple Morphology class, and has all the logic to validate and set defaults in the MorphologyLoader class. Further, the new code makes it possible to load an invalid morphology, which will be useful later.