MDODiscipline: initialize from a grammar_directory argument
Release notes
The user can use a custome directory to store the IO grammar files of a discipline.
Problem to solve
Place the IO grammar files of a discipline in a directory different from module of the discipline. This could be useful to store different naming conventions (full names vs symbols, english names vs french names, vector names vs scalar names, ...), e.g.
- my_discipline.py
- naming_1
- MyDiscipline_input.json
- MyDiscipline_output.json
- naming_2
- MyDiscipline_input.json
- MyDiscipline_output.json
- naming_1
Proposal
- Select the directory in which to search the IO grammar files of a
MDODiscipline
at instantiation of the discipline. - Use the directory of the module implementing the
MDODiscipline
as default value.
Intended users
Any users wanting to place its grammar files in a dedicated directory.
Further details
One could use an attribute grammar_directory=None
at instantiation and pass its value to MDODiscipline.auto_get_grammar_file
.