diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 30e35c2..078c8f1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,7 +37,7 @@ jobs: python -m pip install --upgrade pip setuptools pip install -r requirements-tests.txt pip install -r requirements-assignment.txt - pip install -e .[arch_sbo,botorch,rocket,egor] + pip install -e .[arch_sbo,rocket] - name: Test with pytest run: pytest -v sb_arch_opt --durations=10 diff --git a/.github/workflows/tests_basic.yml b/.github/workflows/tests_basic.yml index f9671a0..9adeb3c 100644 --- a/.github/workflows/tests_basic.yml +++ b/.github/workflows/tests_basic.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/tests_slow.yml b/.github/workflows/tests_slow.yml index a6528d8..17ef318 100644 --- a/.github/workflows/tests_slow.yml +++ b/.github/workflows/tests_slow.yml @@ -38,8 +38,7 @@ jobs: python -m pip install --upgrade pip setuptools pip install -r requirements-tests.txt pip install -r requirements-assignment.txt - pip install -r requirements-ota.txt - pip install -e .[arch_sbo,botorch,rocket,egor] + pip install -e .[arch_sbo,rocket] pip install jupyter ipython ipykernel ipython kernel install --name "python3" --user df -h diff --git a/.github/workflows/tests_slow_ext.yml b/.github/workflows/tests_slow_ext.yml new file mode 100644 index 0000000..a94699b --- /dev/null +++ b/.github/workflows/tests_slow_ext.yml @@ -0,0 +1,46 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Slow Tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main", "dev" ] + +jobs: + test: + name: Slow Tests (External Dependencies) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + python-version: ["3.12"] + + steps: + - uses: actions/checkout@v6 + - name: Set up python + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + + - name: Python info + run: | + python --version + df -h + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools + pip install -r requirements-tests.txt + pip install -r requirements-assignment.txt + pip install -r requirements-ota.txt + pip install -e .[arch_sbo,botorch,rocket,egor] + pip install jupyter ipython ipykernel + ipython kernel install --name "python3" --user + df -h + + - name: Test with pytest + run: RUN_SLOW_TESTS=1 pytest -v sb_arch_opt --durations=20 diff --git a/docs/tutorial.ipynb b/docs/tutorial.ipynb index a1b573e..8407422 100644 --- a/docs/tutorial.ipynb +++ b/docs/tutorial.ipynb @@ -43,7 +43,7 @@ "### Simple Example: Evolutionary Algorithm (NSGA2)\n", "\n", "The code below shows a simple example of solving an architecture optimization problem using NSGA2, a multi-objective evolutionary algorithm.\n", - "Continue with the rest of the tutorial for mode background information." + "Continue with the rest of the tutorial for more background information." ] }, { diff --git a/requirements-tests.txt b/requirements-tests.txt index 1f8c251..423071b 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,3 +1,3 @@ pytest -testbook~=0.4.2 +testbook matplotlib \ No newline at end of file diff --git a/sb_arch_opt/__init__.py b/sb_arch_opt/__init__.py index 7bf3831..bcd8d54 100644 --- a/sb_arch_opt/__init__.py +++ b/sb_arch_opt/__init__.py @@ -1 +1 @@ -__version__ = '1.5.7' +__version__ = '1.6.0' diff --git a/sb_arch_opt/algo/egor_interface/algo.py b/sb_arch_opt/algo/egor_interface/algo.py index 9869c1f..4543abb 100644 --- a/sb_arch_opt/algo/egor_interface/algo.py +++ b/sb_arch_opt/algo/egor_interface/algo.py @@ -241,7 +241,9 @@ def egor(self): egor_kwargs = { "n_cstr": self._get_constraints_nb(), - "kpls_dim": kpls_dim, + "gp_config": egx.GpConfig( + kpls_dim=kpls_dim, + ), } egor_kwargs.update(self._egor_kwargs) diff --git a/sb_arch_opt/tests/algo/test_botorch.py b/sb_arch_opt/tests/algo/test_botorch.py index ad3e710..50ca2a4 100644 --- a/sb_arch_opt/tests/algo/test_botorch.py +++ b/sb_arch_opt/tests/algo/test_botorch.py @@ -13,9 +13,9 @@ def check_dependency(): return pytest.mark.skipif(not HAS_BOTORCH, reason='BoTorch/Ax dependencies not installed') -@pytest.mark.skipif(int(os.getenv('RUN_SLOW_TESTS', 0)) != 1, reason='Set RUN_SLOW_TESTS=1 to run slow tests') -def test_slow_tests(): - assert HAS_BOTORCH +# @pytest.mark.skipif(int(os.getenv('RUN_SLOW_TESTS', 0)) != 1, reason='Set RUN_SLOW_TESTS=1 to run slow tests') +# def test_slow_tests(): +# assert HAS_BOTORCH @check_dependency() diff --git a/sb_arch_opt/tests/algo/test_egor.py b/sb_arch_opt/tests/algo/test_egor.py index 38022b7..154d647 100644 --- a/sb_arch_opt/tests/algo/test_egor.py +++ b/sb_arch_opt/tests/algo/test_egor.py @@ -11,9 +11,9 @@ def check_dependency(): return pytest.mark.skipif(not HAS_EGOBOX, reason="Egor dependencies not installed") -@pytest.mark.skipif(int(os.getenv('RUN_SLOW_TESTS', 0)) != 1, reason='Set RUN_SLOW_TESTS=1 to run slow tests') -def test_slow_tests(): - assert HAS_EGOBOX +# @pytest.mark.skipif(int(os.getenv('RUN_SLOW_TESTS', 0)) != 1, reason='Set RUN_SLOW_TESTS=1 to run slow tests') +# def test_slow_tests(): +# assert HAS_EGOBOX @check_dependency() diff --git a/sb_arch_opt/tests/problems/test_turbofan_arch.py b/sb_arch_opt/tests/problems/test_turbofan_arch.py index a2fc486..3c22ef3 100644 --- a/sb_arch_opt/tests/problems/test_turbofan_arch.py +++ b/sb_arch_opt/tests/problems/test_turbofan_arch.py @@ -13,9 +13,9 @@ def check_dependency(): return pytest.mark.skipif(not HAS_OPEN_TURB_ARCH, reason='Turbofan arch dependencies not installed') -@pytest.mark.skipif(int(os.getenv('RUN_SLOW_TESTS', 0)) != 1, reason='Set RUN_SLOW_TESTS=1 to run slow tests') -def test_slow_tests(): - assert HAS_OPEN_TURB_ARCH +# @pytest.mark.skipif(int(os.getenv('RUN_SLOW_TESTS', 0)) != 1, reason='Set RUN_SLOW_TESTS=1 to run slow tests') +# def test_slow_tests(): +# assert HAS_OPEN_TURB_ARCH @check_dependency() diff --git a/setup.py b/setup.py index d30255c..63caeb8 100644 --- a/setup.py +++ b/setup.py @@ -51,20 +51,19 @@ def _get_readme(): ], license='MIT', install_requires=[ - 'numpy<2.0', - 'pymoo~=0.6.1', + 'numpy', + 'pymoo>=0.6.1', 'scipy', 'deprecated', 'pandas', - 'cached-property~=1.5', - 'ConfigSpace~=1.2.1', - 'more-itertools~=9.1', + 'cached-property>=1.5', + 'ConfigSpace>=1.2.1', + 'more-itertools>=9.1', 'appdirs', ], extras_require={ 'arch_sbo': [ 'smt~=2.2,!=2.4,!=2.10.0', - 'jenn~=1.0', # Until bug has been fixed: https://github.com/SMTorg/smt/issues/769 'numba', 'scikit-learn', ], @@ -75,11 +74,11 @@ def _get_readme(): # 'assign_enc @ git+https://github.com/jbussemaker/AssignmentEncoding#egg=assign_enc', # ], 'botorch': [ - 'ax-platform~=0.3.0', - 'botorch~=0.8.2', + 'ax-platform', + 'botorch', ], 'trieste': [ - 'trieste~=4.5', + 'trieste', ], # 'tpe': [ # Not compatible with newer ConfigSpace # 'tpe==0.0.8', @@ -91,9 +90,9 @@ def _get_readme(): 'ambiance', ], 'egor': [ - 'egobox~=0.14.0', + 'egobox>=0.36.0', ], }, - python_requires='>=3.7', + python_requires='>=3.9', packages=find_packages(include='sb_arch_opt*'), )