diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index dc65534..8c65d4f 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: | @@ -98,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 @@ -107,15 +96,13 @@ jobs: - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. os: - ubuntu-latest - arch: - - x64 + - macOS-latest python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v2 - 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: @@ -134,11 +121,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. diff --git a/python/omjlcomps/test/test_julia_explicit_comp.py b/python/omjlcomps/test/test_julia_explicit_comp.py index 0c9f1a8..14db43f 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 = 20_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() 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)