[build-system]
requires = ["hatchling", "numpy>=2.0"]
build-backend = "hatchling.build"

[project]
name = "openmdao"
dynamic = ["version"]
description = "OpenMDAO framework infrastructure"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.10"
authors = [
    { name = "OpenMDAO Team", email = "openmdao@openmdao.org" },
]
keywords = [
    "analysis",
    "multi-disciplinary",
    "multidisciplinary",
    "optimization",
]
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: Apache Software License",
    "Natural Language :: English",
    "Operating System :: MacOS :: MacOS X",
    "Operating System :: Microsoft :: Windows",
    "Operating System :: POSIX :: Linux",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: Implementation :: CPython",
    "Topic :: Scientific/Engineering",
]
dependencies = [
    "networkx>=3.3",
    "numpy>=2.0,!=2.4.0",
    "packaging",
    "requests",
    "scipy>=1.13",
]

[project.optional-dependencies]
all = [
    "openmdao[docs,doe,jax,notebooks,visualization,test]",
]
docs = [
    "ipyparallel",
    "jupyter-book>=1.0.3,<2",
    "matplotlib",
    "numpydoc>=1.1",
    "sphinx-sitemap",
    "idna>=3.7",
    "jinja2>=3.1.4",
    "tqdm>=4.66.3"
]
doe = [
    "pyDOE3",
]
jax = [
    "jax>=0.4.0",
    "jaxlib>=0.4.0",
]
julia = [
    "omjlcomps>=0.2.6",
]
numba = [
    "numba",
]
notebooks = [
    "ipympl",
    "notebook",
    "idna>=3.7",
]
test = [
    "pre-commit",
    "aiounittest",
    "num2words",
    "numpydoc>=1.1",
    "parameterized",
    "playwright>=1.20",
    "pycodestyle>=2.4.0",
    "pydocstyle>=2.0.0",
    "testflo>=1.3.6",
    "websockets>8",
    "coverage>=7.6.0"
]
visualization = [
    "panel",
    "bokeh>=3.4.0",
    "colorama",
    "matplotlib",
    "rich"
]

[project.scripts]
openmdao = "openmdao.utils.om:openmdao_cmd"
reset_notebook = "openmdao.devtools.docutils:reset_notebook_cmd"
run_om_test = "openmdao.devtools.run_test:run_test"
webview = "openmdao.utils.webview:webview_argv"
wingproj = "openmdao.devtools.wingproj:run_wing"

[project.entry-points.openmdao_case_reader]
sqlitereader = "openmdao.recorders.sqlite_reader:SqliteCaseReader"

[project.entry-points.openmdao_case_recorder]
sqliterecorder = "openmdao.recorders.sqlite_recorder:SqliteRecorder"

[project.entry-points.openmdao_component]
addsubtractcomp = "openmdao.components.add_subtract_comp:AddSubtractComp"
balancecomp = "openmdao.components.balance_comp:BalanceComp"
crossproductcomp = "openmdao.components.cross_product_comp:CrossProductComp"
dotproductcomp = "openmdao.components.dot_product_comp:DotProductComp"
eqconstraintcomp = "openmdao.components.eq_constraint_comp:EQConstraintComp"
execcomp = "openmdao.components.exec_comp:ExecComp"
explicitfunccomp = "openmdao.components.explicit_func_comp:ExplicitFuncComp"
externalcodecomp = "openmdao.components.external_code_comp:ExternalCodeComp"
externalcodeimplicitcomp = "openmdao.components.external_code_comp:ExternalCodeImplicitComp"
implicitfunccomp = "openmdao.components.implicit_func_comp:ImplicitFuncComp"
indepvarcomp = "openmdao.core.indepvarcomp:IndepVarComp"
inputresidscomp = "openmdao.components.input_resids_comp:InputResidsComp"
kscomp = "openmdao.components.ks_comp:KSComp"
linearsystemcomp = "openmdao.components.linear_system_comp:LinearSystemComp"
matrixvectorproductcomp = "openmdao.components.matrix_vector_product_comp:MatrixVectorProductComp"
metamodelsemistructuredcomp = "openmdao.components.meta_model_semi_structured_comp:MetaModelSemiStructuredComp"
metamodelstructuredcomp = "openmdao.components.meta_model_structured_comp:MetaModelStructuredComp"
metamodelunstructuredcomp = "openmdao.components.meta_model_unstructured_comp:MetaModelUnStructuredComp"
multifimetamodelunstructuredcomp = "openmdao.components.multifi_meta_model_unstructured_comp:MultiFiMetaModelUnStructuredComp"
muxcomp = "openmdao.components.mux_comp:MuxComp"
splinecomp = "openmdao.components.spline_comp:SplineComp"
submodelcomp = "openmdao.components.submodel_comp:SubmodelComp"
vectormagnitudecomp = "openmdao.components.vector_magnitude_comp:VectorMagnitudeComp"
jaxexplicitcomponent = "openmdao.components.jax_explicit_comp:JaxExplicitComponent"
jaximplicitcomponent = "openmdao.components.jax_implicit_comp:JaxImplicitComponent"

[project.entry-points.openmdao_driver]
analysisdriver = "openmdao.drivers.analysis_driver:AnalysisDriver"
differentialevolutiondriver = "openmdao.drivers.differential_evolution_driver:DifferentialEvolutionDriver"
doedriver = "openmdao.drivers.doe_driver:DOEDriver"
driver = "openmdao.core.driver:Driver"
pyoptsparsedriver = "openmdao.drivers.pyoptsparse_driver:pyOptSparseDriver"
scipydriver = "openmdao.drivers.scipy_optimizer:ScipyOptimizeDriver"
simplegadriver = "openmdao.drivers.genetic_algorithm_driver:SimpleGADriver"

[project.entry-points.openmdao_group]
group = "openmdao.core.group:Group"
parallelgroup = "openmdao.core.parallel_group:ParallelGroup"

[project.entry-points.openmdao_lin_solver]
directsolver = "openmdao.solvers.linear.direct:DirectSolver"
linearblockgs = "openmdao.solvers.linear.linear_block_gs:LinearBlockGS"
linearblockjac = "openmdao.solvers.linear.linear_block_jac:LinearBlockJac"
linearrunoncec = "openmdao.solvers.linear.linear_runonce:LinearRunOnce"
petsckrylov = "openmdao.solvers.linear.petsc_ksp:PETScKrylov"
scipykrylov = "openmdao.solvers.linear.scipy_iter_solver:ScipyKrylov"
userdefined = "openmdao.solvers.linear.user_defined:LinearUserDefined"
petscdirectsolver = "openmdao.solvers.linear.petsc_direct_solver:PETScDirectSolver"

[project.entry-points.openmdao_nl_solver]
armijogoldsteinls = "openmdao.solvers.linesearch.backtracking:ArmijoGoldsteinLS"
boundsenforcels = "openmdao.solvers.linesearch.backtracking:BoundsEnforceLS"
broydensolver = "openmdao.solvers.nonlinear.broyden:BroydenSolver"
newtonsolver = "openmdao.solvers.nonlinear.newton:NewtonSolver"
nonlinearblockgs = "openmdao.solvers.nonlinear.nonlinear_block_gs:NonlinearBlockGS"
nonlinearblockjac = "openmdao.solvers.nonlinear.nonlinear_block_jac:NonlinearBlockJac"
nonlinearrunonce = "openmdao.solvers.nonlinear.nonlinear_runonce:NonlinearRunOnce"

[project.entry-points.openmdao_report]
checks = "openmdao.error_checking.check_config:_check_report_register"
connections = "openmdao.visualization.connection_viewer.viewconns:_connections_report_register"
inputs = "openmdao.visualization.inputs_report.inputs_report:_inputs_report_register"
n2 = "openmdao.visualization.n2_viewer.n2_viewer:_n2_report_register"
optimizer = "openmdao.visualization.opt_report.opt_report:_optimizer_report_register"
scaling = "openmdao.visualization.scaling_viewer.scaling_report:_scaling_report_register"
summary = "openmdao.devtools.debug:_summary_report_register"
total_coloring = "openmdao.utils.coloring:_total_coloring_report_register"

[project.entry-points.openmdao_surrogate_model]
krigingsurrogate = "openmdao.surrogate_models.kriging:KrigingSurrogate"
multificokrigingsurrogate = "openmdao.surrogate_models.multifi_cokriging:MultiFiCoKrigingSurrogate"
nearestneighbor = "openmdao.surrogate_models.nearest_neighbor:NearestNeighbor"
responsesurface = "openmdao.surrogate_models.response_surface:ResponseSurface"

[project.urls]
Homepage = "http://openmdao.org"

[tool.hatch.version]
path = "openmdao/__init__.py"

[tool.hatch.build.targets.sdist]
include = [
    "/openmdao",
]

[tool.ruff]
line-length = 100
indent-width = 4

[tool.ruff.lint]
select = [
    "E",  # pycodestyle
    "F",  # pyflakes
    "D",  # pydocstyle
    "D409", # Section underline sould match length of its name.
    "D417", # Missing argument descriptions.
    "D419", # Missing argument descriptions.
]
ignore = [
    'D100',  # Don't require docstring in public module
    'D101',  # Don't require docstring in public module
    'D102',  # Don't require docstring in public method
    'D200',  # One-line docstring should fit on one line
    'D400',  # Sometimes you just don't need a period.
    'E741',  # Allow ambiguous variable names (I)
]
exclude = [
    ".git",
    ".venv",
    "__pycache__",
    "test_*.py",
]

[tool.ruff.format]
indent-style = "space"
line-ending = "lf"

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.lint.per-file-ignores]
# Ignore `F401` (unused import) in api files.
"api.py" = ["F401"]
"parallel_api.py" = ["F401"]
# Allow unused imports and don't require a docstring in __init__.py
"__init__.py" = ["F401", "D104"]
# Ignore files in the tests.
"**/test_suite/**" = ["D", "E", "F"]
"**/tests/*.py" = ["D", "E", "F"]
# Don't worry about devtools
"**/devtools/**" = ["D", "E", "F"]
# Don't worry about docs
"*.ipynb" = ["D", "E", "F"]

