Converts specification look up into a factory.#153
Converts specification look up into a factory.#153FrankD412 merged 13 commits intospecification/yaml2.0from
Conversation
| """ | ||
| Look up and retrieve a Specification by name. | ||
|
|
||
| :param spec_name: Name of the Specification to find. |
There was a problem hiding this comment.
Is spec_name referring to the specification format (e.g., yaml)?
There was a problem hiding this comment.
Yes and no -- I couldn't figure out a good name for a Maestro YAML specification, but that could also be something like "cwl" for Common Workflow Language and things like that. I'm definitely welcome to suggestions either for naming or a better way to handle the "naming" to make it clearer.
There was a problem hiding this comment.
How about spec_type or spec_kind?
| """A factory class to retrieve different types of Specifications.""" | ||
|
|
||
| _classes = { | ||
| "yaml": { |
There was a problem hiding this comment.
Question: This means you're going to support other specifications in the future?
There was a problem hiding this comment.
I don't know if I'll necessarily support them myself, but I did want to open up the ability to at least support versions. I also wanted to make it easier for others to add specification definitions also (I'm planning to add another PR for adding a command line parameter for spec type that defaults to YAML@latest).
| """ | ||
| Look up and retrieve a Specification by name. | ||
|
|
||
| :param spec_name: Name of the Specification to find. |
There was a problem hiding this comment.
How about spec_type or spec_kind?
1d7c7a0 to
2897e47
Compare
* typos. fixes #141 (#154) * Initial pass at a possible v2.0 * Moved specifications to their own submodule. * Point Maestro to the new location for the YAML spec. * Addition of a factory for finding specifications. * Correction of a type of "Keyerror". * Addition of version to docstring for get_specification. * Update Maestro to use the SpecificationFactory. * Removed global import of the DAG data structure. * Updates to 'spec_name' to make it clear (changed to 'spec_type') * Correction of flake8 errors. * Correction of uncaught spec_name references. * Correction of regex raw string.
* typos. fixes #141 (#154) * Initial pass at a possible v2.0 * Moved specifications to their own submodule. * Point Maestro to the new location for the YAML spec. * Addition of a factory for finding specifications. * Correction of a type of "Keyerror". * Addition of version to docstring for get_specification. * Update Maestro to use the SpecificationFactory. * Removed global import of the DAG data structure. * Updates to 'spec_name' to make it clear (changed to 'spec_type') * Correction of flake8 errors. * Correction of uncaught spec_name references. * Correction of regex raw string.
Since we're looking to update the YAML specification, it's probably about time we convert to a factory for specifications. The factory let's us retain reverse compatibility to older versions of the YAML specification and support other types of specifications in the future.