From 597f2a19363b7e91b928d814627c9236779998fb Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Thu, 19 Jun 2014 13:55:30 +0000 Subject: yarns: Adapt to put morphologies in subdirs We want to move our morphologies in our definitions repository into subdirectories, so they're more organised. We'd prefer to only refer to morphologies by file path, rather than a name that loosely corresponds to the file path, but we need to support that for backwards compatibility until we can move all of our morphologies into the definitions repository. However, since we want to eventually remove this, and we want to ensure that file paths work, we change the yarn tests to use file paths. --- scripts/edit-morph | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/edit-morph b/scripts/edit-morph index 2b81747c..d0b793a4 100755 --- a/scripts/edit-morph +++ b/scripts/edit-morph @@ -283,13 +283,9 @@ class EditMorph(cliapp.Application): return system def cmd_cluster_init(self, (cluster_file,)): - suffix = '.morph' - if not cluster_file.endswith(suffix): - raise cliapp.AppException( - "Morphology file path must end with .morph") with open(cluster_file, 'w') as f: d = { - 'name': os.path.basename(cluster_file)[:-len(suffix)], + 'name': os.path.splitext(os.path.basename(cluster_file))[0], 'kind': 'cluster', } yaml.dump(d, f) -- cgit v1.2.1