Skip to content

Commit

Permalink
update ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
joamatab committed Nov 27, 2024
1 parent 59cae60 commit b5e314f
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.4"
rev: "v0.8.0"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion gplugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ class Paths:

PATH = Paths()

__all__ = ["plot", "get_effective_indices", "port_symmetries"]
__all__ = ["get_effective_indices", "plot", "port_symmetries"]
10 changes: 5 additions & 5 deletions gplugins/devsim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
logger.info(f"DEVSIM {tcad.__version__!r} installed at {tcad.__path__!r}")

__all__ = [
"dn_carriers",
"dalpha_carriers",
"alpha_to_k",
"k_to_alpha",
"PINWaveguide",
"DDComponent",
"PINWaveguide",
"alpha_to_k",
"clear_devsim_cache",
"dalpha_carriers",
"dn_carriers",
"k_to_alpha",
]
__version__ = "0.0.1"
2 changes: 1 addition & 1 deletion gplugins/femwell/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

from .mode_solver import compute_component_slice_modes, compute_cross_section_modes

__all__ = ("compute_cross_section_modes", "compute_component_slice_modes")
__all__ = ("compute_component_slice_modes", "compute_cross_section_modes")
16 changes: 8 additions & 8 deletions gplugins/gmeep/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@
"get_meep_adjoint_optimizer",
"get_simulation",
"get_sparameters_data_meep",
"plot",
"port_symmetries",
"run_meep_adjoint_optimizer",
"write_sparameters_grating",
"write_sparameters_grating_batch",
"write_sparameters_grating_mpi",
"write_sparameters_meep",
"write_sparameters_meep_1x1",
"write_sparameters_meep_1x1_bend90",
"write_sparameters_meep_mpi",
"write_sparameters_meep_mpi_1x1",
"write_sparameters_meep_mpi_1x1_bend90",
"write_sparameters_meep_batch",
"write_sparameters_meep_batch_1x1",
"write_sparameters_meep_batch_1x1_bend90",
"write_sparameters_grating",
"write_sparameters_grating_mpi",
"write_sparameters_grating_batch",
"plot",
"port_symmetries",
"write_sparameters_meep_mpi",
"write_sparameters_meep_mpi_1x1",
"write_sparameters_meep_mpi_1x1_bend90",
]
__version__ = "0.0.3"
4 changes: 2 additions & 2 deletions gplugins/gmsh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
from gplugins.gmsh.xy_xsection_mesh import xy_xsection_mesh

__all__ = [
"create_physical_mesh",
"get_layer_overlaps_z",
"get_layers_at_z",
"get_mesh",
"get_u_bounds_layers",
"get_u_bounds_polygons",
"get_uz_bounds_layers",
"get_mesh",
"list_unique_layer_stack_z",
"map_unique_layer_stack_z",
"order_layer_stack",
"uz_xsection_mesh",
"xy_xsection_mesh",
"create_physical_mesh",
]
__version__ = "0.0.2"
2 changes: 1 addition & 1 deletion gplugins/lumerical/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

__all__ = [
"read_sparameters_lumerical",
"run_wavelength_sweep",
"write_sparameters_lumerical",
"write_sparameters_lumerical_components",
"run_wavelength_sweep",
]
12 changes: 6 additions & 6 deletions gplugins/modes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
)

__all__ = [
"find_modes_waveguide",
"find_modes_coupler",
"find_neff_vs_width",
"find_mode_dispersion",
"coupler",
"find_coupling_vs_gap",
"find_mode_dispersion",
"find_modes_coupler",
"find_modes_waveguide",
"find_neff_ng_dw_dh",
"find_neff_vs_width",
"plot_coupling_vs_gap",
"plot_neff_ng_dw_dh",
"plot_neff_vs_width",
"plot_coupling_vs_gap",
"coupler",
"waveguide",
]
__version__ = "0.0.2"
2 changes: 1 addition & 1 deletion gplugins/sax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from gplugins.sax import models, read
from gplugins.sax.plot_model import plot_model

__all__ = ["read", "plot_model", "models"]
__all__ = ["models", "plot_model", "read"]
6 changes: 3 additions & 3 deletions gplugins/tidy3d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

__all__ = [
"Tidy3DComponent",
"get_simulation_grating_coupler",
"material_name_to_medium",
"modes",
"materials",
"get_simulation_grating_coupler",
"modes",
"plot_simulation",
"write_sparameters",
"write_sparameters_batch",
"write_sparameters_grating_coupler",
"write_sparameters_grating_coupler_batch",
"plot_simulation",
]
56 changes: 34 additions & 22 deletions notebooks/tcad_02_analytical_process.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"from gplugins.process.implant_tables import *"
"from gplugins.process.diffusion import D, silicon_diffused_gaussian_profile\n",
"from gplugins.process.implant_tables import (\n",
" depth_in_silicon,\n",
" silicon_gaussian_profile,\n",
" silicon_skewed_gaussian_profile,\n",
" skew_in_silicon,\n",
" straggle_in_silicon,\n",
")"
]
},
{
Expand Down Expand Up @@ -87,7 +94,6 @@
"energies = [20, 40, 60, 80, 100, 120, 140, 160]\n",
"z = np.linspace(0, 0.25, 1000)\n",
"\n",
"import matplotlib.pyplot as plt\n",
"\n",
"lower_lim = 0\n",
"for E in energies:\n",
Expand Down Expand Up @@ -146,7 +152,6 @@
"energies = [20, 40, 60, 80, 100, 120, 140, 160]\n",
"z = np.linspace(0, 0.25, 1000)\n",
"\n",
"import matplotlib.pyplot as plt\n",
"\n",
"lower_lim = 0\n",
"for E in energies:\n",
Expand Down Expand Up @@ -187,16 +192,6 @@
"id": "12",
"metadata": {},
"outputs": [],
"source": [
"from gplugins.process.diffusion import *"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "13",
"metadata": {},
"outputs": [],
"source": [
"Ts = np.linspace(800, 1100, 100)\n",
"\n",
Expand All @@ -211,7 +206,7 @@
},
{
"cell_type": "markdown",
"id": "14",
"id": "13",
"metadata": {},
"source": [
"In this low-doping regime, the diffusivity can be taken as constant, and there exist an analytical solution for initially Gaussian doping profiles:"
Expand All @@ -220,7 +215,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "15",
"id": "14",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -249,15 +244,15 @@
},
{
"cell_type": "markdown",
"id": "16",
"id": "15",
"metadata": {},
"source": [
"This can be extended to many dimensions."
]
},
{
"cell_type": "markdown",
"id": "17",
"id": "16",
"metadata": {},
"source": [
"### Concentration-dependent diffusion\n",
Expand All @@ -268,7 +263,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "18",
"id": "17",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -287,7 +282,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "19",
"id": "18",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -303,7 +298,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "20",
"id": "19",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -319,7 +314,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "21",
"id": "20",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -334,7 +329,7 @@
},
{
"cell_type": "markdown",
"id": "22",
"id": "21",
"metadata": {},
"source": [
"The most generic solution considers the local forms of these concentration-dependent diffusivities for the diffusion equation of each dopant, as well as the electrostatic potential, in a finite-element scheme."
Expand All @@ -346,6 +341,23 @@
"cell_metadata_filter": "-all",
"main_language": "python",
"notebook_metadata_filter": "-all"
},
"kernelspec": {
"display_name": "base",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
}
},
"nbformat": 4,
Expand Down
3 changes: 3 additions & 0 deletions notebooks/tcad_03_numerical_implantation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@
"cell_metadata_filter": "-all",
"main_language": "python",
"notebook_metadata_filter": "-all"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
Expand Down

0 comments on commit b5e314f

Please sign in to comment.