Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove phidl dependency #741

Merged
merged 35 commits into from Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ee22f74
remove phidl from component
joamatab Sep 29, 2022
6cc9558
flake8 passing
joamatab Sep 29, 2022
eb15138
flake8 passing
joamatab Sep 29, 2022
e639d3a
remove more phidl
joamatab Sep 29, 2022
7955ac3
remove more phidl
joamatab Sep 29, 2022
0adddf7
remove more phidl
joamatab Sep 29, 2022
fc96910
remove more phidl
joamatab Sep 29, 2022
9676b72
remove phidl
joamatab Sep 29, 2022
2a43d1c
fix some lint errors
joamatab Sep 29, 2022
bd03656
component_reference
joamatab Sep 29, 2022
4fea238
remove _parse_layer
joamatab Sep 29, 2022
5930c6a
add constants
joamatab Sep 29, 2022
3d8129b
remove phidl from path
joamatab Sep 29, 2022
681ead5
fix tests
joamatab Sep 29, 2022
ece45a2
remove phidl from geometry
joamatab Sep 29, 2022
fbd798c
fix flake8
joamatab Sep 29, 2022
f41415f
remove port.midpoint as it was deprecated
joamatab Sep 29, 2022
5b01675
rename most Device as Component
joamatab Sep 29, 2022
a76f31e
fix routing
joamatab Sep 29, 2022
5ddd494
fix route_sharp
joamatab Sep 29, 2022
3cd6acc
remove fill dependency
joamatab Sep 29, 2022
90d6c29
change adapted from to based on phidl
joamatab Sep 29, 2022
bf67989
fix text
joamatab Sep 29, 2022
4de23da
add snspds from phidl
joamatab Sep 29, 2022
3ba1312
fix flake8
joamatab Sep 29, 2022
4553434
fix tests
joamatab Sep 29, 2022
2b85ec8
fix tests
joamatab Sep 29, 2022
e0a1f2c
'Refactored by Sourcery'
Sep 29, 2022
ab57b43
fix notebooks
joamatab Sep 29, 2022
6c7dd78
Merge pull request #742 from gdsfactory/sourcery/remove_phidl2
joamatab Sep 29, 2022
4e76941
fix pre-commit
joamatab Sep 29, 2022
b33eed7
fix smooth
joamatab Sep 29, 2022
9533812
exclude_from_current=True
joamatab Sep 29, 2022
639d7bb
move phidl to requirements_full
joamatab Sep 29, 2022
ba05ce9
fix lint error
joamatab Sep 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -9,6 +9,7 @@
*.pkl
*.msh
*.xdmf
*.svg
test_mask_metadata.csv
test_mask_metadata.yml
.pyre_configuration
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Expand Up @@ -107,10 +107,10 @@ repos:
# hooks:
# - id: darglint
#
- repo: https://github.com/pycqa/pydocstyle
rev: "a6fe4222012e990042c86cdaaa904a8d059752ee"
hooks:
- id: pydocstyle
# - repo: https://github.com/pycqa/pydocstyle
# rev: "a6fe4222012e990042c86cdaaa904a8d059752ee"
# hooks:
# - id: pydocstyle
# - repo: https://github.com/asottile/reorder_python_imports
# rev: 2b2f0c74acdb3de316e23ceb7dd0d7945c354050
# hooks:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,9 @@
## 5.36.0

- Add thermal solver [PR](https://github.com/gdsfactory/gdsfactory/pull/739)
- remove phidl dependency
- remove incremental naming from phidl
- remove Port.midpoint as it was deprecated since 5.14.0

## 5.35.0

Expand Down
3 changes: 3 additions & 0 deletions Makefile
Expand Up @@ -32,6 +32,9 @@ plugins:
pip install -r requirements_sipann.txt
pip install --upgrade "protobuf<=3.20.1"

thermal:
mamba install python-gmsh

meep:
mamba install pymeep=*=mpi_mpich_* -y

Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -50,9 +50,9 @@ It also exports component settings (for measurement and data analysis) and netli
![flow](https://i.imgur.com/XbhWJDz.png)


It provides you a common syntax for layout (klayout, gdspy, phidl), simulation (Lumerical, tidy3d, MEEP, MPB, DEVSIM, simphony, SAX, ...) and data analysis libraries.
It provides you a common syntax for layout (klayout, gdspy), simulation (Lumerical, tidy3d, MEEP, MPB, DEVSIM, simphony, SAX, ...) and data analysis libraries.

![tool interfaces](https://i.imgur.com/9Sh8Qav.png)
![tool interfaces](https://i.imgur.com/bQslWHO.png)


## Installation
Expand Down
89 changes: 82 additions & 7 deletions docs/components.rst
Expand Up @@ -257,7 +257,7 @@ bend_circular

import gdsfactory as gf

c = gf.components.bend_circular(angle=90.0, npoints=720, with_bbox=True)
c = gf.components.bend_circular(angle=90.0, npoints=720, with_bbox=True, cross_section='strip')
c.plot()


Expand All @@ -272,7 +272,7 @@ bend_circular180

import gdsfactory as gf

c = gf.components.bend_circular180(angle=180, npoints=720, with_bbox=True)
c = gf.components.bend_circular180(angle=180, npoints=720, with_bbox=True, cross_section='strip')
c.plot()


Expand Down Expand Up @@ -1880,6 +1880,51 @@ nxn



optimal_90deg
----------------------------------------------------

.. autofunction:: gdsfactory.components.optimal_90deg

.. plot::
:include-source:

import gdsfactory as gf

c = gf.components.optimal_90deg(width=100, num_pts=15, length_adjust=1, layer=[1, 0])
c.plot()



optimal_hairpin
----------------------------------------------------

.. autofunction:: gdsfactory.components.optimal_hairpin

.. plot::
:include-source:

import gdsfactory as gf

c = gf.components.optimal_hairpin(width=0.2, pitch=0.6, length=10, turn_ratio=4, num_pts=50, layer=[1, 0])
c.plot()



optimal_step
----------------------------------------------------

.. autofunction:: gdsfactory.components.optimal_step

.. plot::
:include-source:

import gdsfactory as gf

c = gf.components.optimal_step(start_width=10, end_width=22, num_pts=50, width_tol=0.001, anticrowding_factor=1.2, symmetric=False, layer=[1, 0])
c.plot()



pack_doe
----------------------------------------------------

Expand Down Expand Up @@ -2190,7 +2235,7 @@ ring_double_heater

import gdsfactory as gf

c = gf.components.ring_double_heater(gap=0.2, radius=10.0, length_x=0.01, length_y=0.01, port_orientation=90, via_stack_offset=[0, 0])
c = gf.components.ring_double_heater(gap=0.2, radius=10.0, length_x=0.01, length_y=0.01, cross_section_heater='heater_metal', cross_section_waveguide_heater='strip_heater_metal', cross_section='strip', port_orientation=90, via_stack_offset=[0, 0])
c.plot()


Expand Down Expand Up @@ -2250,7 +2295,7 @@ ring_single_heater

import gdsfactory as gf

c = gf.components.ring_single_heater(gap=0.2, radius=10.0, length_x=4.0, length_y=0.6, port_orientation=90, via_stack_offset=[0, 0])
c = gf.components.ring_single_heater(gap=0.2, radius=10.0, length_x=4.0, length_y=0.6, cross_section_waveguide_heater='strip_heater_metal', cross_section='strip', port_orientation=90, via_stack_offset=[0, 0])
c.plot()


Expand All @@ -2270,6 +2315,21 @@ seal_ring



snspd
----------------------------------------------------

.. autofunction:: gdsfactory.components.snspd

.. plot::
:include-source:

import gdsfactory as gf

c = gf.components.snspd(wire_width=0.2, wire_pitch=0.6, size=[10, 8], turn_ratio=4, terminals_same_side=False, layer=[1, 0])
c.plot()



spiral_double
----------------------------------------------------

Expand Down Expand Up @@ -2655,7 +2715,22 @@ taper_cross_section_linear

import gdsfactory as gf

c = gf.components.taper_cross_section_linear(length=10, npoints=2, linear=True)
c = gf.components.taper_cross_section_linear(length=10, npoints=2, linear=True, width_type='sine')
c.plot()



taper_cross_section_parabolic
----------------------------------------------------

.. autofunction:: gdsfactory.components.taper_cross_section_parabolic

.. plot::
:include-source:

import gdsfactory as gf

c = gf.components.taper_cross_section_parabolic(length=10, npoints=101, linear=False, width_type='parabolic')
c.plot()


Expand All @@ -2670,7 +2745,7 @@ taper_cross_section_sine

import gdsfactory as gf

c = gf.components.taper_cross_section_sine(length=10, npoints=101, linear=False)
c = gf.components.taper_cross_section_sine(length=10, npoints=101, linear=False, width_type='sine')
c.plot()


Expand Down Expand Up @@ -2925,7 +3000,7 @@ version_stamp

import gdsfactory as gf

c = gf.components.version_stamp(labels=['demo_label'], with_qr_code=False, layer='WG', pixel_size=1, version='5.32.5', text_size=10)
c = gf.components.version_stamp(labels=['demo_label'], with_qr_code=False, layer='WG', pixel_size=1, version='5.35.0', text_size=10)
c.plot()


Expand Down
6 changes: 3 additions & 3 deletions docs/notebooks/00_geometry.ipynb
Expand Up @@ -112,7 +112,7 @@
" return WG\n",
"\n",
"\n",
"c = gf.Component(\"straights\")\n",
"c = gf.Component(\"straights_not_connected\")\n",
"\n",
"wg1 = c << straight(length=6, width=2.5, layer=1)\n",
"wg2 = c << straight(length=11, width=2.5, layer=2)\n",
Expand Down Expand Up @@ -179,7 +179,7 @@
"metadata": {},
"outputs": [],
"source": [
"c = gf.Component(\"straights\")\n",
"c = gf.Component(\"straights_connected\")\n",
"\n",
"wg1 = c << straight(length=1, layer=(1, 0))\n",
"wg2 = c << straight(length=2, layer=(2, 0))\n",
Expand Down Expand Up @@ -499,7 +499,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.5"
"version": "3.10.6"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions docs/notebooks/01_references.ipynb
Expand Up @@ -176,7 +176,7 @@
"metadata": {},
"outputs": [],
"source": [
"c2 = gf.Component() # Create a new blank Component\n",
"c2 = gf.Component('array_sample') # Create a new blank Component\n",
"d_ref1 = c2.add_ref(c) # Reference the Component \"c\" that 3 references in it\n",
"d_ref2 = c2 << c # Use the \"<<\" operator to create a 2nd reference to c\n",
"d_ref3 = c2 << c # Use the \"<<\" operator to create a 3rd reference to c\n",
Expand Down Expand Up @@ -315,7 +315,7 @@
"metadata": {},
"outputs": [],
"source": [
"c3 = gf.Component() # Create a new blank Component\n",
"c3 = gf.Component('array_of_references') # Create a new blank Component\n",
"aref = c3.add_array(\n",
" c, columns=6, rows=3, spacing=[20, 15]\n",
") # Reference the Component \"c\" 3 references in it with a 3 rows, 6 columns array\n",
Expand Down Expand Up @@ -848,7 +848,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.5"
"version": "3.10.6"
}
},
"nbformat": 4,
Expand Down
26 changes: 16 additions & 10 deletions docs/notebooks/02_movement.ipynb
Expand Up @@ -26,7 +26,7 @@
"# Start with a blank Component\n",
"c = gf.Component(\"demo_movement\")\n",
"\n",
"# Create some more shape Devices\n",
"# Create some more shape Components\n",
"T = gf.components.text(\"hello\", size=10, layer=(1, 0))\n",
"E = gf.components.ellipse(radii=(10, 5), layer=(2, 0))\n",
"R = gf.components.rectangle(size=(10, 3), layer=(3, 0))\n",
Expand Down Expand Up @@ -65,7 +65,7 @@
"metadata": {},
"outputs": [],
"source": [
"c = gf.Component(\"move_one_ellipse\")\n",
"c = gf.Component(\"move_one_ellipse_xmin\")\n",
"e1 = c << gf.components.ellipse(radii=(10, 5), layer=(2, 0))\n",
"e2 = c << gf.components.ellipse(radii=(10, 5), layer=(2, 0))\n",
"e2.xmin = e1.xmax\n",
Expand All @@ -85,7 +85,7 @@
"metadata": {},
"outputs": [],
"source": [
"c = gf.Component(\"ellipse\")\n",
"c = gf.Component(\"two_ellipses_on_top_of_each_other\")\n",
"E = gf.components.ellipse(radii=(10, 5), layer=(2, 0))\n",
"e1 = c << E\n",
"e2 = c << E\n",
Expand All @@ -98,7 +98,7 @@
"metadata": {},
"outputs": [],
"source": [
"c = gf.Component(\"ellipse\")\n",
"c = gf.Component(\"ellipse_moved\")\n",
"e = gf.components.ellipse(radii=(10, 5), layer=(2, 0))\n",
"e1 = c << e\n",
"e2 = c << e\n",
Expand All @@ -112,7 +112,7 @@
"metadata": {},
"outputs": [],
"source": [
"c = gf.Component(\"ellipse\")\n",
"c = gf.Component(\"ellipse_moved_v2\")\n",
"e = gf.components.ellipse(radii=(10, 5), layer=(2, 0))\n",
"e1 = c << e\n",
"e2 = c << e\n",
Expand Down Expand Up @@ -150,9 +150,8 @@
"metadata": {},
"outputs": [],
"source": [
"c = gf.Component(\"mirror\")\n",
"c = gf.Component(\"mirror_demo\")\n",
"text = c << gf.components.text(\"hello\")\n",
"\n",
"text.mirror(p1=[1, 1], p2=[1, 3]) # Reflects across the line formed by p1 and p2\n",
"c"
]
Expand Down Expand Up @@ -322,7 +321,7 @@
"# which takes a bounding box and returns the rectangle points for it\n",
"import gdsfactory as gf\n",
"\n",
"c = gf.Component()\n",
"c = gf.Component('hi_bbox')\n",
"text = c << gf.components.text(\"hi\")\n",
"bbox = text.bbox\n",
"c << gf.components.bbox(bbox=bbox, layer=(2, 0))\n",
Expand Down Expand Up @@ -433,12 +432,19 @@
},
"outputs": [],
"source": [
"D = gf.Component()\n",
"D = gf.Component('single_expression')\n",
"R = gf.components.rectangle(size=(10, 3), layer=(2, 0))\n",
"rect1 = D << R\n",
"rect1.rotate(angle=37).move([10, 20])\n",
"D"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -457,7 +463,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.10"
"version": "3.10.6"
}
},
"nbformat": 4,
Expand Down