emode 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- emode-0.1.0/.gitignore +2 -0
- emode-0.1.0/LICENSE +11 -0
- emode-0.1.0/PKG-INFO +45 -0
- emode-0.1.0/README.md +26 -0
- emode-0.1.0/pyproject.toml +37 -0
- emode-0.1.0/src/emode/__init__.py +42 -0
emode-0.1.0/.gitignore
ADDED
emode-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Copyright (c) EMode, Inc.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
4
|
+
|
|
5
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
6
|
+
|
|
7
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
8
|
+
|
|
9
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
10
|
+
|
|
11
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
emode-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: emode
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python interface for EMode, under its short name
|
|
5
|
+
Project-URL: Homepage, https://emodephotonix.com
|
|
6
|
+
Project-URL: Documentation, https://docs.emodephotonix.com
|
|
7
|
+
Project-URL: Source, https://github.com/emode-photonix/emodeconnection
|
|
8
|
+
Author-email: "EMode, Inc." <hello@emodephotonix.com>
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Requires-Python: >=3.10
|
|
15
|
+
Requires-Dist: emodeconnection>=1.1.25
|
|
16
|
+
Provides-Extra: mcp
|
|
17
|
+
Requires-Dist: emodeconnection[mcp]>=1.1.25; extra == 'mcp'
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# emode
|
|
21
|
+
|
|
22
|
+
Python interface for [EMode](https://emodephotonix.com), a photonics simulation
|
|
23
|
+
platform for waveguide mode solving, propagation and analysis, under its short
|
|
24
|
+
name.
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install emode
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
import emode
|
|
32
|
+
|
|
33
|
+
em = emode.EMode()
|
|
34
|
+
em.shape(name='BOX', material='SiO2', height=800)
|
|
35
|
+
em.shape(name='core', material='Si', width=600, height=400)
|
|
36
|
+
em.FDM()
|
|
37
|
+
em.report()
|
|
38
|
+
em.close()
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This release installs [emodeconnection](https://pypi.org/project/emodeconnection/)
|
|
42
|
+
and re-exports it, so `import emode` and `import emodeconnection` give the same
|
|
43
|
+
client. A later release of EMode moves the client itself into this package.
|
|
44
|
+
`emode-install` and `emode-mcp` come with it. The documentation is at
|
|
45
|
+
[docs.emodephotonix.com](https://docs.emodephotonix.com).
|
emode-0.1.0/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# emode
|
|
2
|
+
|
|
3
|
+
Python interface for [EMode](https://emodephotonix.com), a photonics simulation
|
|
4
|
+
platform for waveguide mode solving, propagation and analysis, under its short
|
|
5
|
+
name.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install emode
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
import emode
|
|
13
|
+
|
|
14
|
+
em = emode.EMode()
|
|
15
|
+
em.shape(name='BOX', material='SiO2', height=800)
|
|
16
|
+
em.shape(name='core', material='Si', width=600, height=400)
|
|
17
|
+
em.FDM()
|
|
18
|
+
em.report()
|
|
19
|
+
em.close()
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
This release installs [emodeconnection](https://pypi.org/project/emodeconnection/)
|
|
23
|
+
and re-exports it, so `import emode` and `import emodeconnection` give the same
|
|
24
|
+
client. A later release of EMode moves the client itself into this package.
|
|
25
|
+
`emode-install` and `emode-mcp` come with it. The documentation is at
|
|
26
|
+
[docs.emodephotonix.com](https://docs.emodephotonix.com).
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "emode"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Python interface for EMode, under its short name"
|
|
5
|
+
readme = { file = "README.md", content-type = "text/markdown" }
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"emodeconnection>=1.1.25",
|
|
9
|
+
]
|
|
10
|
+
authors = [
|
|
11
|
+
{ name = "EMode, Inc.", email = "hello@emodephotonix.com" },
|
|
12
|
+
]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"License :: OSI Approved :: BSD License",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.urls]
|
|
21
|
+
Homepage = "https://emodephotonix.com"
|
|
22
|
+
Documentation = "https://docs.emodephotonix.com"
|
|
23
|
+
Source = "https://github.com/emode-photonix/emodeconnection"
|
|
24
|
+
|
|
25
|
+
[project.optional-dependencies]
|
|
26
|
+
# The MCP server (emode-mcp), as in emodeconnection.
|
|
27
|
+
mcp = ["emodeconnection[mcp]>=1.1.25"]
|
|
28
|
+
|
|
29
|
+
[build-system]
|
|
30
|
+
requires = ["hatchling>=1.11.0"]
|
|
31
|
+
build-backend = "hatchling.build"
|
|
32
|
+
|
|
33
|
+
[tool.hatch.build.targets.wheel]
|
|
34
|
+
packages = ["src/emode"]
|
|
35
|
+
|
|
36
|
+
[tool.hatch.build.targets.sdist]
|
|
37
|
+
include = ["src/emode", "README.md", "LICENSE", "pyproject.toml"]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""EMode's Python client under its short name.
|
|
2
|
+
|
|
3
|
+
``pip install emode`` installs emodeconnection, and this package re-exports
|
|
4
|
+
it, so ``import emode`` works today::
|
|
5
|
+
|
|
6
|
+
import emode
|
|
7
|
+
|
|
8
|
+
em = emode.EMode()
|
|
9
|
+
em.shape(name='core', material='Si', width=600, height=400)
|
|
10
|
+
em.FDM()
|
|
11
|
+
|
|
12
|
+
Every name emodeconnection exports is available here, and ``emode.<module>``
|
|
13
|
+
reaches its modules. A later release of EMode moves the client itself into
|
|
14
|
+
this package.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from __future__ import annotations
|
|
18
|
+
|
|
19
|
+
import importlib
|
|
20
|
+
from importlib.metadata import version as _distribution_version
|
|
21
|
+
|
|
22
|
+
import emodeconnection as _emodeconnection
|
|
23
|
+
from emodeconnection import * # noqa: F401, F403
|
|
24
|
+
from emodeconnection import __all__ # noqa: F401
|
|
25
|
+
|
|
26
|
+
__version__ = _distribution_version('emodeconnection')
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def __getattr__(name: str) -> object:
|
|
30
|
+
"""Forward anything not re-exported above to emodeconnection, modules included."""
|
|
31
|
+
try:
|
|
32
|
+
return getattr(_emodeconnection, name)
|
|
33
|
+
except AttributeError:
|
|
34
|
+
pass
|
|
35
|
+
try:
|
|
36
|
+
return importlib.import_module(f'emodeconnection.{name}')
|
|
37
|
+
except ModuleNotFoundError:
|
|
38
|
+
raise AttributeError(f'module {__name__!r} has no attribute {name!r}') from None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def __dir__() -> list[str]:
|
|
42
|
+
return sorted(set(globals()) | set(dir(_emodeconnection)))
|