{"action":"created","issue":{"url":"https://api.github.com/repos/spyder-ide/spyder-kernels/issues/97","repository_url":"https://api.github.com/repos/spyder-ide/spyder-kernels","labels_url":"https://api.github.com/repos/spyder-ide/spyder-kernels/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/spyder-ide/spyder-kernels/issues/97/comments","events_url":"https://api.github.com/repos/spyder-ide/spyder-kernels/issues/97/events","html_url":"https://github.com/spyder-ide/spyder-kernels/issues/97","id":424397667,"node_id":"MDU6SXNzdWU0MjQzOTc2Njc=","number":97,"title":"Can't repeat runcell from terminal","user":{"login":"impact27","id":6740194,"node_id":"MDQ6VXNlcjY3NDAxOTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/6740194?v=4","gravatar_id":"","url":"https://api.github.com/users/impact27","html_url":"https://github.com/impact27","followers_url":"https://api.github.com/users/impact27/followers","following_url":"https://api.github.com/users/impact27/following{/other_user}","gists_url":"https://api.github.com/users/impact27/gists{/gist_id}","starred_url":"https://api.github.com/users/impact27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/impact27/subscriptions","organizations_url":"https://api.github.com/users/impact27/orgs","repos_url":"https://api.github.com/users/impact27/repos","events_url":"https://api.github.com/users/impact27/events{/privacy}","received_events_url":"https://api.github.com/users/impact27/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2019-03-22T20:59:32Z","updated_at":"2019-04-05T00:22:09Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"When calling runfile, I can just repeat the call in the terminal by pressing up + enter.\r\nI use to be able to do that when running a cell as well. But since the introduction of the runcell function, I get:\r\n```\r\n--Run Cell Error--\r\nPlease use only through Spyder's Editor; shouldn't be called manually from the console\r\n```\r\nMaybe it would make sense to give the line number to runcell so it could be called from the terminal?"},"comment":{"url":"https://api.github.com/repos/spyder-ide/spyder-kernels/issues/comments/480108208","html_url":"https://github.com/spyder-ide/spyder-kernels/issues/97#issuecomment-480108208","issue_url":"https://api.github.com/repos/spyder-ide/spyder-kernels/issues/97","id":480108208,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4MDEwODIwOA==","user":{"login":"bcolsen","id":10513354,"node_id":"MDQ6VXNlcjEwNTEzMzU0","avatar_url":"https://avatars1.githubusercontent.com/u/10513354?v=4","gravatar_id":"","url":"https://api.github.com/users/bcolsen","html_url":"https://github.com/bcolsen","followers_url":"https://api.github.com/users/bcolsen/followers","following_url":"https://api.github.com/users/bcolsen/following{/other_user}","gists_url":"https://api.github.com/users/bcolsen/gists{/gist_id}","starred_url":"https://api.github.com/users/bcolsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcolsen/subscriptions","organizations_url":"https://api.github.com/users/bcolsen/orgs","repos_url":"https://api.github.com/users/bcolsen/repos","events_url":"https://api.github.com/users/bcolsen/events{/privacy}","received_events_url":"https://api.github.com/users/bcolsen/received_events","type":"User","site_admin":false},"created_at":"2019-04-05T00:22:09Z","updated_at":"2019-04-05T00:22:09Z","author_association":"MEMBER","body":">The problem I see with solution 3 is: how to give a unique key to a cell that would be stable?\r\nWhat if I have: (1 | 2 3) and add a cell between 1 and 2? Should I have (1 4 2 3)? If I reopen the file, what will be the new order?\r\n>\r\n>Maybe solution 2 can be improved by adding a reference number for the block?\r\n>As you say,\r\n>\r\n>>  No one is going to type that into the console, so It really only good to rerun cells\r\n>\r\n> But at least finding the line would be more stable\r\n\r\nTo make code cells stable during editing it's best to use block_id and when reopening we only have line_numbers. We would have to save the code cell unique id and line_number to a config dictionary per file. When the file is loaded we make a working dictionary of unique id to block_id. This is similar to he way break points are handled. This was also recently implemented for cursor bookmarks in https://github.com/spyder-ide/spyder/pull/848. This way the unique_id and filename can be used in runcell to define the cell. The unique id would need to be edited when the code cell name changes. \r\n\r\nThe cell unique id can be the name of the cell if it's unique or a non-unique name + id number where the ID number assigned to new cells will be the highest ID number assigned in the current dictionary plus one. There is a corner case where someone names their cell with a number at the end`# %% My Cell 1000000` the next unlabeled cell made will get `Unnamed cell 1000001`, but at least it's still unique and stable"}}
{"actor":{"display_login":"bcolsen"}}