{"action":"created","issue":{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/762","labels_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/762/labels{/name}","comments_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/762/comments","events_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/762/events","html_url":"https://github.com/matlab2tikz/matlab2tikz/issues/762","id":105266884,"number":762,"title":"Manage private functions","user":{"login":"egeerardyn","id":177360,"avatar_url":"https://avatars.githubusercontent.com/u/177360?v=3","gravatar_id":"","url":"https://api.github.com/users/egeerardyn","html_url":"https://github.com/egeerardyn","followers_url":"https://api.github.com/users/egeerardyn/followers","following_url":"https://api.github.com/users/egeerardyn/following{/other_user}","gists_url":"https://api.github.com/users/egeerardyn/gists{/gist_id}","starred_url":"https://api.github.com/users/egeerardyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egeerardyn/subscriptions","organizations_url":"https://api.github.com/users/egeerardyn/orgs","repos_url":"https://api.github.com/users/egeerardyn/repos","events_url":"https://api.github.com/users/egeerardyn/events{/privacy}","received_events_url":"https://api.github.com/users/egeerardyn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/labels/development","name":"development","color":"204a87"},{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/labels/discussion","name":"discussion","color":"75507b"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/milestones/12","html_url":"https://github.com/matlab2tikz/matlab2tikz/milestones/2.0%20Release","labels_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/milestones/12/labels","id":1046366,"number":12,"title":"2.0 Release","description":"","creator":{"login":"egeerardyn","id":177360,"avatar_url":"https://avatars.githubusercontent.com/u/177360?v=3","gravatar_id":"","url":"https://api.github.com/users/egeerardyn","html_url":"https://github.com/egeerardyn","followers_url":"https://api.github.com/users/egeerardyn/followers","following_url":"https://api.github.com/users/egeerardyn/following{/other_user}","gists_url":"https://api.github.com/users/egeerardyn/gists{/gist_id}","starred_url":"https://api.github.com/users/egeerardyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egeerardyn/subscriptions","organizations_url":"https://api.github.com/users/egeerardyn/orgs","repos_url":"https://api.github.com/users/egeerardyn/repos","events_url":"https://api.github.com/users/egeerardyn/events{/privacy}","received_events_url":"https://api.github.com/users/egeerardyn/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":4,"state":"open","created_at":"2015-03-31T06:52:31Z","updated_at":"2015-09-07T21:00:32Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2015-09-07T21:00:32Z","updated_at":"2015-09-08T15:30:31Z","closed_at":null,"body":"We currently have quite some private functions divided over the `test/private`, `src/private`and `test/suites/private` directories with some duplicates, near-duplicates and other nastiness.\r\n\r\nWe should come up with a strategy to manage those while reducing or removing the duplication.\r\n\r\nI do have some ideas, but some are unfeasible in Octave, others are a bit ugly. Maybe somebody else has better ideas?\r\n\r\nMy ideas:\r\n\r\n1. We could use `+package` directories. Those functions then get called as `pkg.function`. However, this is not supported in Octave 3.8 (I don't know about 4.0). So we would need to emulate that behavior in Octave.\r\n2. We could just place all those functions in another directory (MATLAB doesn't want to add `private` directories to the path). When executing the different public functions, we can dynamically load that path (and unload it using `onCleanup`).\r\n3. We could only retain a single `private`directory and poke a hole to it using a wrapper function for the other directories. In those directories, the syntax would hence become more cumbersome (e.g. `[results] = m2tPrivate('functionname', arguments{:})`. This is a way that MATLAB does in the graphics toolbox.\r\n4. ~~Commit symlinks in git. I don't think this will work well on Windows, so scratching this already.~~"},"comment":{"url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/comments/138601042","html_url":"https://github.com/matlab2tikz/matlab2tikz/issues/762#issuecomment-138601042","issue_url":"https://api.github.com/repos/matlab2tikz/matlab2tikz/issues/762","id":138601042,"user":{"login":"okomarov","id":3731173,"avatar_url":"https://avatars.githubusercontent.com/u/3731173?v=3","gravatar_id":"","url":"https://api.github.com/users/okomarov","html_url":"https://github.com/okomarov","followers_url":"https://api.github.com/users/okomarov/followers","following_url":"https://api.github.com/users/okomarov/following{/other_user}","gists_url":"https://api.github.com/users/okomarov/gists{/gist_id}","starred_url":"https://api.github.com/users/okomarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okomarov/subscriptions","organizations_url":"https://api.github.com/users/okomarov/orgs","repos_url":"https://api.github.com/users/okomarov/repos","events_url":"https://api.github.com/users/okomarov/events{/privacy}","received_events_url":"https://api.github.com/users/okomarov/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T15:30:31Z","updated_at":"2015-09-08T15:30:31Z","body":"I do not see a 100 common functions though...the version functions are used by `test` and `src`, what else (I probably have a limited vision)?\r\n\r\nI am not following:\r\n> `private` disallows testing and code re-use  (among different folders). \r\n\r\n"}}