-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Unless there is some scope of this project I am missing I would highly recommend doing away with the ModelCatalogInsertion/files directory and just have ModelCatalogInsertion work within the current directory the user is in (similar to how wcm used to work). So, if a user runs caps-cli initialize in their desktop it will just make the initialize_schema.json file there. wcm make-yaml shows an example of this.
If you dont want to use the current directory and instead want a standardized place for files then files should be put a specified location specified from the user's root directory. ie: C:/Users/Admin/.caps-cli. The wcm credentials file is an example of this. It is located in C:/Users/Admin/.wcm. Though there needs to be an error or warning thrown if the file cannot be found
Also since ModelCatalogInsertion will eventually be installed from pip there should be no need for the user to cd into the cloned repo
In case you want the error message for this:
$ caps-cli initialize
WARNING: You are using caps-cli version 0.1.0, however version 0.1.2 is available.
You should consider upgrading via the 'pip install --upgrade caps' command.
Traceback (most recent call last):
File "C:\users\admin\appdata\local\programs\python\python36\Scripts\caps-cli-script.py", line 11, in <module>
load_entry_point('caps-cli==0.1.0', 'console_scripts', 'caps-cli')()
File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\caps_cli-0.1.0-py3.6.egg\caps\__main__.py", line 58, in initialize
with open("./files/initialize_schema.json", "r") as fp:
FileNotFoundError: [Errno 2] No such file or directory: './files/initialize_schema.json'