Skip to content

Commit a4b2171

Browse files
committed
greptile round 1
1 parent 87f2738 commit a4b2171

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

docs/index.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ Get Started
7575
pip install pipx
7676
pipx run tidy3d configure --apikey=XXX
7777
78-
If you're running into trouble, you may need to manually set the API key directly in the configuration file where Tidy3D looks for it.
79-
You need to place the ``$HOME/.tidy3d/config`` file in your home directory such as ``C:\Users\username\`` (where ``username`` is your username).
80-
81-
The ``tidy3d configure`` command stores the API key for you. If you prefer
82-
to manage the file yourself, see :doc:`configuration/index` for the current
83-
location and format on each platform.
78+
If you're running into trouble, you may need to manually set the API key
79+
directly in the configuration file where Tidy3D looks for it. The ``tidy3d
80+
configure`` command stores the API key for you. If you prefer to manage the
81+
file yourself, place ``config.toml`` in the directory described in
82+
:doc:`configuration/index` (for example ``~/.config/tidy3d`` on macOS/Linux
83+
or ``%APPDATA%\\tidy3d`` on Windows).
8484

8585
.. group-tab:: In the Cloud |:cloud:|
8686

@@ -251,4 +251,3 @@ Contents
251251
changelog
252252
About our Solver <https://www.flexcompute.com/tidy3d/solver/>
253253

254-

tests/config/test_plugins.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import annotations
22

3-
import toml
43
from pydantic import Field
54

65
from tidy3d.config.__init__ import get_manager, reload_config
@@ -37,7 +36,6 @@ def test_plugin_updates_persist(mock_config_dir):
3736
manager.save()
3837
config_path = manager.config_dir / "config.toml"
3938
assert config_path.exists()
40-
contents = toml.load(config_path)
4139

4240
reload_config(profile=manager.profile)
4341
new_manager = get_manager()

tidy3d/components/geometry/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2549,7 +2549,7 @@ def _derivative_face(
25492549
@staticmethod
25502550
def _arr_at_face(arr: xr.DataArray, interp_point: float, dim_normal: str) -> xr.DataArray:
25512551
"""Interpolate the array at the given coordinate unless it only has a single value in the normal
2552-
dimnsion already in which case just return the array itself."""
2552+
dimension already in which case just return the array itself."""
25532553
arr_at_face = (
25542554
arr
25552555
if (len(arr.coords[dim_normal]) == 1)

tidy3d/packaging.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,9 @@ def _fn(*args, **kwargs):
252252
global _CONFIG_LOCAL_SUBPIXEL
253253
use_local_subpixel = _CONFIG_LOCAL_SUBPIXEL
254254
_CONFIG_LOCAL_SUBPIXEL = False
255-
result = fn(*args, **kwargs)
256-
_CONFIG_LOCAL_SUBPIXEL = use_local_subpixel
257-
return result
255+
try:
256+
return fn(*args, **kwargs)
257+
finally:
258+
_CONFIG_LOCAL_SUBPIXEL = use_local_subpixel
258259

259260
return _fn

0 commit comments

Comments
 (0)