Skip to content

Commit

Permalink
Maestro 1.1.8+ update (#233)
Browse files Browse the repository at this point in the history
* working on adding maestro's schema validation to merlin

* updated schemas

* adding merlin_schema to spec logic

* added debug prints

* added print

* fixing vestigial Maestro calls

* adjusted merlin_schemas

* fixed json file

* validation progress

* added from_dict replacement logic

* adjusted maestrowf version req

* fixed string

* schema improvements

* merlinsection schema updates

* merlin section error parsing appears to work

* updated CHANGELOG

* fixed merge error

* Added walltime to json schema
  • Loading branch information
ben-bay authored Jun 18, 2020
1 parent e913381 commit 011d126
Show file tree
Hide file tree
Showing 7 changed files with 601 additions and 54 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added
- The sample generation command now logs stdout, stderr, and cmd.sh to merlin_info.
- Integrated Maestro validation into merlin.
- The sample `generate.cmd` now logs stdout, stderr, and `cmd.sh` to `merlin_info/`.

### Fixed
- Corrected prior bugfix.
- Unfroze Maestro version dependency.

## [1.6.1]

Expand Down
5 changes: 5 additions & 0 deletions merlin/spec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
###############################################################################
import os


dirpath = os.path.dirname(os.path.abspath(__file__))
SCHEMA_PATH = os.path.join(dirpath, "merlin_schemas.json")
144 changes: 144 additions & 0 deletions merlin/spec/schemas/merlinsection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
{
"MERLIN": {
"type": "object",
"properties": {
"resources": {
"type": "object",
"properties": {
"task_server": {
"type": "string",
"minLength": 1
},
"overlap": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string",
"pattern": "^\\$\\(\\w+\\)$"
}
]
},
"workers": {
"type": "object",
"additionalProperties": true,
"patternProperties": {
".*": {
"type": "object",
"properties": {
"steps": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
{
"type": "string"
}
]
},
"nodes": {
"anyOf": [
{
"type": "integer",
"minimum": 1
},
{
"type": "string",
"pattern": "^\\$\\(\\w+\\)$"
},
{
"type": "null"
}
]
},
"batch": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"args": {
"type": "string",
"minLength": 1
},
"machines": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1
}
}
},
"additionalProperties": false,
"required": [
"steps"
]
}
}
}
},
"additionalProperties": false
},
"samples": {
"anyOf": [
{
"type": "object",
"properties": {
"generate": {
"type": "object",
"properties": {
"cmd": {
"type": "string",
"minLength": 1
}
}
},
"level_max_dirs": {
"anyOf": [
{
"type": "integer",
"minimum": 1
},
{
"type": "string",
"pattern": "^\\$\\(\\w+\\)$"
}
]
},
"file": {
"type": "string",
"minLength": 1
},
"column_labels": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"required": [
"samples",
"resources"
]
}
}
Loading

0 comments on commit 011d126

Please sign in to comment.