{"action":"created","issue":{"url":"https://api.github.com/repos/uw-cmg/MAST/issues/437","repository_url":"https://api.github.com/repos/uw-cmg/MAST","labels_url":"https://api.github.com/repos/uw-cmg/MAST/issues/437/labels{/name}","comments_url":"https://api.github.com/repos/uw-cmg/MAST/issues/437/comments","events_url":"https://api.github.com/repos/uw-cmg/MAST/issues/437/events","html_url":"https://github.com/uw-cmg/MAST/issues/437","id":109851354,"number":437,"title":"structopt - copy file runs into name validation error since it nests initial folders","user":{"login":"cmgtam","id":2433716,"avatar_url":"https://avatars.githubusercontent.com/u/2433716?v=3","gravatar_id":"","url":"https://api.github.com/users/cmgtam","html_url":"https://github.com/cmgtam","followers_url":"https://api.github.com/users/cmgtam/followers","following_url":"https://api.github.com/users/cmgtam/following{/other_user}","gists_url":"https://api.github.com/users/cmgtam/gists{/gist_id}","starred_url":"https://api.github.com/users/cmgtam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmgtam/subscriptions","organizations_url":"https://api.github.com/users/cmgtam/orgs","repos_url":"https://api.github.com/users/cmgtam/repos","events_url":"https://api.github.com/users/cmgtam/events{/privacy}","received_events_url":"https://api.github.com/users/cmgtam/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/uw-cmg/MAST/labels/critical%20fix","name":"critical fix","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/uw-cmg/MAST/milestones/23","html_url":"https://github.com/uw-cmg/MAST/milestones/Structure%20Optimization%20(structopt)","labels_url":"https://api.github.com/repos/uw-cmg/MAST/milestones/23/labels","id":673481,"number":23,"title":"Structure Optimization (structopt)","description":"","creator":{"login":"cmgtam","id":2433716,"avatar_url":"https://avatars.githubusercontent.com/u/2433716?v=3","gravatar_id":"","url":"https://api.github.com/users/cmgtam","html_url":"https://github.com/cmgtam","followers_url":"https://api.github.com/users/cmgtam/followers","following_url":"https://api.github.com/users/cmgtam/following{/other_user}","gists_url":"https://api.github.com/users/cmgtam/gists{/gist_id}","starred_url":"https://api.github.com/users/cmgtam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmgtam/subscriptions","organizations_url":"https://api.github.com/users/cmgtam/orgs","repos_url":"https://api.github.com/users/cmgtam/repos","events_url":"https://api.github.com/users/cmgtam/events{/privacy}","received_events_url":"https://api.github.com/users/cmgtam/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":14,"state":"open","created_at":"2014-05-28T21:35:53Z","updated_at":"2016-07-18T19:54:53Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-10-05T17:55:20Z","updated_at":"2016-07-18T19:54:53Z","closed_at":"2016-07-18T19:54:53Z","body":"Instead, add a no name validation method, and use here:\r\n\r\nstructoptchecker.py, method subfolders_complete:\r\n                        #mychoping.copy_file(copyfrom=\"CONTCAR\", copyto=\"POSCAR\")\r\n                        #TTM 20151005\r\n                        mychoping.copy_file_no_name_validation(copyfrom=\"CONTCAR\", copyto=\"POSCAR\")\r\n\r\n\r\nchopingredient.py:\r\n\r\n    def copy_file_no_name_validation(self, copyfrom=\"\", copyto=\"\", childdir=\"\", softlink=0):\r\n        return self.copy_file(copyfrom, copyto, childdir, softlink, 0)\r\n        \r\n\r\n    def copy_file(self, copyfrom=\"\", copyto=\"\", childdir=\"\", softlink=0, validate=1):\r\n        \"\"\"Copy a file.\r\n            Args:\r\n                copyfrom <str>: name to copy from, e.g. CONTCAR\r\n                copyto <str>: name to copy to, e.g. POSCAR\r\n                childdir <str>: child directory.\r\n                    If not given, use the same directory.\r\n                softlink <int>: 0 (default) - copy\r\n                                1 - softlink\r\n            Log an error if the file is already found\r\n                and do not copy over.\r\n            Do not copy over if the file is empty.\r\n        \"\"\"\r\n        mydir = self.keywords['name']\r\n        if copyfrom == \"\":\r\n            raise MASTError(self.__class__.__name__, \"No copy-from file given, ingredient %s\" % mydir)\r\n        if copyto == \"\":\r\n            copyto = copyfrom\r\n        if childdir == \"\":\r\n            childdir = mydir\r\n        if validate == 1:\r\n            childdir = self._fullpath_childname(childdir)\r\n        if not os.path.isdir(childdir):\r\n"},"comment":{"url":"https://api.github.com/repos/uw-cmg/MAST/issues/comments/233439410","html_url":"https://github.com/uw-cmg/MAST/issues/437#issuecomment-233439410","issue_url":"https://api.github.com/repos/uw-cmg/MAST/issues/437","id":233439410,"user":{"login":"cmgtam","id":2433716,"avatar_url":"https://avatars.githubusercontent.com/u/2433716?v=3","gravatar_id":"","url":"https://api.github.com/users/cmgtam","html_url":"https://github.com/cmgtam","followers_url":"https://api.github.com/users/cmgtam/followers","following_url":"https://api.github.com/users/cmgtam/following{/other_user}","gists_url":"https://api.github.com/users/cmgtam/gists{/gist_id}","starred_url":"https://api.github.com/users/cmgtam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmgtam/subscriptions","organizations_url":"https://api.github.com/users/cmgtam/orgs","repos_url":"https://api.github.com/users/cmgtam/repos","events_url":"https://api.github.com/users/cmgtam/events{/privacy}","received_events_url":"https://api.github.com/users/cmgtam/received_events","type":"User","site_admin":false},"created_at":"2016-07-18T19:54:53Z","updated_at":"2016-07-18T19:54:53Z","body":"Fixed in commit cf97ad135a864056c3481b7b843e321ea109d2e9"}}
{"actor":{"display_login":"cmgtam"}}