Skip to content
Merged

Dev #34

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/tests_basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests_slow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/tests_slow_ext.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion docs/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pytest
testbook~=0.4.2
testbook
matplotlib
2 changes: 1 addition & 1 deletion sb_arch_opt/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.5.7'
__version__ = '1.6.0'
4 changes: 3 additions & 1 deletion sb_arch_opt/algo/egor_interface/algo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions sb_arch_opt/tests/algo/test_botorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions sb_arch_opt/tests/algo/test_egor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions sb_arch_opt/tests/problems/test_turbofan_arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
21 changes: 10 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
Expand All @@ -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',
Expand All @@ -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*'),
)