Skip to content

Commit b3104f7

Browse files
committed
Merge remote-tracking branch 'origin/main' into pyensmallen-draft
2 parents 864882a + 1f95f25 commit b3104f7

File tree

72 files changed

+4346
-805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+4346
-805
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Code of Conduct
2+
3+
- [NumFOCUS Code of Conduct](https://numfocus.org/code-of-conduct)

.github/workflows/main.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,35 @@ jobs:
154154
run: |
155155
micromamba activate optimagic
156156
pytest -m "not slow and not jax"
157+
run-tests-nevergrad:
158+
# This job is for running test related to nevergrad with pinned version of
159+
# bayesian_optimization == 1.4.0
160+
name: Run tests for ubuntu-latest on ${{ matrix.python-version }} bayes_opt==1.4.0
161+
runs-on: ${{ matrix.os }}
162+
strategy:
163+
fail-fast: false
164+
matrix:
165+
os:
166+
- ubuntu-latest
167+
python-version:
168+
- '3.10'
169+
- '3.11'
170+
- '3.12'
171+
- '3.13'
172+
steps:
173+
- uses: actions/checkout@v4
174+
- name: create build environment
175+
uses: mamba-org/setup-micromamba@v1
176+
with:
177+
environment-file: ./.tools/envs/testenv-nevergrad.yml
178+
cache-environment: true
179+
create-args: |
180+
python=${{ matrix.python-version }}
181+
- name: run pytest
182+
shell: bash -l {0}
183+
run: |
184+
micromamba activate optimagic
185+
pytest tests/optimagic/optimizers/test_nevergrad.py
157186
code-in-docs:
158187
name: Run code snippets in documentation
159188
runs-on: ubuntu-latest

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# AI
2+
CLAUDE.md
3+
14
# Byte-compiled / optimized / DLL files
25
__pycache__/
36
*.py[cod]

.tools/envs/testenv-linux.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ dependencies:
2828
- jinja2 # dev, tests
2929
- annotated-types # dev, tests
3030
- iminuit # dev, tests
31+
- cma # dev, tests
3132
- pip: # dev, tests, docs
32-
- nevergrad # dev, tests
33+
- bayesian-optimization>=2.0.4 # dev, tests
3334
- DFO-LS>=1.5.3 # dev, tests
3435
- Py-BOBYQA # dev, tests
3536
- fides==0.7.4 # dev, tests
3637
- kaleido>=1.0 # dev, tests
38+
- bayes_optim # dev, tests
3739
- pandas-stubs # dev, tests
3840
- types-cffi # dev, tests
3941
- types-openpyxl # dev, tests

.tools/envs/testenv-nevergrad.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: optimagic
3+
channels:
4+
- conda-forge
5+
- nodefaults
6+
dependencies:
7+
- cyipopt>=1.4.0 # dev, tests
8+
- pygmo>=2.19.0 # dev, tests, docs
9+
- nlopt # dev, tests, docs
10+
- pip # dev, tests, docs
11+
- pytest # dev, tests
12+
- pytest-cov # tests
13+
- pytest-xdist # dev, tests
14+
- statsmodels # dev, tests
15+
- cloudpickle # run, tests
16+
- joblib # run, tests
17+
- numpy >= 2 # run, tests
18+
- pandas # run, tests
19+
- plotly>=6.2 # run, tests
20+
- pybaum>=0.1.2 # run, tests
21+
- scipy>=1.2.1 # run, tests
22+
- sqlalchemy # run, tests
23+
- seaborn # dev, tests
24+
- mypy=1.14.1 # dev, tests
25+
- pyyaml # dev, tests
26+
- jinja2 # dev, tests
27+
- annotated-types # dev, tests
28+
- iminuit # dev, tests
29+
- cma # dev, tests
30+
- pip: # dev, tests, docs
31+
- DFO-LS>=1.5.3 # dev, tests
32+
- Py-BOBYQA # dev, tests
33+
- fides==0.7.4 # dev, tests
34+
- kaleido>=1.0 # dev, tests
35+
- bayes_optim # dev, tests
36+
- pandas-stubs # dev, tests
37+
- types-cffi # dev, tests
38+
- types-openpyxl # dev, tests
39+
- types-jinja2 # dev, tests
40+
- sqlalchemy-stubs # dev, tests
41+
- sphinxcontrib-mermaid # dev, tests, docs
42+
- -e ../../
43+
- bayesian_optimization==1.4.0
44+
- nevergrad

.tools/envs/testenv-numpy.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ dependencies:
2626
- jinja2 # dev, tests
2727
- annotated-types # dev, tests
2828
- iminuit # dev, tests
29+
- cma # dev, tests
2930
- pip: # dev, tests, docs
30-
- nevergrad # dev, tests
31+
- bayesian-optimization>=2.0.4 # dev, tests
3132
- DFO-LS>=1.5.3 # dev, tests
3233
- Py-BOBYQA # dev, tests
3334
- fides==0.7.4 # dev, tests
3435
- kaleido>=1.0 # dev, tests
36+
- bayes_optim # dev, tests
3537
- types-cffi # dev, tests
3638
- types-openpyxl # dev, tests
3739
- types-jinja2 # dev, tests

.tools/envs/testenv-others.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ dependencies:
2626
- jinja2 # dev, tests
2727
- annotated-types # dev, tests
2828
- iminuit # dev, tests
29+
- cma # dev, tests
2930
- pip: # dev, tests, docs
30-
- nevergrad # dev, tests
31+
- bayesian-optimization>=2.0.4 # dev, tests
3132
- DFO-LS>=1.5.3 # dev, tests
3233
- Py-BOBYQA # dev, tests
3334
- fides==0.7.4 # dev, tests
3435
- kaleido>=1.0 # dev, tests
36+
- bayes_optim # dev, tests
3537
- pandas-stubs # dev, tests
3638
- types-cffi # dev, tests
3739
- types-openpyxl # dev, tests

.tools/envs/testenv-pandas.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ dependencies:
2626
- jinja2 # dev, tests
2727
- annotated-types # dev, tests
2828
- iminuit # dev, tests
29+
- cma # dev, tests
2930
- pip: # dev, tests, docs
30-
- nevergrad # dev, tests
31+
- bayesian-optimization>=2.0.4 # dev, tests
3132
- DFO-LS>=1.5.3 # dev, tests
3233
- Py-BOBYQA # dev, tests
3334
- fides==0.7.4 # dev, tests
3435
- kaleido>=1.0 # dev, tests
36+
- bayes_optim # dev, tests
3537
- types-cffi # dev, tests
3638
- types-openpyxl # dev, tests
3739
- types-jinja2 # dev, tests

.tools/envs/testenv-plotly.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ dependencies:
2626
- jinja2 # dev, tests
2727
- annotated-types # dev, tests
2828
- iminuit # dev, tests
29+
- cma # dev, tests
2930
- pip: # dev, tests, docs
30-
- nevergrad # dev, tests
31+
- bayesian-optimization>=2.0.4 # dev, tests
3132
- DFO-LS>=1.5.3 # dev, tests
3233
- Py-BOBYQA # dev, tests
3334
- fides==0.7.4 # dev, tests
35+
- bayes_optim # dev, tests
3436
- pandas-stubs # dev, tests
3537
- types-cffi # dev, tests
3638
- types-openpyxl # dev, tests

.tools/update_envs.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,28 @@ def main() -> None:
5454
test_env_plotly.insert(_insert_idx, " - plotly<6")
5555
test_env_plotly.insert(_insert_idx_pip, " - kaleido<0.3")
5656

57+
test_env_nevergrad = deepcopy(test_env)
58+
for pkg in ["bayesian-optimization"]:
59+
test_env_nevergrad = [line for line in test_env_nevergrad if pkg not in line]
60+
test_env_nevergrad.insert(_insert_idx_pip, " - nevergrad")
61+
test_env_nevergrad.insert(
62+
_insert_idx_pip, " - bayesian_optimization==1.4.0"
63+
)
64+
5765
# test environment for documentation
5866
docs_env = [line for line in lines if _keep_line(line, "docs")]
5967
docs_env.append(" - -e ../../") # add local installation
6068

6169
# write environments
6270
for name, env in zip(
63-
["linux", "others", "pandas", "numpy", "plotly"],
71+
["linux", "others", "pandas", "numpy", "plotly", "nevergrad"],
6472
[
6573
test_env_linux,
6674
test_env_others,
6775
test_env_pandas,
6876
test_env_numpy,
6977
test_env_plotly,
78+
test_env_nevergrad,
7079
],
7180
strict=False,
7281
):

0 commit comments

Comments
 (0)