From 45c13b8699edaf1d9c00ce71d36cca69f8eed11a Mon Sep 17 00:00:00 2001 From: Daniel Ingraham Date: Fri, 9 May 2025 11:02:53 -0400 Subject: [PATCH 1/7] Remove old setup.py.goaway --- python/setup.py.goaway | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 python/setup.py.goaway diff --git a/python/setup.py.goaway b/python/setup.py.goaway deleted file mode 100644 index 2a229ad..0000000 --- a/python/setup.py.goaway +++ /dev/null @@ -1,27 +0,0 @@ -from setuptools import setup - -from pathlib import Path -from io import open - -with open(Path(__file__).parent / "README.md", encoding="utf-8") as f: - long_description = f.read() - -setup_args = { - 'description': 'Create OpenMDAO Components using the Julia programming language', - 'long_description': long_description, - 'long_description_content_type': 'text/markdown', - 'entry_points': { - 'openmdao_component': [ - 'juliaexplicitcomp=omjlcomps:JuliaExplicitComp', - 'juliaimplicitcomp=omjlcomps:JuliaImplicitComp' - ] - }, - 'install_requires': ['openmdao~=3.26', 'juliapkg~=0.1.10', 'juliacall~=0.9.13'], - 'keywords': ['openmdao_component'], - 'license': 'MIT', - 'name': 'omjlcomps', - 'packages': ['omjlcomps', 'omjlcomps.test'], - 'version': '0.2.4', - 'include_package_data': True} - -setup(**setup_args) From dbde78117b528aad7d997084e38ec609aab02a33 Mon Sep 17 00:00:00 2001 From: Daniel Ingraham Date: Fri, 9 May 2025 11:05:04 -0400 Subject: [PATCH 2/7] Install omjlcomps test dependencies when testing --- .github/workflows/CI.yaml | 3 +-- docs/src/dev_docs.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index dc65534..9e1b2ad 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -134,11 +134,10 @@ jobs: cp $PWD/python/omjlcomps/test/juliapkg-test.json $PWD/python/omjlcomps/juliapkg.json python -m pip install --upgrade pip pip install juliapkg - pip install aviary - name: omjlcomps install run: | echo "PWD = $PWD" - pip install --config-settings editable_mode=compat -e ./python + pip install --config-settings editable_mode=compat -e ./python[test] python -c "import juliapkg; juliapkg.resolve()" env: JULIA_PKG_USE_CLI_GIT: 'true' diff --git a/docs/src/dev_docs.md b/docs/src/dev_docs.md index 1507325..aa7cacc 100644 --- a/docs/src/dev_docs.md +++ b/docs/src/dev_docs.md @@ -45,7 +45,7 @@ $ ``` For `omjlcomps`, registration is done by manually running the "Register to PyPI" workflow from the GitHub Actions tab (basically copied from [PythonCall.jl](https://github.com/cjdoris/PythonCall.jl)). -Be sure to adjust the version in the `python/setup.py` file before registering a new version. +Be sure to adjust the version in the `python/pyproject.toml` file before registering a new version. After clicking on the Actions tab on https://github.com/byuflowlab/OpenMDAO.jl, you'll see "Register to PyPI" listed under "All workflows" on the left-hand side. Click on that, then click on the "Run workflow" dropdown button on the right-hand side of the screen. Run it from the master branch, then wait for the workflow to finish. From ec6a7e62ea7001a37b6fde0a1ab2bef228208f60 Mon Sep 17 00:00:00 2001 From: Daniel Ingraham Date: Fri, 9 May 2025 11:16:32 -0400 Subject: [PATCH 3/7] Tests on MacOS? --- .github/workflows/CI.yaml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 9e1b2ad..38d3cf6 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -19,6 +19,7 @@ jobs: - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. os: - ubuntu-latest + - macOS-latest arch: - x64 steps: @@ -53,6 +54,7 @@ jobs: - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. os: - ubuntu-latest + - macOS-latest arch: - x64 steps: @@ -68,19 +70,6 @@ jobs: Pkg.Registry.add(RegistrySpec(url="https://github.com/JuliaRegistries/General")) env: JULIA_PKG_USE_CLI_GIT: 'true' - # - name: Use MicroMamba not Pixie with CondaPkg.jl - # shell: julia --project=. --color=yes {0} - # run: | - # using Pkg - # Pkg.add("PreferenceTools") - # using PreferenceTools - # PreferenceTools.add("CondaPkg", backend="MicroMamba") - # Pkg.activate("./julia/OpenMDAO.jl") - # PreferenceTools.add("CondaPkg", backend="MicroMamba") - # Pkg.activate("./julia/OpenMDAO.jl/test") - # PreferenceTools.add("CondaPkg", backend="MicroMamba") - # env: - # JULIA_PKG_USE_CLI_GIT: 'true' - name: OpenMDAO.jl Tests shell: julia --color=yes {0} run: | @@ -107,6 +96,7 @@ jobs: - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. os: - ubuntu-latest + - macOS-latest arch: - x64 python-version: ["3.10", "3.11", "3.12", "3.13"] From 2f52703143e573bfaad0268ba311ff564cb5c7dc Mon Sep 17 00:00:00 2001 From: Daniel Ingraham Date: Fri, 9 May 2025 11:32:31 -0400 Subject: [PATCH 4/7] Remove x64 from python CI.yaml --- .github/workflows/CI.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 38d3cf6..74b76ec 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -97,8 +97,6 @@ jobs: os: - ubuntu-latest - macOS-latest - arch: - - x64 python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v2 From 40e51f0ecdc45dc96c74e9a9d6af83e8329f9e80 Mon Sep 17 00:00:00 2001 From: Daniel Ingraham Date: Fri, 9 May 2025 11:35:40 -0400 Subject: [PATCH 5/7] Remove arch references from Python CI.yaml --- .github/workflows/CI.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 74b76ec..8c65d4f 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -87,7 +87,7 @@ jobs: JULIA_PKG_USE_CLI_GIT: 'true' omjlcomps: - name: Python ${{ matrix.python-version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + name: Python ${{ matrix.python-version }} - ${{ matrix.os }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: true @@ -103,7 +103,6 @@ jobs: - uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.julia-version }} - arch: ${{ matrix.arch }} - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: From a9a7a6e32ede6dab3207afbc12c3ff60a710a703 Mon Sep 17 00:00:00 2001 From: Daniel Ingraham Date: Fri, 9 May 2025 12:01:48 -0400 Subject: [PATCH 6/7] Scale back GH Actions "big option" size for MacOS --- python/omjlcomps/test/test_julia_explicit_comp.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/omjlcomps/test/test_julia_explicit_comp.py b/python/omjlcomps/test/test_julia_explicit_comp.py index 0c9f1a8..e5d69c0 100644 --- a/python/omjlcomps/test/test_julia_explicit_comp.py +++ b/python/omjlcomps/test/test_julia_explicit_comp.py @@ -3,6 +3,7 @@ """ import juliacall; jl = juliacall.newmodule("OpenMDAOJuliaExplicitCompTest") import os +import sys import time import unittest @@ -244,7 +245,10 @@ def setUp(self): if os.getenv("GITHUB_ACTIONS") == "true": # n_big = 1_000_000_000 is too big for GitHub Actions---it appears to consume all the virtual machine's memory and kills the job, giving me a big sad. - n_big = self.n_big = 100_000_000 + if sys.platform == "darwin": + n_big = self.n_big = 50_000_000 + else: + n_big = self.n_big = 100_000_000 else: n_big = self.n_big = 500_000_000 p_big = self.p_big = om.Problem() From 8863de9a490b11884c0868e6c21b11f64bec32c7 Mon Sep 17 00:00:00 2001 From: Daniel Ingraham Date: Fri, 9 May 2025 12:11:26 -0400 Subject: [PATCH 7/7] Still getting MacOS errors (segfaults?!) --- python/omjlcomps/test/test_julia_explicit_comp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/omjlcomps/test/test_julia_explicit_comp.py b/python/omjlcomps/test/test_julia_explicit_comp.py index e5d69c0..14db43f 100644 --- a/python/omjlcomps/test/test_julia_explicit_comp.py +++ b/python/omjlcomps/test/test_julia_explicit_comp.py @@ -246,7 +246,7 @@ def setUp(self): if os.getenv("GITHUB_ACTIONS") == "true": # n_big = 1_000_000_000 is too big for GitHub Actions---it appears to consume all the virtual machine's memory and kills the job, giving me a big sad. if sys.platform == "darwin": - n_big = self.n_big = 50_000_000 + n_big = self.n_big = 20_000_000 else: n_big = self.n_big = 100_000_000 else: