Skip to content

Commit 8667bc5

Browse files
committed
Release 0.0.132
1 parent 2d28b39 commit 8667bc5

14 files changed

+145
-17
lines changed

.DS_Store

-6 KB
Binary file not shown.

poetry.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "axiomatic"
33

44
[tool.poetry]
55
name = "axiomatic"
6-
version = "0.0.131"
6+
version = "0.0.132"
77
description = ""
88
readme = "README.md"
99
authors = []

reference.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2756,7 +2756,7 @@ client = Axiomatic(
27562756
)
27572757
client.pic.circuit.get_sax_spectrum(
27582758
netlist=Netlist(),
2759-
wls=[1.1],
2759+
wavelengths=[1.1],
27602760
)
27612761

27622762
```
@@ -2781,7 +2781,7 @@ client.pic.circuit.get_sax_spectrum(
27812781
<dl>
27822782
<dd>
27832783

2784-
**wls:** `typing.Sequence[float]`
2784+
**wavelengths:** `typing.Sequence[float]`
27852785

27862786
</dd>
27872787
</dl>

src/axiomatic/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
GenerateLensCodeResponse,
3232
GetOptimizableParametersResponse,
3333
GetSpectrumResponse,
34+
GetSpectrumResponseSpectrumDbValueItem,
3435
GetSpectrumResponseSpectrumValueItem,
3536
HttpValidationError,
3637
InformalizeStatementResponse,
@@ -136,6 +137,7 @@
136137
"GenerateLensCodeResponse",
137138
"GetOptimizableParametersResponse",
138139
"GetSpectrumResponse",
140+
"GetSpectrumResponseSpectrumDbValueItem",
139141
"GetSpectrumResponseSpectrumValueItem",
140142
"HttpValidationError",
141143
"InformalizeStatementResponse",

src/axiomatic/core/client_wrapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_headers(self) -> typing.Dict[str, str]:
1616
headers: typing.Dict[str, str] = {
1717
"X-Fern-Language": "Python",
1818
"X-Fern-SDK-Name": "axiomatic",
19-
"X-Fern-SDK-Version": "0.0.131",
19+
"X-Fern-SDK-Version": "0.0.132",
2020
}
2121
headers["X-API-Key"] = self.api_key
2222
return headers

src/axiomatic/document/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file was auto-generated by Fern from our API Definition.
22

3-
from . import expression, plot
3+
from . import equation, expression, plot
44

5-
__all__ = [ "expression", "plot"]
5+
__all__ = ["equation", "expression", "plot"]

src/axiomatic/document/client.py

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import typing
44
from ..core.client_wrapper import SyncClientWrapper
55
from .plot.client import PlotClient
6+
from .equation.client import EquationClient
67
from .expression.client import ExpressionClient
78
from .. import core
89
from ..core.request_options import RequestOptions
@@ -17,6 +18,7 @@
1718
from ..types.extract_constants_response import ExtractConstantsResponse
1819
from ..core.client_wrapper import AsyncClientWrapper
1920
from .plot.client import AsyncPlotClient
21+
from .equation.client import AsyncEquationClient
2022
from .expression.client import AsyncExpressionClient
2123

2224
# this is used as the default value for optional parameters
@@ -27,6 +29,7 @@ class DocumentClient:
2729
def __init__(self, *, client_wrapper: SyncClientWrapper):
2830
self._client_wrapper = client_wrapper
2931
self.plot = PlotClient(client_wrapper=self._client_wrapper)
32+
self.equation = EquationClient(client_wrapper=self._client_wrapper)
3033
self.expression = ExpressionClient(client_wrapper=self._client_wrapper)
3134

3235
def text(
@@ -314,6 +317,7 @@ class AsyncDocumentClient:
314317
def __init__(self, *, client_wrapper: AsyncClientWrapper):
315318
self._client_wrapper = client_wrapper
316319
self.plot = AsyncPlotClient(client_wrapper=self._client_wrapper)
320+
self.equation = AsyncEquationClient(client_wrapper=self._client_wrapper)
317321
self.expression = AsyncExpressionClient(client_wrapper=self._client_wrapper)
318322

319323
async def text(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
from ...core.client_wrapper import SyncClientWrapper
4+
import typing
5+
from ...core.request_options import RequestOptions
6+
from ...core.pydantic_utilities import parse_obj_as
7+
from json.decoder import JSONDecodeError
8+
from ...core.api_error import ApiError
9+
from ...core.client_wrapper import AsyncClientWrapper
10+
11+
12+
class EquationClient:
13+
def __init__(self, *, client_wrapper: SyncClientWrapper):
14+
self._client_wrapper = client_wrapper
15+
16+
def user_variables(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Dict[str, str]:
17+
"""
18+
Get all variables from the DB so the user can choose which variables they want to use in axtract for for their consistency checks.
19+
20+
Parameters
21+
----------
22+
request_options : typing.Optional[RequestOptions]
23+
Request-specific configuration.
24+
25+
Returns
26+
-------
27+
typing.Dict[str, str]
28+
Successful Response
29+
30+
Examples
31+
--------
32+
from axiomatic import Axiomatic
33+
34+
client = Axiomatic(
35+
api_key="YOUR_API_KEY",
36+
)
37+
client.document.equation.user_variables()
38+
"""
39+
_response = self._client_wrapper.httpx_client.request(
40+
"document/expression/user-variables",
41+
method="GET",
42+
request_options=request_options,
43+
)
44+
try:
45+
if 200 <= _response.status_code < 300:
46+
return typing.cast(
47+
typing.Dict[str, str],
48+
parse_obj_as(
49+
type_=typing.Dict[str, str], # type: ignore
50+
object_=_response.json(),
51+
),
52+
)
53+
_response_json = _response.json()
54+
except JSONDecodeError:
55+
raise ApiError(status_code=_response.status_code, body=_response.text)
56+
raise ApiError(status_code=_response.status_code, body=_response_json)
57+
58+
59+
class AsyncEquationClient:
60+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
61+
self._client_wrapper = client_wrapper
62+
63+
async def user_variables(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Dict[str, str]:
64+
"""
65+
Get all variables from the DB so the user can choose which variables they want to use in axtract for for their consistency checks.
66+
67+
Parameters
68+
----------
69+
request_options : typing.Optional[RequestOptions]
70+
Request-specific configuration.
71+
72+
Returns
73+
-------
74+
typing.Dict[str, str]
75+
Successful Response
76+
77+
Examples
78+
--------
79+
import asyncio
80+
81+
from axiomatic import AsyncAxiomatic
82+
83+
client = AsyncAxiomatic(
84+
api_key="YOUR_API_KEY",
85+
)
86+
87+
88+
async def main() -> None:
89+
await client.document.equation.user_variables()
90+
91+
92+
asyncio.run(main())
93+
"""
94+
_response = await self._client_wrapper.httpx_client.request(
95+
"document/expression/user-variables",
96+
method="GET",
97+
request_options=request_options,
98+
)
99+
try:
100+
if 200 <= _response.status_code < 300:
101+
return typing.cast(
102+
typing.Dict[str, str],
103+
parse_obj_as(
104+
type_=typing.Dict[str, str], # type: ignore
105+
object_=_response.json(),
106+
),
107+
)
108+
_response_json = _response.json()
109+
except JSONDecodeError:
110+
raise ApiError(status_code=_response.status_code, body=_response.text)
111+
raise ApiError(status_code=_response.status_code, body=_response_json)

src/axiomatic/pic/circuit/client.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ def get_sax_spectrum(
853853
self,
854854
*,
855855
netlist: Netlist,
856-
wls: typing.Sequence[float],
856+
wavelengths: typing.Sequence[float],
857857
port_pairs: typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[typing.Any]]]] = OMIT,
858858
settings: typing.Optional[Settings] = OMIT,
859859
request_options: typing.Optional[RequestOptions] = None,
@@ -865,7 +865,7 @@ def get_sax_spectrum(
865865
----------
866866
netlist : Netlist
867867
868-
wls : typing.Sequence[float]
868+
wavelengths : typing.Sequence[float]
869869
870870
port_pairs : typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[typing.Any]]]]
871871
@@ -888,7 +888,7 @@ def get_sax_spectrum(
888888
)
889889
client.pic.circuit.get_sax_spectrum(
890890
netlist=Netlist(),
891-
wls=[1.1],
891+
wavelengths=[1.1],
892892
)
893893
"""
894894
_response = self._client_wrapper.httpx_client.request(
@@ -898,7 +898,7 @@ def get_sax_spectrum(
898898
"netlist": convert_and_respect_annotation_metadata(
899899
object_=netlist, annotation=Netlist, direction="write"
900900
),
901-
"wls": wls,
901+
"wavelengths": wavelengths,
902902
"port_pairs": port_pairs,
903903
"settings": convert_and_respect_annotation_metadata(
904904
object_=settings, annotation=Settings, direction="write"
@@ -1977,7 +1977,7 @@ async def get_sax_spectrum(
19771977
self,
19781978
*,
19791979
netlist: Netlist,
1980-
wls: typing.Sequence[float],
1980+
wavelengths: typing.Sequence[float],
19811981
port_pairs: typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[typing.Any]]]] = OMIT,
19821982
settings: typing.Optional[Settings] = OMIT,
19831983
request_options: typing.Optional[RequestOptions] = None,
@@ -1989,7 +1989,7 @@ async def get_sax_spectrum(
19891989
----------
19901990
netlist : Netlist
19911991
1992-
wls : typing.Sequence[float]
1992+
wavelengths : typing.Sequence[float]
19931993
19941994
port_pairs : typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[typing.Any]]]]
19951995
@@ -2017,7 +2017,7 @@ async def get_sax_spectrum(
20172017
async def main() -> None:
20182018
await client.pic.circuit.get_sax_spectrum(
20192019
netlist=Netlist(),
2020-
wls=[1.1],
2020+
wavelengths=[1.1],
20212021
)
20222022
20232023
@@ -2030,7 +2030,7 @@ async def main() -> None:
20302030
"netlist": convert_and_respect_annotation_metadata(
20312031
object_=netlist, annotation=Netlist, direction="write"
20322032
),
2033-
"wls": wls,
2033+
"wavelengths": wavelengths,
20342034
"port_pairs": port_pairs,
20352035
"settings": convert_and_respect_annotation_metadata(
20362036
object_=settings, annotation=Settings, direction="write"

src/axiomatic/types/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from .generate_lens_code_response import GenerateLensCodeResponse
3131
from .get_optimizable_parameters_response import GetOptimizableParametersResponse
3232
from .get_spectrum_response import GetSpectrumResponse
33+
from .get_spectrum_response_spectrum_db_value_item import GetSpectrumResponseSpectrumDbValueItem
3334
from .get_spectrum_response_spectrum_value_item import GetSpectrumResponseSpectrumValueItem
3435
from .http_validation_error import HttpValidationError
3536
from .informalize_statement_response import InformalizeStatementResponse
@@ -126,6 +127,7 @@
126127
"GenerateLensCodeResponse",
127128
"GetOptimizableParametersResponse",
128129
"GetSpectrumResponse",
130+
"GetSpectrumResponseSpectrumDbValueItem",
129131
"GetSpectrumResponseSpectrumValueItem",
130132
"HttpValidationError",
131133
"InformalizeStatementResponse",

src/axiomatic/types/get_spectrum_response.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
from ..core.pydantic_utilities import UniversalBaseModel
44
import typing
55
from .get_spectrum_response_spectrum_value_item import GetSpectrumResponseSpectrumValueItem
6+
from .get_spectrum_response_spectrum_db_value_item import GetSpectrumResponseSpectrumDbValueItem
67
from ..core.pydantic_utilities import IS_PYDANTIC_V2
78
import pydantic
89

910

1011
class GetSpectrumResponse(UniversalBaseModel):
1112
spectrum: typing.Dict[str, typing.List[GetSpectrumResponseSpectrumValueItem]]
13+
spectrum_db: typing.Dict[str, typing.List[GetSpectrumResponseSpectrumDbValueItem]]
1214

1315
if IS_PYDANTIC_V2:
1416
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
GetSpectrumResponseSpectrumDbValueItem = typing.Union[typing.List[float], float]

0 commit comments

Comments
 (0)