{"action":"created","issue":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/261","labels_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/261/comments","events_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/261/events","html_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/261","id":73470749,"number":261,"title":"[WIP] remove Calculator attribute access to params/records ","user":{"login":"MattHJensen","id":8301092,"avatar_url":"https://avatars.githubusercontent.com/u/8301092?v=3","gravatar_id":"","url":"https://api.github.com/users/MattHJensen","html_url":"https://github.com/MattHJensen","followers_url":"https://api.github.com/users/MattHJensen/followers","following_url":"https://api.github.com/users/MattHJensen/following{/other_user}","gists_url":"https://api.github.com/users/MattHJensen/gists{/gist_id}","starred_url":"https://api.github.com/users/MattHJensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattHJensen/subscriptions","organizations_url":"https://api.github.com/users/MattHJensen/orgs","repos_url":"https://api.github.com/users/MattHJensen/repos","events_url":"https://api.github.com/users/MattHJensen/events{/privacy}","received_events_url":"https://api.github.com/users/MattHJensen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-06T00:19:18Z","updated_at":"2015-05-07T17:59:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/261","html_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/261","diff_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/261.diff","patch_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/261.patch"},"body":"I am wondering what you all think about removing the Calculator's attribute access to params and records. This PR demonstrates what that would look like. \r\n\r\nMy sense from observing new users is that having the API rely on the Calculator's attribute access to params and records makes it more difficult for people to grasp the structure of the calculator and has been a point of confusion for our new users/contributors. \r\n\r\nFor example, rather than writing  `calc.II_em` to access the personal exemption amount, it would be more expressive if the user were to write `calc.params.II_em`. \r\n\r\nThis would also simplify our codebase considerably. \r\n\r\nA penalty is that the API will be more verbose, and the user will have to remember which data are tax law parameters (params) and which data are tax unit characteristics (records) when using the API. That said, nothing will change in functions.py, where the bulk of the tax logic is -- we won't have to use this notation there. Furthermore, our encouragement for the user to think of the data as belonging to either params or records may be educational.  \r\n\r\nIn recognition that there would be more to type under this scheme, I renamed `parameters` to `params`. \r\n\r\n  "},"comment":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/comments/99961709","html_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/261#issuecomment-99961709","issue_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/261","id":99961709,"user":{"login":"MattHJensen","id":8301092,"avatar_url":"https://avatars.githubusercontent.com/u/8301092?v=3","gravatar_id":"","url":"https://api.github.com/users/MattHJensen","html_url":"https://github.com/MattHJensen","followers_url":"https://api.github.com/users/MattHJensen/followers","following_url":"https://api.github.com/users/MattHJensen/following{/other_user}","gists_url":"https://api.github.com/users/MattHJensen/gists{/gist_id}","starred_url":"https://api.github.com/users/MattHJensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattHJensen/subscriptions","organizations_url":"https://api.github.com/users/MattHJensen/orgs","repos_url":"https://api.github.com/users/MattHJensen/repos","events_url":"https://api.github.com/users/MattHJensen/events{/privacy}","received_events_url":"https://api.github.com/users/MattHJensen/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T17:59:56Z","updated_at":"2015-05-07T17:59:56Z","body":"Per @talumbau's and @zrisher's suggestion, I just reverted the class name to `Parameters`, leaving the Calculator attribute with the new name `params`. \r\n\r\nAs a more general matter, what do people think about forcing API users to type out calc.params.II_em rather than allowing them to type calc.II_em? I believe I was one of the original advocates for the calc.II_em approach, but lately it feels like the shortcut makes it harder for newcomers to conceptualize how the calculator is structured. \r\n\r\nLooking for feedback from @talumbau and @zrisher, but also from @rkuchan and @SherwinLott as relatively new contributors. \r\n\r\nI spoke with @Amy-Xu, and she was a bit concerned by the extra typing that would be required when playing around with the calculator in a notebook, which I totally get. \r\n\r\n"}}