pygmo 2.19.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 (205) hide show
  1. pygmo2/.circleci/config.yml +45 -0
  2. pygmo2/.clang-format +61 -0
  3. pygmo2/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
  4. pygmo2/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  5. pygmo2/.github/workflows/main.yml +100 -0
  6. pygmo2/.gitignore +21 -0
  7. pygmo2/.travis.yml +19 -0
  8. pygmo2/CMakeLists.txt +159 -0
  9. pygmo2/LICENSE +373 -0
  10. pygmo2/PKG-INFO +20 -0
  11. pygmo2/README.md +50 -0
  12. pygmo2/cmake/PygmoFindBoost.cmake +34 -0
  13. pygmo2/cmake/yacma/LICENSE +21 -0
  14. pygmo2/cmake/yacma/README.md +3 -0
  15. pygmo2/cmake/yacma/YACMACompilerLinkerSettings.cmake +207 -0
  16. pygmo2/cmake/yacma/YACMAPythonSetup.cmake +146 -0
  17. pygmo2/cmake/yacma/YACMAThreadingSetup.cmake +60 -0
  18. pygmo2/doc/Makefile +20 -0
  19. pygmo2/doc/algorithm.rst +7 -0
  20. pygmo2/doc/algorithms.rst +133 -0
  21. pygmo2/doc/api_reference.rst +45 -0
  22. pygmo2/doc/archipelago.rst +7 -0
  23. pygmo2/doc/bfe.rst +6 -0
  24. pygmo2/doc/bfes.rst +31 -0
  25. pygmo2/doc/changelog.rst +164 -0
  26. pygmo2/doc/con_utils.rst +8 -0
  27. pygmo2/doc/conf.py.in +106 -0
  28. pygmo2/doc/credits.rst +45 -0
  29. pygmo2/doc/generic_utils.rst +12 -0
  30. pygmo2/doc/genetic_op_utils.rst +8 -0
  31. pygmo2/doc/gh_utils.rst +12 -0
  32. pygmo2/doc/hv_utils.rst +30 -0
  33. pygmo2/doc/images/algo.png +0 -0
  34. pygmo2/doc/images/algo_no_text.png +0 -0
  35. pygmo2/doc/images/archi.png +0 -0
  36. pygmo2/doc/images/archi_no_text.png +0 -0
  37. pygmo2/doc/images/cec2013_10_cmaes.png +0 -0
  38. pygmo2/doc/images/cec2013_10_jde.png +0 -0
  39. pygmo2/doc/images/cec2013_2_cmaes.png +0 -0
  40. pygmo2/doc/images/cec2013_2_jde.png +0 -0
  41. pygmo2/doc/images/cec2013_2_pso.png +0 -0
  42. pygmo2/doc/images/cec2013_2_sa.png +0 -0
  43. pygmo2/doc/images/cmaes_vs_xnes1.png +0 -0
  44. pygmo2/doc/images/cmaes_vs_xnes2.png +0 -0
  45. pygmo2/doc/images/cmaes_vs_xnes3.png +0 -0
  46. pygmo2/doc/images/cmaes_vs_xnes4.png +0 -0
  47. pygmo2/doc/images/cmaes_vs_xnes5.png +0 -0
  48. pygmo2/doc/images/cmaes_vs_xnes6.png +0 -0
  49. pygmo2/doc/images/dow.png +0 -0
  50. pygmo2/doc/images/esa.png +0 -0
  51. pygmo2/doc/images/google.png +0 -0
  52. pygmo2/doc/images/hv_MAX_compute_runtime_plot.png +0 -0
  53. pygmo2/doc/images/hv_MAX_lc_runtime_plot.png +0 -0
  54. pygmo2/doc/images/hv_compute_runtime_plot.png +0 -0
  55. pygmo2/doc/images/hv_fpras.png +0 -0
  56. pygmo2/doc/images/hv_front_2d_simple.png +0 -0
  57. pygmo2/doc/images/hv_lc_runtime_plot.png +0 -0
  58. pygmo2/doc/images/hv_wfg_hv3d.png +0 -0
  59. pygmo2/doc/images/hypervolume.png +0 -0
  60. pygmo2/doc/images/island.png +0 -0
  61. pygmo2/doc/images/island_no_text.png +0 -0
  62. pygmo2/doc/images/logo_favico.ico +0 -0
  63. pygmo2/doc/images/migration.png +0 -0
  64. pygmo2/doc/images/mo_dtlz_moead_array.png +0 -0
  65. pygmo2/doc/images/mo_dtlz_moead_grid_tch.png +0 -0
  66. pygmo2/doc/images/mo_zdt1_moead_ndf.png +0 -0
  67. pygmo2/doc/images/mo_zdt1_rnd_ndf.png +0 -0
  68. pygmo2/doc/images/nlopt_basic_lv1.png +0 -0
  69. pygmo2/doc/images/pop.png +0 -0
  70. pygmo2/doc/images/pop_no_text.png +0 -0
  71. pygmo2/doc/images/prob.png +0 -0
  72. pygmo2/doc/images/prob_no_text.png +0 -0
  73. pygmo2/doc/images/ros_10_on_16_isl.png +0 -0
  74. pygmo2/doc/images/sa_schwefel_20.png +0 -0
  75. pygmo2/doc/images/sade_CR_over_rosenbrock_10.png +0 -0
  76. pygmo2/doc/images/sade_rosenbrock_10.png +0 -0
  77. pygmo2/doc/images/schwefel_20.png +0 -0
  78. pygmo2/doc/images/sea_schwefel_20.png +0 -0
  79. pygmo2/doc/images/tutorial_cec2006.png +0 -0
  80. pygmo2/doc/images/tutorial_maco_zdt3.png +0 -0
  81. pygmo2/doc/index.rst +62 -0
  82. pygmo2/doc/install.rst +216 -0
  83. pygmo2/doc/island.rst +7 -0
  84. pygmo2/doc/islands.rst +21 -0
  85. pygmo2/doc/known_issues.rst +14 -0
  86. pygmo2/doc/make.bat +35 -0
  87. pygmo2/doc/misc.rst +22 -0
  88. pygmo2/doc/mo_utils.rst +40 -0
  89. pygmo2/doc/overview.rst +276 -0
  90. pygmo2/doc/plotting.rst +4 -0
  91. pygmo2/doc/population.rst +7 -0
  92. pygmo2/doc/problem.rst +7 -0
  93. pygmo2/doc/problems.rst +128 -0
  94. pygmo2/doc/r_policies.rst +12 -0
  95. pygmo2/doc/r_policy.rst +6 -0
  96. pygmo2/doc/s_policies.rst +12 -0
  97. pygmo2/doc/s_policy.rst +6 -0
  98. pygmo2/doc/topologies.rst +27 -0
  99. pygmo2/doc/topology.rst +6 -0
  100. pygmo2/doc/tutorials/cec2006_gaco_benchmark.rst +143 -0
  101. pygmo2/doc/tutorials/cec2013_comp.rst +122 -0
  102. pygmo2/doc/tutorials/cmaes_vs_xnes.rst +103 -0
  103. pygmo2/doc/tutorials/coding_udi.rst +87 -0
  104. pygmo2/doc/tutorials/coding_udp_constrained.rst +233 -0
  105. pygmo2/doc/tutorials/coding_udp_minlp.rst +177 -0
  106. pygmo2/doc/tutorials/coding_udp_multi_objective.rst +72 -0
  107. pygmo2/doc/tutorials/coding_udp_simple.rst +274 -0
  108. pygmo2/doc/tutorials/evolving_a_population.rst +80 -0
  109. pygmo2/doc/tutorials/hypervolume.rst +186 -0
  110. pygmo2/doc/tutorials/hypervolume_advanced.rst +137 -0
  111. pygmo2/doc/tutorials/hypervolume_approx.rst +91 -0
  112. pygmo2/doc/tutorials/moo.rst +93 -0
  113. pygmo2/doc/tutorials/moo_moead.rst +94 -0
  114. pygmo2/doc/tutorials/nlopt_basics.rst +199 -0
  115. pygmo2/doc/tutorials/nspso_tutorial_zdt1_2.rst +134 -0
  116. pygmo2/doc/tutorials/solving_schwefel_20.rst +70 -0
  117. pygmo2/doc/tutorials/tutorials.rst +82 -0
  118. pygmo2/doc/tutorials/udp_meta_decorator.rst +236 -0
  119. pygmo2/doc/tutorials/using_algorithm.rst +68 -0
  120. pygmo2/doc/tutorials/using_archipelago.rst +230 -0
  121. pygmo2/doc/tutorials/using_island.rst +165 -0
  122. pygmo2/doc/tutorials/using_population.rst +154 -0
  123. pygmo2/doc/tutorials/using_problem.rst +93 -0
  124. pygmo2/doc/tutorials/zdt3_maco_benchmark.rst +353 -0
  125. pygmo2/pygmo/CMakeLists.txt +133 -0
  126. pygmo2/pygmo/__init__.py +771 -0
  127. pygmo2/pygmo/_algorithm_test.py +635 -0
  128. pygmo2/pygmo/_bfe_test.py +634 -0
  129. pygmo2/pygmo/_check_deps.py +21 -0
  130. pygmo2/pygmo/_ipyparallel_utils.py +16 -0
  131. pygmo2/pygmo/_island_test.py +700 -0
  132. pygmo2/pygmo/_mp_utils.py +67 -0
  133. pygmo2/pygmo/_patch_algorithm.py +83 -0
  134. pygmo2/pygmo/_patch_bfe.py +118 -0
  135. pygmo2/pygmo/_patch_island.py +83 -0
  136. pygmo2/pygmo/_patch_problem.py +85 -0
  137. pygmo2/pygmo/_patch_r_policy.py +65 -0
  138. pygmo2/pygmo/_patch_s_policy.py +65 -0
  139. pygmo2/pygmo/_patch_topology.py +85 -0
  140. pygmo2/pygmo/_problem_test.py +2014 -0
  141. pygmo2/pygmo/_py_algorithms.py +625 -0
  142. pygmo2/pygmo/_py_bfes.py +503 -0
  143. pygmo2/pygmo/_py_islands.py +641 -0
  144. pygmo2/pygmo/_py_problems.py +419 -0
  145. pygmo2/pygmo/_r_policy_test.py +305 -0
  146. pygmo2/pygmo/_s_policy_test.py +305 -0
  147. pygmo2/pygmo/_topology_test.py +479 -0
  148. pygmo2/pygmo/_version.py.in +9 -0
  149. pygmo2/pygmo/algorithm.cpp +165 -0
  150. pygmo2/pygmo/algorithm.hpp +80 -0
  151. pygmo2/pygmo/bfe.cpp +113 -0
  152. pygmo2/pygmo/bfe.hpp +77 -0
  153. pygmo2/pygmo/common_base.cpp +47 -0
  154. pygmo2/pygmo/common_base.hpp +44 -0
  155. pygmo2/pygmo/common_utils.cpp +343 -0
  156. pygmo2/pygmo/common_utils.hpp +241 -0
  157. pygmo2/pygmo/core.cpp +1112 -0
  158. pygmo2/pygmo/docstrings.cpp +7689 -0
  159. pygmo2/pygmo/docstrings.hpp +355 -0
  160. pygmo2/pygmo/expose_algorithms.hpp +138 -0
  161. pygmo2/pygmo/expose_algorithms_0.cpp +343 -0
  162. pygmo2/pygmo/expose_algorithms_1.cpp +308 -0
  163. pygmo2/pygmo/expose_bfes.cpp +92 -0
  164. pygmo2/pygmo/expose_bfes.hpp +53 -0
  165. pygmo2/pygmo/expose_islands.cpp +61 -0
  166. pygmo2/pygmo/expose_islands.hpp +58 -0
  167. pygmo2/pygmo/expose_problems.hpp +62 -0
  168. pygmo2/pygmo/expose_problems_0.cpp +200 -0
  169. pygmo2/pygmo/expose_problems_1.cpp +127 -0
  170. pygmo2/pygmo/expose_r_policies.cpp +69 -0
  171. pygmo2/pygmo/expose_r_policies.hpp +53 -0
  172. pygmo2/pygmo/expose_s_policies.cpp +69 -0
  173. pygmo2/pygmo/expose_s_policies.hpp +53 -0
  174. pygmo2/pygmo/expose_topologies.cpp +112 -0
  175. pygmo2/pygmo/expose_topologies.hpp +53 -0
  176. pygmo2/pygmo/handle_thread_py_exception.cpp +63 -0
  177. pygmo2/pygmo/handle_thread_py_exception.hpp +25 -0
  178. pygmo2/pygmo/island.cpp +158 -0
  179. pygmo2/pygmo/island.hpp +73 -0
  180. pygmo2/pygmo/plotting/CMakeLists.txt +9 -0
  181. pygmo2/pygmo/plotting/__init__.py +178 -0
  182. pygmo2/pygmo/problem.cpp +378 -0
  183. pygmo2/pygmo/problem.hpp +106 -0
  184. pygmo2/pygmo/r_policy.cpp +136 -0
  185. pygmo2/pygmo/r_policy.hpp +77 -0
  186. pygmo2/pygmo/s11n_wrappers.hpp +127 -0
  187. pygmo2/pygmo/s_policy.cpp +135 -0
  188. pygmo2/pygmo/s_policy.hpp +77 -0
  189. pygmo2/pygmo/sr_policy_add_rate_constructor.hpp +50 -0
  190. pygmo2/pygmo/test.py +3076 -0
  191. pygmo2/pygmo/topology.cpp +183 -0
  192. pygmo2/pygmo/topology.hpp +79 -0
  193. pygmo2/tools/circleci_additional_tests.py +57 -0
  194. pygmo2/tools/circleci_bionic_conda_pagmo_head_310.sh +49 -0
  195. pygmo2/tools/circleci_bionic_conda_pagmo_head_38.sh +49 -0
  196. pygmo2/tools/circleci_bionic_conda_pagmo_head_39.sh +45 -0
  197. pygmo2/tools/circleci_ubuntu_arm64.sh +47 -0
  198. pygmo2/tools/gha_deploydocs.sh +50 -0
  199. pygmo2/tools/gha_macos-10.15-py310.sh +42 -0
  200. pygmo2/tools/gha_manylinux.sh +97 -0
  201. pygmo2/tools/gha_windows.ps1 +42 -0
  202. pygmo2/tools/start_ip_cluster.ps1 +8 -0
  203. pygmo2/tools/travis_ubuntu_ppc64.sh +43 -0
  204. pygmo2/tools/wheel_setup.cfg +2 -0
  205. pygmo2/tools/wheel_setup.py +55 -0
@@ -0,0 +1,45 @@
1
+ version: 2.1
2
+
3
+ jobs:
4
+ bionic_conda_pagmo_head_38:
5
+ docker:
6
+ - image: circleci/buildpack-deps:bionic
7
+ steps:
8
+ - checkout
9
+ - run:
10
+ name: Build and test
11
+ command: bash ./tools/circleci_bionic_conda_pagmo_head_38.sh
12
+ bionic_conda_pagmo_head_310:
13
+ docker:
14
+ - image: circleci/buildpack-deps:bionic
15
+ steps:
16
+ - checkout
17
+ - run:
18
+ name: Build and test
19
+ command: bash ./tools/circleci_bionic_conda_pagmo_head_310.sh
20
+ bionic_conda_pagmo_head_39:
21
+ docker:
22
+ - image: circleci/buildpack-deps:bionic
23
+ steps:
24
+ - checkout
25
+ - run:
26
+ name: Build and test
27
+ command: bash ./tools/circleci_bionic_conda_pagmo_head_39.sh
28
+ ubuntu_arm64:
29
+ machine:
30
+ image: ubuntu-2004:202101-01
31
+ resource_class: arm.medium
32
+ steps:
33
+ - checkout
34
+ - run:
35
+ name: Build and test
36
+ command: bash ./tools/circleci_ubuntu_arm64.sh
37
+
38
+ workflows:
39
+ version: 2.1
40
+ all_builds:
41
+ jobs:
42
+ - bionic_conda_pagmo_head_38
43
+ - bionic_conda_pagmo_head_39
44
+ - bionic_conda_pagmo_head_310
45
+ - ubuntu_arm64
pygmo2/.clang-format ADDED
@@ -0,0 +1,61 @@
1
+ Language: Cpp
2
+ AccessModifierOffset: -4
3
+ AlignAfterOpenBracket: true
4
+ AlignConsecutiveAssignments: false
5
+ AlignEscapedNewlinesLeft: false
6
+ AlignOperands: true
7
+ AlignTrailingComments: true
8
+ AllowAllParametersOfDeclarationOnNextLine: true
9
+ AllowShortBlocksOnASingleLine: false
10
+ AllowShortCaseLabelsOnASingleLine: false
11
+ AllowShortFunctionsOnASingleLine: Empty
12
+ AllowShortIfStatementsOnASingleLine: false
13
+ AllowShortLoopsOnASingleLine: false
14
+ AlwaysBreakAfterDefinitionReturnType: None
15
+ AlwaysBreakBeforeMultilineStrings: false
16
+ AlwaysBreakTemplateDeclarations: true
17
+ BinPackArguments: true
18
+ BinPackParameters: true
19
+ BreakBeforeBinaryOperators: All
20
+ BreakBeforeBraces: Linux
21
+ BreakBeforeTernaryOperators: true
22
+ BreakConstructorInitializersBeforeComma: false
23
+ ColumnLimit: 120
24
+ ConstructorInitializerAllOnOneLineOrOnePerLine: false
25
+ ConstructorInitializerIndentWidth: 4
26
+ ContinuationIndentWidth: 4
27
+ Cpp11BracedListStyle: true
28
+ DerivePointerAlignment: false
29
+ DisableFormat: false
30
+ ExperimentalAutoDetectBinPacking: false
31
+ IndentCaseLabels: true
32
+ IndentWidth: 4
33
+ IndentWrappedFunctionNames: false
34
+ KeepEmptyLinesAtTheStartOfBlocks: true
35
+ MacroBlockBegin: ''
36
+ MacroBlockEnd: ''
37
+ MaxEmptyLinesToKeep: 1
38
+ NamespaceIndentation: None
39
+ ObjCBlockIndentWidth: 2
40
+ ObjCSpaceAfterProperty: false
41
+ ObjCSpaceBeforeProtocolList: true
42
+ PenaltyBreakBeforeFirstCallParameter: 19
43
+ PenaltyBreakComment: 22312
44
+ PenaltyBreakFirstLessLess: 120
45
+ PenaltyBreakString: 2123
46
+ PenaltyExcessCharacter: 1000000
47
+ PenaltyReturnTypeOnItsOwnLine: 60
48
+ PointerAlignment: Right
49
+ SpaceAfterCStyleCast: false
50
+ SpaceBeforeAssignmentOperators: true
51
+ SpaceBeforeParens: ControlStatements
52
+ SpaceInEmptyParentheses: false
53
+ SpacesBeforeTrailingComments: 1
54
+ SpacesInAngles: false
55
+ SpacesInContainerLiterals: false
56
+ SpacesInCStyleCastParentheses: false
57
+ SpacesInParentheses: false
58
+ SpacesInSquareBrackets: false
59
+ Standard: Cpp11
60
+ TabWidth: 4
61
+ UseTab: Never
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: "[BUG]"
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Screenshots**
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ **Environment (please complete the following information):**
27
+ - OS: [e.g. Linux]
28
+ - Installation method: [e.g. conda, pip, source]
29
+ - Version: [e.g. 2.15]
30
+
31
+ **Additional context**
32
+ Add any other context about the problem here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: "[FEATURE]"
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,100 @@
1
+ # This is a basic workflow to help you get started with Actions
2
+
3
+ name: CI
4
+
5
+ # Controls when the workflow will run
6
+ on:
7
+ # Triggers the workflow on push or pull request events but only for the master branch
8
+ push:
9
+ branches: [ master ]
10
+ pull_request:
11
+ branches: [ master ]
12
+
13
+ # Allows you to run this workflow manually from the Actions tab
14
+ workflow_dispatch:
15
+
16
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
17
+ jobs:
18
+ manylinux228-py311:
19
+ runs-on: ubuntu-latest
20
+ container:
21
+ image: pagmo2/manylinux228_x86_64_with_deps:latest
22
+ env:
23
+ PYGMO_BUILD_TYPE: "Python311"
24
+ TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
25
+ TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
26
+ steps:
27
+ - uses: actions/checkout@v2
28
+ - name: Build
29
+ run: bash tools/gha_manylinux.sh
30
+ manylinux228-py310:
31
+ runs-on: ubuntu-latest
32
+ container:
33
+ image: pagmo2/manylinux228_x86_64_with_deps:latest
34
+ env:
35
+ PYGMO_BUILD_TYPE: "Python310"
36
+ TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
37
+ TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
38
+ steps:
39
+ - uses: actions/checkout@v2
40
+ - name: Build
41
+ run: bash tools/gha_manylinux.sh
42
+ manylinux228-py39:
43
+ runs-on: ubuntu-latest
44
+ container:
45
+ image: pagmo2/manylinux228_x86_64_with_deps:latest
46
+ env:
47
+ PYGMO_BUILD_TYPE: "Python39"
48
+ TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
49
+ TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
50
+ steps:
51
+ - uses: actions/checkout@v2
52
+ - name: Build
53
+ run: bash tools/gha_manylinux.sh
54
+ manylinux228-py38:
55
+ runs-on: ubuntu-latest
56
+ container:
57
+ image: pagmo2/manylinux228_x86_64_with_deps:latest
58
+ env:
59
+ PYGMO_BUILD_TYPE: "Python38"
60
+ TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
61
+ TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
62
+ steps:
63
+ - uses: actions/checkout@v2
64
+ - name: Build
65
+ run: bash tools/gha_manylinux.sh
66
+ macos-10_15-py310:
67
+ runs-on: macos-10.15
68
+ steps:
69
+ - uses: actions/checkout@v2
70
+ - name: Build
71
+ run: bash tools/gha_macos-10.15-py310.sh
72
+ windows-2019-py311:
73
+ runs-on: windows-2019
74
+ steps:
75
+ - uses: actions/checkout@v2
76
+ - name: Add msbuild to PATH
77
+ uses: microsoft/setup-msbuild@v1.0.2
78
+ - uses: conda-incubator/setup-miniconda@v2
79
+ with:
80
+ auto-update-conda: true
81
+ python-version: 3.11
82
+ channels: conda-forge
83
+ channel-priority: strict
84
+ - name: Build
85
+ run: .\tools\gha_windows.ps1
86
+ shell: powershell
87
+ build-and-deploydocs:
88
+ if: ${{ github.event_name }} == 'push'
89
+ runs-on: ubuntu-latest
90
+ steps:
91
+ - uses: actions/checkout@v2
92
+ - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
93
+ run: bash tools/gha_deploydocs.sh
94
+ - name: Upload to github pages 🚀
95
+ if: ${{ github.event_name == 'push' }}
96
+ uses: JamesIves/github-pages-deploy-action@v4
97
+ with:
98
+ folder: doc/_build/html # The folder the action should deploy.
99
+
100
+
pygmo2/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ # Build dirs.
2
+ build*
3
+
4
+ # Temp files.
5
+ *~
6
+ *.bak
7
+ *.ipynb_checkpoints*
8
+ *__pycache__*
9
+
10
+ # Editor files
11
+ *.vscode*
12
+
13
+ # .orig files from patch.
14
+ *.orig
15
+
16
+ # Docs.
17
+ doc/conf.py
18
+ doc/_build
19
+
20
+ # clangd bits.
21
+ .cache
pygmo2/.travis.yml ADDED
@@ -0,0 +1,19 @@
1
+ language: cpp
2
+
3
+ # Do not build branches of the form "pr/*". By prefixing pull requests coming
4
+ # from branches inside the repository with pr/, this avoids building both the
5
+ # branch push _and_ the pull request.
6
+ branches:
7
+ except: /pr\/.*/
8
+
9
+ env:
10
+ matrix:
11
+ - env: PYGMO_BUILD_TYPE="ppc64"
12
+ os: linux
13
+ arch: ppc64le
14
+ dist: focal
15
+ script:
16
+ - if [[ "${PYGMO_BUILD_TYPE}" == ppc64 ]]; then bash tools/travis_ubuntu_ppc64.sh; fi
17
+
18
+ notifications:
19
+ email: false
pygmo2/CMakeLists.txt ADDED
@@ -0,0 +1,159 @@
1
+ # NOTE: FindPython3 supported since CMake 3.12.0, but we use
2
+ # options that appear in 3.18.
3
+ cmake_minimum_required(VERSION 3.18.0)
4
+
5
+ # Set default build type to "Release".
6
+ # NOTE: this should be done before the project command since the latter can set
7
+ # CMAKE_BUILD_TYPE itself (it does so for nmake).
8
+ if(NOT CMAKE_BUILD_TYPE)
9
+ set(CMAKE_BUILD_TYPE Release CACHE STRING
10
+ "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
11
+ FORCE)
12
+ endif()
13
+
14
+ project(pygmo VERSION 2.19.0 LANGUAGES CXX C)
15
+
16
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/yacma")
17
+
18
+ message(STATUS "System name: ${CMAKE_SYSTEM_NAME}")
19
+ message(STATUS "pygmo version: ${pygmo_VERSION}")
20
+
21
+ option(PYGMO_ENABLE_IPO "Enable IPO (requires compiler support)." OFF)
22
+ mark_as_advanced(PYGMO_ENABLE_IPO)
23
+
24
+ # Run the YACMA compiler setup.
25
+ include(YACMACompilerLinkerSettings)
26
+
27
+ # Assemble the flags.
28
+ set(PYGMO_CXX_FLAGS_DEBUG ${YACMA_CXX_FLAGS} ${YACMA_CXX_FLAGS_DEBUG})
29
+ set(PYGMO_CXX_FLAGS_RELEASE ${YACMA_CXX_FLAGS})
30
+
31
+ if(YACMA_COMPILER_IS_MSVC)
32
+ include(CheckCXXCompilerFlag)
33
+ # Disable the idiotic minmax macros on MSVC (both cl and clang-cl).
34
+ # Also, enable the bigobj flag and the WIN32_LEAN_AND_MEAN definitions:
35
+ # https://stackoverflow.com/questions/11040133/what-does-defining-win32-lean-and-mean-exclude-exactly
36
+ list(APPEND PYGMO_CXX_FLAGS_DEBUG "-DNOMINMAX" "/bigobj" "-DWIN32_LEAN_AND_MEAN")
37
+ list(APPEND PYGMO_CXX_FLAGS_RELEASE "-DNOMINMAX" "/bigobj" "-DWIN32_LEAN_AND_MEAN")
38
+ # Enable strict conformance mode, if supported.
39
+ set(CMAKE_REQUIRED_QUIET TRUE)
40
+ check_cxx_compiler_flag("/permissive-" _PYGMO_MSVC_SUPPORTS_STRICT_CONFORMANCE)
41
+ unset(CMAKE_REQUIRED_QUIET)
42
+ if(_PYGMO_MSVC_SUPPORTS_STRICT_CONFORMANCE)
43
+ message(STATUS "The '/permissive-' flag is supported, enabling it.")
44
+ list(APPEND PYGMO_CXX_FLAGS_DEBUG "/permissive-")
45
+ list(APPEND PYGMO_CXX_FLAGS_RELEASE "/permissive-")
46
+ endif()
47
+ unset(_PYGMO_MSVC_SUPPORTS_STRICT_CONFORMANCE)
48
+ if(YACMA_COMPILER_IS_CLANGXX)
49
+ # clang-cl emits various warnings from third party deps, let's just silence them.
50
+ # NOTE: at one point in the recent past, MSVC added an options similar to GCC's isystem:
51
+ # https://blogs.msdn.microsoft.com/vcblog/2017/12/13/broken-warnings-theory/
52
+ # We probably just need to wait for this to be picked up by CMake/clang-cl. Let's
53
+ # revisit the issue in the future.
54
+ list(APPEND _PYGMO_CLANG_CL_DISABLED_WARNINGS
55
+ "-Wno-unused-variable"
56
+ "-Wno-inconsistent-dllimport"
57
+ "-Wno-unknown-pragmas"
58
+ "-Wno-unused-parameter"
59
+ "-Wno-sign-compare"
60
+ "-Wno-deprecated-declarations"
61
+ "-Wno-deprecated-dynamic-exception-spec"
62
+ "-Wno-old-style-cast"
63
+ "-Wno-sign-conversion"
64
+ "-Wno-non-virtual-dtor"
65
+ "-Wno-deprecated"
66
+ "-Wno-shadow"
67
+ "-Wno-shorten-64-to-32"
68
+ "-Wno-reserved-id-macro"
69
+ "-Wno-undef"
70
+ "-Wno-c++98-compat-pedantic"
71
+ "-Wno-documentation-unknown-command"
72
+ "-Wno-zero-as-null-pointer-constant"
73
+ "-Wno-language-extension-token"
74
+ "-Wno-gnu-anonymous-struct"
75
+ "-Wno-nested-anon-types"
76
+ "-Wno-documentation"
77
+ "-Wno-comma"
78
+ "-Wno-nonportable-system-include-path"
79
+ "-Wno-global-constructors"
80
+ "-Wno-redundant-parens"
81
+ "-Wno-exit-time-destructors"
82
+ "-Wno-missing-noreturn"
83
+ "-Wno-switch-enum"
84
+ "-Wno-covered-switch-default"
85
+ "-Wno-float-equal"
86
+ "-Wno-double-promotion"
87
+ "-Wno-microsoft-enum-value"
88
+ "-Wno-missing-prototypes"
89
+ "-Wno-implicit-fallthrough"
90
+ "-Wno-format-nonliteral"
91
+ "-Wno-cast-qual"
92
+ "-Wno-disabled-macro-expansion"
93
+ "-Wno-unused-private-field"
94
+ "-Wno-unused-template"
95
+ "-Wno-unused-macros"
96
+ "-Wno-extra-semi-stmt"
97
+ "-Wno-c++98-compat")
98
+ list(APPEND PYGMO_CXX_FLAGS_DEBUG ${_PYGMO_CLANG_CL_DISABLED_WARNINGS})
99
+ list(APPEND PYGMO_CXX_FLAGS_RELEASE ${_PYGMO_CLANG_CL_DISABLED_WARNINGS})
100
+ unset(_PYGMO_CLANG_CL_DISABLED_WARNINGS)
101
+ else()
102
+ # Problematic MSVC cl warnings.
103
+ list(APPEND PYGMO_CXX_FLAGS_DEBUG "/wd4459" "/wd4251")
104
+ list(APPEND PYGMO_CXX_FLAGS_RELEASE "/wd4459" "/wd4251")
105
+ endif()
106
+ endif()
107
+ if(MINGW)
108
+ # In MinGW some tests generate big object files.
109
+ message(STATUS "Enabling the '-Wa,-mbig-obj' flag for MinGW.")
110
+ list(APPEND PYGMO_CXX_FLAGS_DEBUG "-Wa,-mbig-obj")
111
+ list(APPEND PYGMO_CXX_FLAGS_RELEASE "-Wa,-mbig-obj")
112
+ endif()
113
+ # NOTE: at least up to version 7, GCC is needlessly chatty
114
+ # about the 'override' attribute. Thus, we manually disable
115
+ # the -Wsuggest-override debug flag.
116
+ if(YACMA_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8")
117
+ include(CheckCXXCompilerFlag)
118
+ set(CMAKE_REQUIRED_QUIET TRUE)
119
+ check_cxx_compiler_flag("-Wno-suggest-override" _PYGMO_GCC_SUPPORTS_NO_OVERRIDE)
120
+ unset(CMAKE_REQUIRED_QUIET)
121
+ if(_PYGMO_GCC_SUPPORTS_NO_OVERRIDE)
122
+ message(STATUS "Enabling the '-Wno-suggest-override' flag for GCC<8.")
123
+ list(APPEND PYGMO_CXX_FLAGS_DEBUG "-Wno-suggest-override")
124
+ endif()
125
+ unset(_PYGMO_GCC_SUPPORTS_NO_OVERRIDE)
126
+ endif()
127
+
128
+ # Find the dependencies.
129
+
130
+ # pagmo.
131
+ # NOTE: put the minimum version in a variable
132
+ # so that we can re-use it below.
133
+ set (_PYGMO_MIN_PAGMO_VERSION 2.19.0)
134
+ find_package(pagmo REQUIRED)
135
+ if(${pagmo_VERSION} VERSION_LESS ${_PYGMO_MIN_PAGMO_VERSION})
136
+ message(FATAL_ERROR "The minimum pagmo version required by pygmo is ${_PYGMO_MIN_PAGMO_VERSION}, but version ${pagmo_VERSION} was found instead.")
137
+ endif()
138
+
139
+ # python.
140
+ find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
141
+ message(STATUS "Python3 interpreter: ${Python3_EXECUTABLE}")
142
+ message(STATUS "Python3 installation directory: ${Python3_SITEARCH}")
143
+ set(PYGMO_INSTALL_PATH "" CACHE STRING "pygmo module installation path")
144
+ mark_as_advanced(PYGMO_INSTALL_PATH)
145
+
146
+ # Boost setup.
147
+ include(PygmoFindBoost)
148
+
149
+ # pybind11.
150
+ find_package(pybind11 REQUIRED)
151
+ if(${pybind11_VERSION} VERSION_LESS "2.10")
152
+ message(FATAL_ERROR "pybind11 >= 2.10 is required, but version ${pybind11_VERSION} was found instead.")
153
+ endif()
154
+
155
+ # Configure the sphinx config file.
156
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/conf.py.in" "${CMAKE_CURRENT_SOURCE_DIR}/doc/conf.py" @ONLY)
157
+
158
+ # Add the module directory.
159
+ add_subdirectory(pygmo)