Skip to content

Commit

Permalink
Replaced setup.py with pyproject.toml using hatchling backend (#…
Browse files Browse the repository at this point in the history
…1052)

* migrate setup to hatch

* migrate setup to hatch

* remove old travis-related file

* add PEP517 wheel testing to GitHub workflow

---------

Co-authored-by: swryan <swryan@users.noreply.github.com>
  • Loading branch information
swryan and swryan authored Mar 26, 2024
1 parent b3b2240 commit 19ba7a3
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 94 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/dymos_tests_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
PYOPTSPARSE: 'v2.9.3'
SNOPT: 7.7
OPENMDAO: 'latest'
PEP517: true
OPTIONAL: '[all]'
JAX: '0.4.14'

Expand Down Expand Up @@ -130,11 +131,6 @@ jobs:
if: env.RUN_BUILD
uses: actions/checkout@v3

- name: Fetch tags
if: env.RUN_BUILD
run: |
git fetch --prune --unshallow --tags
- name: Setup conda
if: env.RUN_BUILD
uses: conda-incubator/setup-miniconda@v2
Expand Down Expand Up @@ -258,7 +254,16 @@ jobs:
echo "============================================================="
echo "Install Dymos"
echo "============================================================="
pip install .${{ matrix.OPTIONAL }}
if [[ "${{ matrix.PEP517 }}" == "true" ]]; then
pip wheel --no-deps --use-pep517 .
WHEEL=`find dymos-*.whl`
echo "-----------------------------------------------------------"
echo "Installing from wheel: $WHEEL"
echo "-----------------------------------------------------------"
python -m pip install $WHEEL${{ matrix.OPTIONAL }}
else
python -m pip install .${{ matrix.OPTIONAL }}
fi
- name: Display environment info
if: env.RUN_BUILD
Expand Down
77 changes: 77 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "dymos"
dynamic = ["version"]
description = "Open-Source Optimization of Dynamic Multidisciplinary Systems"
license = "Apache-2.0"
requires-python = ">=3.8"
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 = [
"numpy",
"openmdao>=3.27.0",
"scipy",
]

[project.optional-dependencies]
all = [
"dymos[docs]",
"dymos[notebooks]",
"dymos[test]",
]
docs = [
"bokeh",
"ipython",
"jax",
"jaxlib",
"jupyter",
"jupyter-book==0.14",
"matplotlib",
"nbconvert",
"notebook",
"numpydoc>=1.1",
"redbaron",
"tabulate",
]
notebooks = [
"ipython",
"notebook",
"tabulate",
]
test = [
"aiounittest",
"matplotlib",
"numpydoc>=1.1",
"packaging",
"playwright>=1.20",
"pycodestyle",
"testflo>=1.3.6",
]

[project.entry-points.openmdao_report]
"dymos.linkage" = "dymos.visualization.linkage.report:_linkage_report_register"

[project.urls]
Homepage = "https://github.com/OpenMDAO/dymos"

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

[tool.hatch.build.targets.sdist]
include = [
"/dymos",
]
88 changes: 0 additions & 88 deletions setup.py

This file was deleted.

Binary file removed travis_deploy_rsa.enc
Binary file not shown.

0 comments on commit 19ba7a3

Please sign in to comment.