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.
Files changed (156) hide show
  1. ropt-0.1.0/.github/workflows/build-docs.yml +32 -0
  2. ropt-0.1.0/.github/workflows/github-pages.yml +28 -0
  3. ropt-0.1.0/.github/workflows/static-checks.yml +41 -0
  4. ropt-0.1.0/.github/workflows/tests.yml +32 -0
  5. ropt-0.1.0/.gitignore +3 -0
  6. ropt-0.1.0/.readthedocs.yaml +20 -0
  7. ropt-0.1.0/LICENSE +674 -0
  8. ropt-0.1.0/PKG-INFO +82 -0
  9. ropt-0.1.0/README.md +42 -0
  10. ropt-0.1.0/docs/index.md +56 -0
  11. ropt-0.1.0/docs/javascripts/mathjax.js +16 -0
  12. ropt-0.1.0/docs/reference/enopt_config.md +17 -0
  13. ropt-0.1.0/docs/reference/enums.md +4 -0
  14. ropt-0.1.0/docs/reference/evaluator.md +28 -0
  15. ropt-0.1.0/docs/reference/exceptions.md +4 -0
  16. ropt-0.1.0/docs/reference/function_transforms.md +11 -0
  17. ropt-0.1.0/docs/reference/optimization.md +6 -0
  18. ropt-0.1.0/docs/reference/optimization_steps.md +1 -0
  19. ropt-0.1.0/docs/reference/optimizer_backends.md +9 -0
  20. ropt-0.1.0/docs/reference/plan_config.md +13 -0
  21. ropt-0.1.0/docs/reference/plugins.md +1 -0
  22. ropt-0.1.0/docs/reference/realization_filters.md +19 -0
  23. ropt-0.1.0/docs/reference/reporting.md +1 -0
  24. ropt-0.1.0/docs/reference/results.md +59 -0
  25. ropt-0.1.0/docs/reference/sampler_backends.md +9 -0
  26. ropt-0.1.0/docs/reference/utilities.md +3 -0
  27. ropt-0.1.0/docs/usage/robust_optimization.md +63 -0
  28. ropt-0.1.0/docs/usage/running.md +77 -0
  29. ropt-0.1.0/examples/de_linear.py +95 -0
  30. ropt-0.1.0/examples/de_nonlinear.py +101 -0
  31. ropt-0.1.0/examples/rosenbrock_deterministic.py +100 -0
  32. ropt-0.1.0/examples/rosenbrock_ensemble.py +134 -0
  33. ropt-0.1.0/examples/script_optimizer/rosenbrock.py +37 -0
  34. ropt-0.1.0/examples/script_optimizer/run.py +93 -0
  35. ropt-0.1.0/mkdocs.yml +74 -0
  36. ropt-0.1.0/pyproject.toml +101 -0
  37. ropt-0.1.0/setup.cfg +4 -0
  38. ropt-0.1.0/src/ropt/__init__.py +1 -0
  39. ropt-0.1.0/src/ropt/apps/__init__.py +7 -0
  40. ropt-0.1.0/src/ropt/apps/_script_optimizer.py +463 -0
  41. ropt-0.1.0/src/ropt/config/__init__.py +1 -0
  42. ropt-0.1.0/src/ropt/config/enopt/__init__.py +27 -0
  43. ropt-0.1.0/src/ropt/config/enopt/_enopt_base_model.py +15 -0
  44. ropt-0.1.0/src/ropt/config/enopt/_enopt_config.py +208 -0
  45. ropt-0.1.0/src/ropt/config/enopt/_function_transform_config.py +43 -0
  46. ropt-0.1.0/src/ropt/config/enopt/_gradient_config.py +119 -0
  47. ropt-0.1.0/src/ropt/config/enopt/_linear_constraints_config.py +83 -0
  48. ropt-0.1.0/src/ropt/config/enopt/_nonlinear_constraints_config.py +112 -0
  49. ropt-0.1.0/src/ropt/config/enopt/_objective_functions_config.py +100 -0
  50. ropt-0.1.0/src/ropt/config/enopt/_optimizer_config.py +84 -0
  51. ropt-0.1.0/src/ropt/config/enopt/_realization_filter_config.py +46 -0
  52. ropt-0.1.0/src/ropt/config/enopt/_realizations_config.py +85 -0
  53. ropt-0.1.0/src/ropt/config/enopt/_sampler_config.py +52 -0
  54. ropt-0.1.0/src/ropt/config/enopt/_utils.py +132 -0
  55. ropt-0.1.0/src/ropt/config/enopt/_variables_config.py +184 -0
  56. ropt-0.1.0/src/ropt/config/enopt/constants.py +36 -0
  57. ropt-0.1.0/src/ropt/config/plan/__init__.py +26 -0
  58. ropt-0.1.0/src/ropt/config/plan/_config.py +156 -0
  59. ropt-0.1.0/src/ropt/config/plan/_plan_config.py +21 -0
  60. ropt-0.1.0/src/ropt/config/plan/_step_config.py +27 -0
  61. ropt-0.1.0/src/ropt/config/utils.py +185 -0
  62. ropt-0.1.0/src/ropt/enums.py +175 -0
  63. ropt-0.1.0/src/ropt/evaluator/__init__.py +50 -0
  64. ropt-0.1.0/src/ropt/evaluator/_concurrent.py +189 -0
  65. ropt-0.1.0/src/ropt/evaluator/_ensemble_evaluator.py +653 -0
  66. ropt-0.1.0/src/ropt/evaluator/_evaluator.py +143 -0
  67. ropt-0.1.0/src/ropt/evaluator/_evaluator_results.py +244 -0
  68. ropt-0.1.0/src/ropt/evaluator/_function.py +69 -0
  69. ropt-0.1.0/src/ropt/evaluator/_gradient.py +229 -0
  70. ropt-0.1.0/src/ropt/evaluator/_utils.py +25 -0
  71. ropt-0.1.0/src/ropt/evaluator/parsl.py +161 -0
  72. ropt-0.1.0/src/ropt/events.py +39 -0
  73. ropt-0.1.0/src/ropt/exceptions.py +25 -0
  74. ropt-0.1.0/src/ropt/optimization/__init__.py +18 -0
  75. ropt-0.1.0/src/ropt/optimization/_bases.py +122 -0
  76. ropt-0.1.0/src/ropt/optimization/_ensemble_optimizer.py +118 -0
  77. ropt-0.1.0/src/ropt/optimization/_events.py +27 -0
  78. ropt-0.1.0/src/ropt/optimization/_optimizer.py +246 -0
  79. ropt-0.1.0/src/ropt/optimization/_plan.py +218 -0
  80. ropt-0.1.0/src/ropt/plugins/__init__.py +39 -0
  81. ropt-0.1.0/src/ropt/plugins/_manager.py +156 -0
  82. ropt-0.1.0/src/ropt/plugins/function_transform/__init__.py +5 -0
  83. ropt-0.1.0/src/ropt/plugins/function_transform/default.py +152 -0
  84. ropt-0.1.0/src/ropt/plugins/function_transform/protocol.py +72 -0
  85. ropt-0.1.0/src/ropt/plugins/optimization_steps/__init__.py +7 -0
  86. ropt-0.1.0/src/ropt/plugins/optimization_steps/_utils.py +91 -0
  87. ropt-0.1.0/src/ropt/plugins/optimization_steps/default.py +58 -0
  88. ropt-0.1.0/src/ropt/plugins/optimization_steps/enopt_config.py +37 -0
  89. ropt-0.1.0/src/ropt/plugins/optimization_steps/evaluator.py +112 -0
  90. ropt-0.1.0/src/ropt/plugins/optimization_steps/label.py +29 -0
  91. ropt-0.1.0/src/ropt/plugins/optimization_steps/optimizer.py +139 -0
  92. ropt-0.1.0/src/ropt/plugins/optimization_steps/reset_tracker.py +34 -0
  93. ropt-0.1.0/src/ropt/plugins/optimization_steps/restart.py +57 -0
  94. ropt-0.1.0/src/ropt/plugins/optimization_steps/tracker.py +88 -0
  95. ropt-0.1.0/src/ropt/plugins/optimization_steps/update_config.py +51 -0
  96. ropt-0.1.0/src/ropt/plugins/optimizer/__init__.py +21 -0
  97. ropt-0.1.0/src/ropt/plugins/optimizer/protocol.py +105 -0
  98. ropt-0.1.0/src/ropt/plugins/optimizer/scipy.py +557 -0
  99. ropt-0.1.0/src/ropt/plugins/optimizer/utils.py +247 -0
  100. ropt-0.1.0/src/ropt/plugins/realization_filter/__init__.py +11 -0
  101. ropt-0.1.0/src/ropt/plugins/realization_filter/default.py +384 -0
  102. ropt-0.1.0/src/ropt/plugins/realization_filter/protocol.py +58 -0
  103. ropt-0.1.0/src/ropt/plugins/sampler/__init__.py +14 -0
  104. ropt-0.1.0/src/ropt/plugins/sampler/protocol.py +87 -0
  105. ropt-0.1.0/src/ropt/plugins/sampler/scipy.py +199 -0
  106. ropt-0.1.0/src/ropt/py.typed +0 -0
  107. ropt-0.1.0/src/ropt/report/__init__.py +16 -0
  108. ropt-0.1.0/src/ropt/report/_data_frame.py +212 -0
  109. ropt-0.1.0/src/ropt/report/_table.py +127 -0
  110. ropt-0.1.0/src/ropt/report/_utils.py +116 -0
  111. ropt-0.1.0/src/ropt/results/__init__.py +85 -0
  112. ropt-0.1.0/src/ropt/results/_bound_constraints.py +174 -0
  113. ropt-0.1.0/src/ropt/results/_function_evaluations.py +161 -0
  114. ropt-0.1.0/src/ropt/results/_function_results.py +103 -0
  115. ropt-0.1.0/src/ropt/results/_functions.py +120 -0
  116. ropt-0.1.0/src/ropt/results/_gradient_evaluations.py +95 -0
  117. ropt-0.1.0/src/ropt/results/_gradient_results.py +90 -0
  118. ropt-0.1.0/src/ropt/results/_gradients.py +61 -0
  119. ropt-0.1.0/src/ropt/results/_linear_constraints.py +87 -0
  120. ropt-0.1.0/src/ropt/results/_maximize.py +64 -0
  121. ropt-0.1.0/src/ropt/results/_nonlinear_constraints.py +129 -0
  122. ropt-0.1.0/src/ropt/results/_pandas.py +104 -0
  123. ropt-0.1.0/src/ropt/results/_realizations.py +67 -0
  124. ropt-0.1.0/src/ropt/results/_result_field.py +40 -0
  125. ropt-0.1.0/src/ropt/results/_results.py +227 -0
  126. ropt-0.1.0/src/ropt/results/_utils.py +104 -0
  127. ropt-0.1.0/src/ropt/results/_xarray.py +131 -0
  128. ropt-0.1.0/src/ropt/utils/__init__.py +9 -0
  129. ropt-0.1.0/src/ropt/utils/_misc.py +27 -0
  130. ropt-0.1.0/src/ropt/utils/scaling.py +147 -0
  131. ropt-0.1.0/src/ropt/version.py +16 -0
  132. ropt-0.1.0/src/ropt.egg-info/PKG-INFO +82 -0
  133. ropt-0.1.0/src/ropt.egg-info/SOURCES.txt +154 -0
  134. ropt-0.1.0/src/ropt.egg-info/dependency_links.txt +1 -0
  135. ropt-0.1.0/src/ropt.egg-info/requires.txt +30 -0
  136. ropt-0.1.0/src/ropt.egg-info/top_level.txt +1 -0
  137. ropt-0.1.0/tests/__init__.py +0 -0
  138. ropt-0.1.0/tests/conftest.py +129 -0
  139. ropt-0.1.0/tests/test_concurrent.py +124 -0
  140. ropt-0.1.0/tests/test_config.py +675 -0
  141. ropt-0.1.0/tests/test_ensemble_gradient.py +275 -0
  142. ropt-0.1.0/tests/test_examples.py +65 -0
  143. ropt-0.1.0/tests/test_failed_realizations.py +73 -0
  144. ropt-0.1.0/tests/test_function_transforms.py +117 -0
  145. ropt-0.1.0/tests/test_netcdf.py +185 -0
  146. ropt-0.1.0/tests/test_optimizer.py +1214 -0
  147. ropt-0.1.0/tests/test_pandas.py +227 -0
  148. ropt-0.1.0/tests/test_parsl.py +152 -0
  149. ropt-0.1.0/tests/test_realization_filters.py +769 -0
  150. ropt-0.1.0/tests/test_result_table.py +197 -0
  151. ropt-0.1.0/tests/test_results.py +236 -0
  152. ropt-0.1.0/tests/test_results_data_frame.py +159 -0
  153. ropt-0.1.0/tests/test_samplers.py +193 -0
  154. ropt-0.1.0/tests/test_scipy_backend.py +537 -0
  155. ropt-0.1.0/tests/test_scipy_samplers.py +131 -0
  156. 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,3 @@
1
+ **/__pycache__/**
2
+ src/**egg-info/**
3
+ src/**/ropt/version.py
@@ -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