Skip to content

Commit b59ebd3

Browse files
authored
Merge pull request #767 from jkirk5/pyproject
Replace setup.py with pyproject.toml
2 parents d1c97ca + 71492b9 commit b59ebd3

3 files changed

Lines changed: 78 additions & 97 deletions

File tree

aviary/examples/test/test_all_examples.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,35 @@
1010
from pathlib import Path
1111

1212
from openmdao.utils.testing_utils import use_tempdirs
13+
from openmdao.utils.general_utils import set_pyoptsparse_opt
1314
from parameterized import parameterized
1415

1516
# TODO: Address any issue that requires a skip.
1617
SKIP_EXAMPLES = {
1718
'run_multimission_example_large_single_aisle.py': 'Broken due to OpenMDAO changes',
1819
}
1920

21+
# TODO: temporary fix, waiting on https://github.com/OpenMDAO/OpenMDAO/issues/3510
22+
OPT, OPTIMIZER = set_pyoptsparse_opt('SNOPT')
23+
if OPT is None:
24+
reason = 'pyoptsparse is not installed. This example requires pyoptsparse to run.'
25+
SKIP_EXAMPLES.update(
26+
{
27+
'run_2dof_reserve_mission_fixedrange.py': reason,
28+
'run_2dof_reserve_mission_fixedtime.py': reason,
29+
'run_2dof_reserve_mission_multiphase.py': reason,
30+
}
31+
)
32+
elif OPTIMIZER != 'SNOPT':
33+
reason = 'pyoptsparse is not providing SNOPT. This example requires SNOPT to run.'
34+
SKIP_EXAMPLES.update(
35+
{
36+
'run_2dof_reserve_mission_fixedrange.py': reason,
37+
'run_2dof_reserve_mission_fixedtime.py': reason,
38+
'run_2dof_reserve_mission_multiphase.py': reason,
39+
}
40+
)
41+
2042

2143
def find_examples():
2244
"""

pyproject.toml

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,60 @@
11
[build-system]
2-
build-backend = "setuptools.build_meta"
3-
requires = ["numpy<2", "setuptools"]
2+
requires = ["hatchling", "numpy>=2.0"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "aviary"
7+
dynamic = ["version"]
8+
readme = "README.md"
9+
license = "Apache-2.0"
10+
dependencies = [
11+
"dymos>=1.8.1",
12+
"hvplot",
13+
"importlib_resources",
14+
"matplotlib",
15+
"numpy<2",
16+
"openmdao>=3.36.0",
17+
"pandas",
18+
"panel>=1.0.0",
19+
"parameterized",
20+
"simupy",
21+
]
22+
23+
[project.optional-dependencies]
24+
all = [
25+
"ambiance",
26+
"itables",
27+
"myst-nb",
28+
"openaerostruct",
29+
"pre-commit",
30+
"sphinx_book_theme==1.1.0",
31+
"testflo",
32+
]
33+
examples = [
34+
"ambiance",
35+
"itables",
36+
"openaerostruct",
37+
]
38+
test = [
39+
"myst-nb",
40+
"pre-commit",
41+
"sphinx_book_theme==1.1.0",
42+
"testflo",
43+
]
44+
45+
[project.scripts]
46+
aviary = "aviary.interface.cmd_entry_points:aviary_cmd"
47+
48+
[project.entry-points.openmdao_report]
49+
aviary_reports = "aviary.interface.reports:register_custom_reports"
50+
51+
[tool.hatch.version]
52+
path = "aviary/__init__.py"
53+
54+
[tool.hatch.build.targets.sdist]
55+
include = [
56+
"/aviary",
57+
]
458

559
[tool.ruff]
660
line-length = 100

setup.py

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)