-
Notifications
You must be signed in to change notification settings - Fork 44
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
add poetry support #624
add poetry support #624
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,64 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=42", | ||
"wheel" | ||
[tool.poetry] | ||
name = "tidy3d" | ||
version = "1.9.0" | ||
description = "" | ||
authors = ["Tyler Hughes <tyler@flexcompute.com>"] | ||
readme = "README.md" | ||
packages = [ | ||
{ include = "tidy3d" }, | ||
{ include = "tidy3d/web" }, | ||
{ include = "tidy3d/plugins" }, | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
|
||
[tool.poetry.dependencies] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like we need more granular control over the dependencies like we have currently.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems poetry doesn't support one group declare other groups as dependencies. We maybe thinking of an other orchestrate. |
||
python = "^3.7.2" | ||
shapely = "^2.0.0" | ||
scipy = [{ python = "~3.7", version = "^1.6.0" }, | ||
{ python = "~3.8", version = "^1.8.0" }, | ||
{ python = "^3.9", version = "^1.9.0" }] | ||
numpy = [{ python = "~3.7", version = "^1.19.0" }, | ||
{ python = "~3.8", version = "^1.20.0" }, | ||
{ python = "^3.9", version = "^1.23.0" }] | ||
matplotlib = [{ python = "~3.7", version = "~3.5" }, | ||
{ python = "^3.8", version = "^3.6" }] | ||
pandas = [{ python = "~3.7", version = "^1.3.0"}, {python = "^3.8", version = "^1.5.0"}] | ||
xarray = "^0.20.2" | ||
pyroots = "^0.5.0" | ||
importlib-metadata = "<5.0.0" | ||
h5netcdf = "^1.1.0" | ||
h5py = "^3.7.0" | ||
rich = "^12.6.0" | ||
pydantic = "^1.10.2" | ||
pyyaml = "^6.0" | ||
dask = "~2022.02.0" | ||
boto3 = "^1.26.31" | ||
requests = "^2.28.1" | ||
pyjwt = "^2.6.0" | ||
toml = "^0.10.2" | ||
click = "^8.1.3" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
black = "^22.12.0" | ||
pylint = "^2.15.8" | ||
pytest = "^7.2.0" | ||
pytest-timeout = "^2.1.0" | ||
gdspy = "^1.6.12" | ||
memory-profiler = "^0.61.0" | ||
dill = "^0.3.6" | ||
tox = "^3.0.0" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
|
||
[tool.black] | ||
line-length = 100 | ||
|
||
|
||
[tool.pytest.ini_options] | ||
filterwarnings = 'ignore::DeprecationWarning' | ||
|
||
[tool.poetry.scripts] | ||
tidy3d = "tidy3d.web.cli:tidy3d_cli" |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os.path | ||
import shutil | ||
|
||
from click.testing import CliRunner | ||
|
||
from tidy3d.web.cli import tidy3d_cli | ||
from tidy3d.web.cli.app import CONFIG_FILE | ||
|
||
|
||
def test_tidy3d_cli(): | ||
|
||
if os.path.exists(CONFIG_FILE): | ||
shutil.move(CONFIG_FILE, f"{CONFIG_FILE}.bak") | ||
|
||
runner = CliRunner() | ||
result = runner.invoke(tidy3d_cli, ["configure"], input="apikey") | ||
|
||
assert result.exit_code == 0 | ||
if os.path.exists(CONFIG_FILE): | ||
os.remove(CONFIG_FILE) | ||
|
||
if os.path.exists(f"{CONFIG_FILE}.bak"): | ||
shutil.move(f"{CONFIG_FILE}.bak", CONFIG_FILE) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
"""Defines the front end version of tidy3d""" | ||
|
||
__version__ = "1.8.2" | ||
__version__ = "1.9.0" | ||
|
||
PIP_NAME = "tidy3d-beta" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
""" | ||
tidy3d command line tool. | ||
""" | ||
from .app import tidy3d_cli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add
3.11
topython-version
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
h5py doesn't have prebuild for 3.11 which leads python to compile it and cause error. I would recommend to wait h5py upload precompile binary to pypi.