{"action":"created","issue":{"url":"https://api.github.com/repos/davidanthoff/Mimi.jl/issues/31","repository_url":"https://api.github.com/repos/davidanthoff/Mimi.jl","labels_url":"https://api.github.com/repos/davidanthoff/Mimi.jl/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/davidanthoff/Mimi.jl/issues/31/comments","events_url":"https://api.github.com/repos/davidanthoff/Mimi.jl/issues/31/events","html_url":"https://github.com/davidanthoff/Mimi.jl/pull/31","id":153116812,"number":31,"title":"Rename timestep to run and pass Clock instead of timestep","user":{"login":"davidanthoff","id":1036561,"avatar_url":"https://avatars.githubusercontent.com/u/1036561?v=3","gravatar_id":"","url":"https://api.github.com/users/davidanthoff","html_url":"https://github.com/davidanthoff","followers_url":"https://api.github.com/users/davidanthoff/followers","following_url":"https://api.github.com/users/davidanthoff/following{/other_user}","gists_url":"https://api.github.com/users/davidanthoff/gists{/gist_id}","starred_url":"https://api.github.com/users/davidanthoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidanthoff/subscriptions","organizations_url":"https://api.github.com/users/davidanthoff/orgs","repos_url":"https://api.github.com/users/davidanthoff/repos","events_url":"https://api.github.com/users/davidanthoff/events{/privacy}","received_events_url":"https://api.github.com/users/davidanthoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-04T21:16:25Z","updated_at":"2016-05-06T18:49:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/davidanthoff/Mimi.jl/pulls/31","html_url":"https://github.com/davidanthoff/Mimi.jl/pull/31","diff_url":"https://github.com/davidanthoff/Mimi.jl/pull/31.diff","patch_url":"https://github.com/davidanthoff/Mimi.jl/pull/31.patch"},"body":"This is breaking change. There are two specific changes: 1) the ``timestep`` function is renamed to ``run`` and 2) instead of passing the time index, I now pass a ``Clock`` instance from which one can extract the current timestep via the ``gettimestep`` function.\r\n\r\nMotivation for 1) is that it always bugged me that the function name wasn't a verb. Plus, if we ever change it then now, while we still roughly know who is using this. If you don't like the name, speak now or never ;)\r\n\r\nMotivation for 2) is that we can later on pass more information into components without a need to update the call signature again by adding more fields to the ``Clock`` structure.\r\n\r\n@jrising, @frankerrickson, any review would be appreciated! I plan to merge this maybe end of the week if I don't hear back. Right now I think there might be one more breaking change in how I handle external parameters, and then I hope to release a v1.0, after which backwards compatibility will be high on the list when we improve Mimi."},"comment":{"url":"https://api.github.com/repos/davidanthoff/Mimi.jl/issues/comments/217527444","html_url":"https://github.com/davidanthoff/Mimi.jl/pull/31#issuecomment-217527444","issue_url":"https://api.github.com/repos/davidanthoff/Mimi.jl/issues/31","id":217527444,"user":{"login":"davidanthoff","id":1036561,"avatar_url":"https://avatars.githubusercontent.com/u/1036561?v=3","gravatar_id":"","url":"https://api.github.com/users/davidanthoff","html_url":"https://github.com/davidanthoff","followers_url":"https://api.github.com/users/davidanthoff/followers","following_url":"https://api.github.com/users/davidanthoff/following{/other_user}","gists_url":"https://api.github.com/users/davidanthoff/gists{/gist_id}","starred_url":"https://api.github.com/users/davidanthoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidanthoff/subscriptions","organizations_url":"https://api.github.com/users/davidanthoff/orgs","repos_url":"https://api.github.com/users/davidanthoff/repos","events_url":"https://api.github.com/users/davidanthoff/events{/privacy}","received_events_url":"https://api.github.com/users/davidanthoff/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T18:49:24Z","updated_at":"2016-05-06T18:49:24Z","body":"The potential merging of a component and model is a very good point. I guess the only argument in favor of ``run`` is that a lot of similar frameworks seem to use that (HECTOR, ESMF, and I think the whole CESM stuff). But I think your argument is actually stronger, so we should not use ``run``.\r\n\r\nNow, ``tick`` and ``step`` are very time-centric, and what I liked about `` run`` was that it would maybe fit nicer with the kind of static model you are building... Maybe ``compute``, or ``execute`` or something? None of these seem great...\r\n\r\nYes, your suggestion would keep backward compatibility... I'm almost tempted though to just break things at this point and then move to a mode where we preserve backwards compat once we hit 1.0. Otherwise we will carry these hacks around forever... People can always decide to stay a bit longer on an old Mimi version if they don't want to update now.\r\n\r\nI don't think components should be able to access the whole model object. One of the design principles I have in mind is that components should never take on dependencies on other components, but once a component can access a model that would probably happen.\r\n\r\nBut, I still like the idea of not passing in a clock as an extra parameter, we could just pass it in as part of the ``state``, and then extract it from that."}}