Closed bendichter closed 6 years ago
I know that generateCore
works outside the matnwb directory if you add matnwb to the matlab path. What functions are you using?
I've been having issues with generateExtension
creating a namespaces
dir in random directories.
generateExtension
will always create a namespaces
directory in the current directory where you called it. Would it make more sense for it to be stored in the matnwb directory itself?
I took the fact that namespaces
is plural to imply that it holds multiple namespaces, which means extensions in addition to core. I also think that's more convenient that way. Maybe we could offer an override, but I think it makes sense to write extensions to matnwb/namespaces by default.
Also, when I try to run generateExtension
in a random directory, I get the following error:
Error using load
'./namespaces/core.mat' is not found in the
current folder or on the MATLAB path, but exists
in:
/Users/bendichter/dev/matnwb
Change the MATLAB current folder or add its
folder to the MATLAB path.
Error in schemes.loadNamespace (line 8)
namespace = load(schemaPath);
Error in schemes.loadNamespace (line 24)
extNamespaces = [extNamespaces;
schemes.loadNamespace(depname,
extNamespaces)];
Error in generateExtension (line 38)
extmap = schemes.loadNamespace(extSchema.name);
Would it be preferable for the generate...
functions to write everything into the matnwb directory and not to the local directory?
I think so
be7be5e5b36aab738b53fa61a0c50d5e12a40114 This is fixed for namespaces but the classes are still generated in the working directory as it breaks tests in a strange way.
ok
Some matnwb functions require that the working directory is matnwb, and this can be cumbersome when using other tools (especially if those other tools also have a requirement of a different working directory). Would it be possible to alter functions like
generateExtension
so that they work no matter where you run them? Could we use environmental variables for this?