{"action":"created","issue":{"url":"https://api.github.com/repos/lukasc-ubc/SiEPIC-Tools/issues/98","repository_url":"https://api.github.com/repos/lukasc-ubc/SiEPIC-Tools","labels_url":"https://api.github.com/repos/lukasc-ubc/SiEPIC-Tools/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/lukasc-ubc/SiEPIC-Tools/issues/98/comments","events_url":"https://api.github.com/repos/lukasc-ubc/SiEPIC-Tools/issues/98/events","html_url":"https://github.com/lukasc-ubc/SiEPIC-Tools/pull/98","id":394736810,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxNDA4OTk1","number":98,"title":"initial draft of siepic_tools python package, refactoring guidelines","user":{"login":"thomaslima","id":1088659,"node_id":"MDQ6VXNlcjEwODg2NTk=","avatar_url":"https://avatars2.githubusercontent.com/u/1088659?v=4","gravatar_id":"","url":"https://api.github.com/users/thomaslima","html_url":"https://github.com/thomaslima","followers_url":"https://api.github.com/users/thomaslima/followers","following_url":"https://api.github.com/users/thomaslima/following{/other_user}","gists_url":"https://api.github.com/users/thomaslima/gists{/gist_id}","starred_url":"https://api.github.com/users/thomaslima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomaslima/subscriptions","organizations_url":"https://api.github.com/users/thomaslima/orgs","repos_url":"https://api.github.com/users/thomaslima/repos","events_url":"https://api.github.com/users/thomaslima/events{/privacy}","received_events_url":"https://api.github.com/users/thomaslima/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-28T23:19:36Z","updated_at":"2018-12-29T18:19:55Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/lukasc-ubc/SiEPIC-Tools/pulls/98","html_url":"https://github.com/lukasc-ubc/SiEPIC-Tools/pull/98","diff_url":"https://github.com/lukasc-ubc/SiEPIC-Tools/pull/98.diff","patch_url":"https://github.com/lukasc-ubc/SiEPIC-Tools/pull/98.patch"},"body":"@atait @jaspreetj @lukasc-ubc \r\n\r\nThis is a big Pull request and I am sorry that I put my commits in the same branch that @atait was working on (`self-testing`).\r\n\r\nAs the title suggest, the purpose of this PR is to show you my suggestions for the refactoring of SiEPIC tools so it can become a pure python package that depends on the newly minted klayout package (now at version `0.26.0.dev10`).\r\n\r\nThe first step is to move everything related to layout (database objects, technology etc.) under `python/SiEPIC` to `python/siepic_tools`. You will see that I've transported most of SiEPIC.utils.* (my own code), and some of SiEPIC.extend, just enough so that https://github.com/lightwave-lab/SiEPIC_EBeam_PDK/tree/scripted_layout works. I am hoping that you can help me continue this work and finish the necessary refactoring.\r\n\r\nI've also written some technology management functions in siepic_tools.utils.tech so that we can use `get_technology_by_name(name)` or `register_siepic_technology(lyt_filename)` directly from python. This way Libraries can be loaded and registered too.\r\n\r\nFor example, this is the code in `__init__.py` for `siepic_ebeam_pdk` module available above:\r\n\r\n```python\r\nfrom os.path import join\r\nfrom siepic_tools.utils import register_siepic_technology as register\r\n\r\n# Load technologies included in the pdk\r\ntech_path = join('..', '..', 'klayout_dot_config', 'tech')\r\nEBEAM_TECH = register(join(tech_path, 'EBeam', 'EBeam.lyt'))\r\n\r\n\r\n# Load libraries\r\nfrom .library import SiEPIC_EBeam  # noqa\r\nSiEPIC_EBeam(verbose=False)\r\n```\r\n\r\nAs you can see, it loads `EBEAM_TECH` and loads the library registering a few pcells. Very little refactoring done so far on these pcells. But what's important is that now we can load EBeam's technology and library just with `import siepic_ebeam_pdk`. Since this pdk can be a python package, we can make this pdk available in PyPI, and the same code will live in the salt package! Please look again at https://github.com/lukasc-ubc/SiEPIC-Tools/blob/self-testing/SiEPIC-Tools%20refactoring.md\r\n\r\nAnother TODO. All code in siepic_tools can now be unit-tested. I need help making some tests for it. I would make this a priority."},"comment":{"url":"https://api.github.com/repos/lukasc-ubc/SiEPIC-Tools/issues/comments/450510781","html_url":"https://github.com/lukasc-ubc/SiEPIC-Tools/pull/98#issuecomment-450510781","issue_url":"https://api.github.com/repos/lukasc-ubc/SiEPIC-Tools/issues/98","id":450510781,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDUxMDc4MQ==","user":{"login":"thomaslima","id":1088659,"node_id":"MDQ6VXNlcjEwODg2NTk=","avatar_url":"https://avatars2.githubusercontent.com/u/1088659?v=4","gravatar_id":"","url":"https://api.github.com/users/thomaslima","html_url":"https://github.com/thomaslima","followers_url":"https://api.github.com/users/thomaslima/followers","following_url":"https://api.github.com/users/thomaslima/following{/other_user}","gists_url":"https://api.github.com/users/thomaslima/gists{/gist_id}","starred_url":"https://api.github.com/users/thomaslima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomaslima/subscriptions","organizations_url":"https://api.github.com/users/thomaslima/orgs","repos_url":"https://api.github.com/users/thomaslima/repos","events_url":"https://api.github.com/users/thomaslima/events{/privacy}","received_events_url":"https://api.github.com/users/thomaslima/received_events","type":"User","site_admin":false},"created_at":"2018-12-29T18:19:55Z","updated_at":"2018-12-29T18:19:55Z","author_association":"COLLABORATOR","body":"Thanks for letting me know. Time is short on our end too, that's why I only made minimal changes in order to use siepic tools properly with our scripts. I only ask that future changes in code take into account my refactoring so far, that is, include new cells in siepic_tools's library.py instead of the library macro. \r\n\r\nAre you opposed to me registering two python packages in pypi? one called siepic_tools and the other siepic_ebeam_pdk? This will make installation easier for my team."}}
{"actor":{"display_login":"thomaslima"}}