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 colab #35

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/kynan/nbstripout
rev: e4c5b4dcbab4afa0b88b7a9243db42b1a8d95dde
rev: 0.7.1
hooks:
- id: nbstripout
files: ".ipynb"

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: 953faa6870f6663ac0121ab4a800f1ce76bca31f
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: shellcheck

- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.9"
rev: "v0.6.5"
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
29 changes: 11 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,29 @@
# gdsfactory training
# GDSFactory training

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/gdsfactory/gdsfactory-photonics-training/pages.yml)


You can [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/gdsfactory/gdsfactory-photonics-training)

Or Install gdsfactory locally on your computer.
Installation instructions.

## 1. Install Python

- [ ] Make sure you have python 3.10, 3.11 or 3.12 installed on your computer. Here is the [anaconda](https://www.anaconda.com/download/) installer.
- [ ] Ensure that Python 3.11 or 3.12 is installed on your computer. You can download the [Anaconda Installer](https://www.anaconda.com/download/) for an easy setup.

## 2. Install Klayout

- [ ] Download [klayout](https://www.klayout.de/build.html)
- [ ] Install `klive` klayout plugin to be able to see live updates on your GDS files fom the klayout GUI `Tools --> Manage Packages --> Install New Packages --> Klive`
- [ ] Install `gdsfactory` klayout plugin for the genericpdk layermap
- [ ] Download and install [klayout](https://www.klayout.de/build.html)
- [ ] Install `GDSFactory` klayout plugin to be able to see live updates on your GDS files from the klayout GUI `Tools --> Manage Packages --> Install New Packages --> GDSFactory`

![KLayout klive](https://i.imgur.com/IZWH6U0.png)
![KLayout package](https://i.imgur.com/AkfcCms.png)
![image.png](https://i.imgur.com/CmCe9Vp.png)

## 3. Install gdsfactory
## 3. Install GDSFactory

- [ ] Install [VSCode](https://code.visualstudio.com/) python editor to open the notebooks.
- [ ] Install gdsfactory using pip in an anaconda prompt opened as `Administrator`.
- [ ] Download and install [VSCode](https://code.visualstudio.com/), a Python editor, to open and work with the notebooks.
- [ ] Install GDSFactory using pip in an anaconda prompt opened as `Administrator`.

```
pip install "gdsfactory gplugins[femwell,gmsh,meow,sax,tidy3d]" --upgrade
```

![anaconda prompt](https://i.imgur.com/eKk2bbs.png)

## 4. Download notebooks
## 4. Download the notebooks

- [ ] [Download notebooks](https://github.com/gdsfactory/gdsfactory-photonics-training/archive/refs/heads/main.zip)
- [ ] Download the training notebooks[here](https://github.com/gdsfactory/gdsfactory-photonics-training/archive/refs/heads/main.zip)
19 changes: 1 addition & 18 deletions notebooks/10_layout_full.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,6 @@
"In gdsfactory **all dimensions** are in **microns**"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e752ef73",
"metadata": {},
"outputs": [],
"source": [
"try:\n",
" import google.colab\n",
"\n",
" is_running_on_colab = True\n",
" !pip install gdsfactory > /dev/null\n",
"\n",
"except ImportError:\n",
" is_running_on_colab = False"
]
},
{
"cell_type": "markdown",
"id": "1",
Expand Down Expand Up @@ -747,7 +730,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
36 changes: 9 additions & 27 deletions notebooks/11_drc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"cells": [
{
"cell_type": "markdown",
"id": "ab00763c",
"id": "0",
"metadata": {},
"source": [
"# Klayout Design Rule Checking (DRC)\n",
"\n",
"Your device can be fabricated correctly when it meets the Design Rule Checks (DRC) from the foundry, you can write DRC rules from gdsfactory and customize the shortcut to run the checks in Klayout.\n",
"To ensure your device can be fabricated correctly, it must meet the Design Rule Checks (DRC) set by the foundry. You can write custom DRC rules directly in GDSFactory and configure shortcuts to run these checks seamlessly within KLayout.\n",
"\n",
"Here are some rules explained in [repo generic DRC technology](https://github.com/klayoutmatthias/si4all) and [video](https://peertube.f-si.org/videos/watch/addc77a0-8ac7-4742-b7fb-7d24360ceb97)\n",
"\n",
Expand All @@ -17,32 +17,14 @@
{
"cell_type": "code",
"execution_count": null,
"id": "aa13716b",
"metadata": {},
"outputs": [],
"source": [
"try:\n",
" import google.colab\n",
"\n",
" is_running_on_colab = True\n",
" !pip install gdsfactory gplugins > /dev/null\n",
"\n",
"except ImportError:\n",
" is_running_on_colab = False"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c8f4e261",
"id": "1",
"metadata": {},
"outputs": [],
"source": [
"import gdsfactory as gf\n",
"from gdsfactory.component import Component\n",
"from gdsfactory.generic_tech import LAYER\n",
"from gdsfactory.typings import Float2, Layer\n",
"\n",
"from gplugins.klayout.drc.write_drc import (\n",
" check_area,\n",
" check_density,\n",
Expand All @@ -57,7 +39,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "0bc05a8a",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -67,7 +49,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "9216ccca",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -94,7 +76,7 @@
},
{
"cell_type": "markdown",
"id": "574c3f8a",
"id": "4",
"metadata": {},
"source": [
"Lets create some DRC errors and check them on klayout."
Expand All @@ -103,7 +85,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8075b50a",
"id": "5",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -186,7 +168,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c641650a",
"id": "6",
"metadata": {},
"outputs": [],
"source": []
Expand All @@ -212,7 +194,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
Loading