Skip to content

Commit

Permalink
separated requirements, now plotly not installed by default but must …
Browse files Browse the repository at this point in the history
…be specified in pip
  • Loading branch information
tylerflex committed Apr 19, 2022
1 parent 5bfcf91 commit e82d7ba
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 22 deletions.
20 changes: 1 addition & 19 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
# required for running tidy3d (note xarray)
xarray
scipy
h5py>=3.0.0
rich
nlopt
matplotlib
shapely==1.7.1
descartes
pydantic>=1.9.0
PyYAML
boto3
requests
plotly==5.5.0
dash
jupyter_dash

# required to get xarray to not complain
dask
-r requirements/common.txt
15 changes: 15 additions & 0 deletions requirements/common.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# just core (no plotly, no tests)

xarray
scipy
h5py>=3.0.0
rich
nlopt
matplotlib
shapely==1.7.1
descartes
pydantic>=1.9.0
PyYAML
boto3
requests
dask
5 changes: 5 additions & 0 deletions tests/requirements.txt → requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# core, plotly and tests

-r common.txt
-r plotly.txt

# required for development
click==8.0.3
black==22.1.0
Expand Down
6 changes: 6 additions & 0 deletions requirements/plotly.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# core + plotly plotting, no tests
-r common.txt

plotly==5.5.0
dash
jupyter_dash
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

with open("requirements.txt") as f:
with open("requirements/common.txt") as f:
required = f.read().splitlines()

with open("requirements/plotly.txt") as f:
plotly_required = f.read().splitlines()
plotly_required = [req for req in plotly_required if "-r" not in req]

setuptools.setup(
name=PIP_NAME,
version=version["__version__"],
Expand All @@ -41,4 +45,5 @@
packages=setuptools.find_packages(),
python_requires=">=3.6",
install_requires=required,
extras_require={"plotly": plotly_required},
)
2 changes: 0 additions & 2 deletions tidy3d/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@
from .mode.mode_solver import ModeSolver, ModeSolverData
from .near2far.near2far import Near2Far, Near2FarSurface
from .smatrix.smatrix import ComponentModeler, Port
from .webplots.app import SimulationDataApp
from .webplots.simulation import SimulationPlotly
3 changes: 3 additions & 0 deletions tidy3d/plugins/webplots/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Import post run visualization app and Simulation plotting through plotly."""
from .app import SimulationDataApp
from .simulation import SimulationPlotly

0 comments on commit e82d7ba

Please sign in to comment.