ropt 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ropt-0.1.0/.github/workflows/build-docs.yml +32 -0
- ropt-0.1.0/.github/workflows/github-pages.yml +28 -0
- ropt-0.1.0/.github/workflows/static-checks.yml +41 -0
- ropt-0.1.0/.github/workflows/tests.yml +32 -0
- ropt-0.1.0/.gitignore +3 -0
- ropt-0.1.0/.readthedocs.yaml +20 -0
- ropt-0.1.0/LICENSE +674 -0
- ropt-0.1.0/PKG-INFO +82 -0
- ropt-0.1.0/README.md +42 -0
- ropt-0.1.0/docs/index.md +56 -0
- ropt-0.1.0/docs/javascripts/mathjax.js +16 -0
- ropt-0.1.0/docs/reference/enopt_config.md +17 -0
- ropt-0.1.0/docs/reference/enums.md +4 -0
- ropt-0.1.0/docs/reference/evaluator.md +28 -0
- ropt-0.1.0/docs/reference/exceptions.md +4 -0
- ropt-0.1.0/docs/reference/function_transforms.md +11 -0
- ropt-0.1.0/docs/reference/optimization.md +6 -0
- ropt-0.1.0/docs/reference/optimization_steps.md +1 -0
- ropt-0.1.0/docs/reference/optimizer_backends.md +9 -0
- ropt-0.1.0/docs/reference/plan_config.md +13 -0
- ropt-0.1.0/docs/reference/plugins.md +1 -0
- ropt-0.1.0/docs/reference/realization_filters.md +19 -0
- ropt-0.1.0/docs/reference/reporting.md +1 -0
- ropt-0.1.0/docs/reference/results.md +59 -0
- ropt-0.1.0/docs/reference/sampler_backends.md +9 -0
- ropt-0.1.0/docs/reference/utilities.md +3 -0
- ropt-0.1.0/docs/usage/robust_optimization.md +63 -0
- ropt-0.1.0/docs/usage/running.md +77 -0
- ropt-0.1.0/examples/de_linear.py +95 -0
- ropt-0.1.0/examples/de_nonlinear.py +101 -0
- ropt-0.1.0/examples/rosenbrock_deterministic.py +100 -0
- ropt-0.1.0/examples/rosenbrock_ensemble.py +134 -0
- ropt-0.1.0/examples/script_optimizer/rosenbrock.py +37 -0
- ropt-0.1.0/examples/script_optimizer/run.py +93 -0
- ropt-0.1.0/mkdocs.yml +74 -0
- ropt-0.1.0/pyproject.toml +101 -0
- ropt-0.1.0/setup.cfg +4 -0
- ropt-0.1.0/src/ropt/__init__.py +1 -0
- ropt-0.1.0/src/ropt/apps/__init__.py +7 -0
- ropt-0.1.0/src/ropt/apps/_script_optimizer.py +463 -0
- ropt-0.1.0/src/ropt/config/__init__.py +1 -0
- ropt-0.1.0/src/ropt/config/enopt/__init__.py +27 -0
- ropt-0.1.0/src/ropt/config/enopt/_enopt_base_model.py +15 -0
- ropt-0.1.0/src/ropt/config/enopt/_enopt_config.py +208 -0
- ropt-0.1.0/src/ropt/config/enopt/_function_transform_config.py +43 -0
- ropt-0.1.0/src/ropt/config/enopt/_gradient_config.py +119 -0
- ropt-0.1.0/src/ropt/config/enopt/_linear_constraints_config.py +83 -0
- ropt-0.1.0/src/ropt/config/enopt/_nonlinear_constraints_config.py +112 -0
- ropt-0.1.0/src/ropt/config/enopt/_objective_functions_config.py +100 -0
- ropt-0.1.0/src/ropt/config/enopt/_optimizer_config.py +84 -0
- ropt-0.1.0/src/ropt/config/enopt/_realization_filter_config.py +46 -0
- ropt-0.1.0/src/ropt/config/enopt/_realizations_config.py +85 -0
- ropt-0.1.0/src/ropt/config/enopt/_sampler_config.py +52 -0
- ropt-0.1.0/src/ropt/config/enopt/_utils.py +132 -0
- ropt-0.1.0/src/ropt/config/enopt/_variables_config.py +184 -0
- ropt-0.1.0/src/ropt/config/enopt/constants.py +36 -0
- ropt-0.1.0/src/ropt/config/plan/__init__.py +26 -0
- ropt-0.1.0/src/ropt/config/plan/_config.py +156 -0
- ropt-0.1.0/src/ropt/config/plan/_plan_config.py +21 -0
- ropt-0.1.0/src/ropt/config/plan/_step_config.py +27 -0
- ropt-0.1.0/src/ropt/config/utils.py +185 -0
- ropt-0.1.0/src/ropt/enums.py +175 -0
- ropt-0.1.0/src/ropt/evaluator/__init__.py +50 -0
- ropt-0.1.0/src/ropt/evaluator/_concurrent.py +189 -0
- ropt-0.1.0/src/ropt/evaluator/_ensemble_evaluator.py +653 -0
- ropt-0.1.0/src/ropt/evaluator/_evaluator.py +143 -0
- ropt-0.1.0/src/ropt/evaluator/_evaluator_results.py +244 -0
- ropt-0.1.0/src/ropt/evaluator/_function.py +69 -0
- ropt-0.1.0/src/ropt/evaluator/_gradient.py +229 -0
- ropt-0.1.0/src/ropt/evaluator/_utils.py +25 -0
- ropt-0.1.0/src/ropt/evaluator/parsl.py +161 -0
- ropt-0.1.0/src/ropt/events.py +39 -0
- ropt-0.1.0/src/ropt/exceptions.py +25 -0
- ropt-0.1.0/src/ropt/optimization/__init__.py +18 -0
- ropt-0.1.0/src/ropt/optimization/_bases.py +122 -0
- ropt-0.1.0/src/ropt/optimization/_ensemble_optimizer.py +118 -0
- ropt-0.1.0/src/ropt/optimization/_events.py +27 -0
- ropt-0.1.0/src/ropt/optimization/_optimizer.py +246 -0
- ropt-0.1.0/src/ropt/optimization/_plan.py +218 -0
- ropt-0.1.0/src/ropt/plugins/__init__.py +39 -0
- ropt-0.1.0/src/ropt/plugins/_manager.py +156 -0
- ropt-0.1.0/src/ropt/plugins/function_transform/__init__.py +5 -0
- ropt-0.1.0/src/ropt/plugins/function_transform/default.py +152 -0
- ropt-0.1.0/src/ropt/plugins/function_transform/protocol.py +72 -0
- ropt-0.1.0/src/ropt/plugins/optimization_steps/__init__.py +7 -0
- ropt-0.1.0/src/ropt/plugins/optimization_steps/_utils.py +91 -0
- ropt-0.1.0/src/ropt/plugins/optimization_steps/default.py +58 -0
- ropt-0.1.0/src/ropt/plugins/optimization_steps/enopt_config.py +37 -0
- ropt-0.1.0/src/ropt/plugins/optimization_steps/evaluator.py +112 -0
- ropt-0.1.0/src/ropt/plugins/optimization_steps/label.py +29 -0
- ropt-0.1.0/src/ropt/plugins/optimization_steps/optimizer.py +139 -0
- ropt-0.1.0/src/ropt/plugins/optimization_steps/reset_tracker.py +34 -0
- ropt-0.1.0/src/ropt/plugins/optimization_steps/restart.py +57 -0
- ropt-0.1.0/src/ropt/plugins/optimization_steps/tracker.py +88 -0
- ropt-0.1.0/src/ropt/plugins/optimization_steps/update_config.py +51 -0
- ropt-0.1.0/src/ropt/plugins/optimizer/__init__.py +21 -0
- ropt-0.1.0/src/ropt/plugins/optimizer/protocol.py +105 -0
- ropt-0.1.0/src/ropt/plugins/optimizer/scipy.py +557 -0
- ropt-0.1.0/src/ropt/plugins/optimizer/utils.py +247 -0
- ropt-0.1.0/src/ropt/plugins/realization_filter/__init__.py +11 -0
- ropt-0.1.0/src/ropt/plugins/realization_filter/default.py +384 -0
- ropt-0.1.0/src/ropt/plugins/realization_filter/protocol.py +58 -0
- ropt-0.1.0/src/ropt/plugins/sampler/__init__.py +14 -0
- ropt-0.1.0/src/ropt/plugins/sampler/protocol.py +87 -0
- ropt-0.1.0/src/ropt/plugins/sampler/scipy.py +199 -0
- ropt-0.1.0/src/ropt/py.typed +0 -0
- ropt-0.1.0/src/ropt/report/__init__.py +16 -0
- ropt-0.1.0/src/ropt/report/_data_frame.py +212 -0
- ropt-0.1.0/src/ropt/report/_table.py +127 -0
- ropt-0.1.0/src/ropt/report/_utils.py +116 -0
- ropt-0.1.0/src/ropt/results/__init__.py +85 -0
- ropt-0.1.0/src/ropt/results/_bound_constraints.py +174 -0
- ropt-0.1.0/src/ropt/results/_function_evaluations.py +161 -0
- ropt-0.1.0/src/ropt/results/_function_results.py +103 -0
- ropt-0.1.0/src/ropt/results/_functions.py +120 -0
- ropt-0.1.0/src/ropt/results/_gradient_evaluations.py +95 -0
- ropt-0.1.0/src/ropt/results/_gradient_results.py +90 -0
- ropt-0.1.0/src/ropt/results/_gradients.py +61 -0
- ropt-0.1.0/src/ropt/results/_linear_constraints.py +87 -0
- ropt-0.1.0/src/ropt/results/_maximize.py +64 -0
- ropt-0.1.0/src/ropt/results/_nonlinear_constraints.py +129 -0
- ropt-0.1.0/src/ropt/results/_pandas.py +104 -0
- ropt-0.1.0/src/ropt/results/_realizations.py +67 -0
- ropt-0.1.0/src/ropt/results/_result_field.py +40 -0
- ropt-0.1.0/src/ropt/results/_results.py +227 -0
- ropt-0.1.0/src/ropt/results/_utils.py +104 -0
- ropt-0.1.0/src/ropt/results/_xarray.py +131 -0
- ropt-0.1.0/src/ropt/utils/__init__.py +9 -0
- ropt-0.1.0/src/ropt/utils/_misc.py +27 -0
- ropt-0.1.0/src/ropt/utils/scaling.py +147 -0
- ropt-0.1.0/src/ropt/version.py +16 -0
- ropt-0.1.0/src/ropt.egg-info/PKG-INFO +82 -0
- ropt-0.1.0/src/ropt.egg-info/SOURCES.txt +154 -0
- ropt-0.1.0/src/ropt.egg-info/dependency_links.txt +1 -0
- ropt-0.1.0/src/ropt.egg-info/requires.txt +30 -0
- ropt-0.1.0/src/ropt.egg-info/top_level.txt +1 -0
- ropt-0.1.0/tests/__init__.py +0 -0
- ropt-0.1.0/tests/conftest.py +129 -0
- ropt-0.1.0/tests/test_concurrent.py +124 -0
- ropt-0.1.0/tests/test_config.py +675 -0
- ropt-0.1.0/tests/test_ensemble_gradient.py +275 -0
- ropt-0.1.0/tests/test_examples.py +65 -0
- ropt-0.1.0/tests/test_failed_realizations.py +73 -0
- ropt-0.1.0/tests/test_function_transforms.py +117 -0
- ropt-0.1.0/tests/test_netcdf.py +185 -0
- ropt-0.1.0/tests/test_optimizer.py +1214 -0
- ropt-0.1.0/tests/test_pandas.py +227 -0
- ropt-0.1.0/tests/test_parsl.py +152 -0
- ropt-0.1.0/tests/test_realization_filters.py +769 -0
- ropt-0.1.0/tests/test_result_table.py +197 -0
- ropt-0.1.0/tests/test_results.py +236 -0
- ropt-0.1.0/tests/test_results_data_frame.py +159 -0
- ropt-0.1.0/tests/test_samplers.py +193 -0
- ropt-0.1.0/tests/test_scipy_backend.py +537 -0
- ropt-0.1.0/tests/test_scipy_samplers.py +131 -0
- ropt-0.1.0/tests/test_xarray.py +98 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Build documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
schedule:
|
|
10
|
+
- cron: '43 1 * * 1'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build-docs:
|
|
14
|
+
runs-on: ubuntu-22.04
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
python-version: ["3.10"]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python-version }}
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
python -m pip install .[docs]
|
|
29
|
+
- name: Build docs
|
|
30
|
+
if: always()
|
|
31
|
+
run: |
|
|
32
|
+
python -m mkdocs build --strict
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Build docs and deploy to GitHub Pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build-docs:
|
|
9
|
+
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.10"]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: |
|
|
24
|
+
python -m pip install --upgrade pip
|
|
25
|
+
python -m pip install .[docs]
|
|
26
|
+
- name: Publish to GitHub Pages
|
|
27
|
+
run: |
|
|
28
|
+
mkdocs gh-deploy --no-history
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Run static checks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
schedule:
|
|
10
|
+
- cron: '43 1 * * 1'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
static-checks:
|
|
14
|
+
runs-on: ubuntu-22.04
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
python-version: ["3.10"]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python-version }}
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
python -m pip install .[storage,test,parsl]
|
|
29
|
+
python -m pip install pandas-stubs
|
|
30
|
+
- name: Run ruff format
|
|
31
|
+
if: always()
|
|
32
|
+
run: |
|
|
33
|
+
python -m ruff format --check src/ropt tests examples
|
|
34
|
+
- name: Run ruff check
|
|
35
|
+
if: always()
|
|
36
|
+
run: |
|
|
37
|
+
python -m ruff check src/ropt tests examples
|
|
38
|
+
- name: Run mypy
|
|
39
|
+
if: always()
|
|
40
|
+
run: |
|
|
41
|
+
python -m mypy src/ropt tests examples
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Run tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
schedule:
|
|
10
|
+
- cron: '43 1 * * 1'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
run-tests:
|
|
14
|
+
runs-on: ubuntu-22.04
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python-version }}
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
python -m pip install pytest
|
|
29
|
+
python -m pip install .[storage,parsl]
|
|
30
|
+
- name: Run pytest
|
|
31
|
+
run: |
|
|
32
|
+
python -m pytest tests --run-slow
|
ropt-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
build:
|
|
4
|
+
os: ubuntu-22.04
|
|
5
|
+
tools:
|
|
6
|
+
python: "3.10"
|
|
7
|
+
jobs:
|
|
8
|
+
post_checkout:
|
|
9
|
+
- "sed -i \"s/name:\\s*material/name:\\ readthedocs/\" mkdocs.yml"
|
|
10
|
+
|
|
11
|
+
python:
|
|
12
|
+
install:
|
|
13
|
+
- method: pip
|
|
14
|
+
path: .
|
|
15
|
+
extra_requirements:
|
|
16
|
+
- docs
|
|
17
|
+
|
|
18
|
+
mkdocs:
|
|
19
|
+
configuration: mkdocs.yml
|
|
20
|
+
fail_on_warning: false
|