diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-06-19 13:55:30 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-06-19 16:41:26 +0000 |
commit | 6da0ef49f8d467a7820c9cf7fcbc13e566f5db47 (patch) | |
tree | d82557b841d95a66c788a7473274daea2cab7fc6 /scripts | |
parent | 6b4cb5a5a58d5a536369a20612ff7c656cdd0921 (diff) | |
download | morph-6da0ef49f8d467a7820c9cf7fcbc13e566f5db47.tar.gz |
yarns: Adapt to put morphologies in subdirsbaserock/richardmaw/S11284/morphologies-by-path
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.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/edit-morph | 6 |
1 files changed, 1 insertions, 5 deletions
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) |