diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-12-07 17:26:17 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2016-03-24 23:06:07 +0000 |
commit | 48e4a7941a4c1351076a2edf23274b41b19eab19 (patch) | |
tree | fd557cd3b093604c3f87e1f672260232ed8f625b /morphlib/util.py | |
parent | 3b65cfe5f6123db169c64023fa9f8dda8a51ff49 (diff) | |
download | morph-48e4a7941a4c1351076a2edf23274b41b19eab19.tar.gz |
Add JSON schemas
They will be used for validating the morphologies in a future commit.
These were copied from [1], with the following changes:
* The field unpetrify-ref can be of type number in addition to type
string
* Build commands can be of type boolean in addition to type string
* minItems were set for some fields of type array
[1]: http://git.baserock.org/cgi-bin/cgit.cgi/baserock/baserock/definitions.git/tree/schemas
Change-Id: I962188ad5774472f08b10f6dfff8aac7a106ef23
Diffstat (limited to 'morphlib/util.py')
-rw-r--r-- | morphlib/util.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/morphlib/util.py b/morphlib/util.py index ba170952..0c3291c2 100644 --- a/morphlib/util.py +++ b/morphlib/util.py @@ -780,7 +780,7 @@ class ProgressBar(object): sys.stderr.flush() -def schemas_directory(): # pragma: no cover +def schemas_directory(version): # pragma: no cover '''Returns a path to the schemas/ subdirectory of the 'morphlib' module.''' code_dir = os.path.dirname(morphlib.__file__) - return os.path.join(code_dir, 'schemas') + return os.path.join(code_dir, 'schemas', str(version)) |