capytaine 1.5.post1__tar.gz → 2.1__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 (223) hide show
  1. capytaine-2.1/.github/workflows/build_docs.yml +46 -0
  2. capytaine-2.1/.github/workflows/build_wheels.yaml +45 -0
  3. capytaine-2.1/.github/workflows/test_new_commits.yaml +44 -0
  4. capytaine-2.1/.github/workflows/test_with_latest_dependencies.yaml +35 -0
  5. capytaine-2.1/.gitignore +153 -0
  6. capytaine-2.1/.pre-commit-config.yaml +40 -0
  7. capytaine-2.1/.zenodo.json +15 -0
  8. capytaine-2.1/CONTRIBUTING.md +51 -0
  9. capytaine-2.1/Dockerfile +13 -0
  10. capytaine-2.1/Makefile +30 -0
  11. capytaine-2.1/PKG-INFO +756 -0
  12. capytaine-2.1/README.md +46 -0
  13. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/__about__.py +6 -2
  14. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/__init__.py +6 -4
  15. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/bem/airy_waves.py +40 -28
  16. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/bem/engines.py +177 -35
  17. capytaine-2.1/capytaine/bem/problems_and_results.py +540 -0
  18. capytaine-2.1/capytaine/bem/solver.py +463 -0
  19. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/bodies/__init__.py +1 -1
  20. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/bodies/bodies.py +106 -46
  21. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/bodies/dofs.py +6 -0
  22. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/bodies/predefined/__init__.py +0 -2
  23. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/bodies/predefined/cylinders.py +0 -2
  24. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/bodies/predefined/rectangles.py +0 -2
  25. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/bodies/predefined/spheres.py +0 -2
  26. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/green_functions/abstract_green_function.py +0 -3
  27. capytaine-2.1/capytaine/green_functions/delhommeau.py +380 -0
  28. capytaine-2.1/capytaine/green_functions/libDelhommeau/.gitignore +6 -0
  29. capytaine-2.1/capytaine/green_functions/libDelhommeau/LICENSE +202 -0
  30. capytaine-2.1/capytaine/green_functions/libDelhommeau/Makefile +124 -0
  31. capytaine-2.1/capytaine/green_functions/libDelhommeau/README.md +15 -0
  32. capytaine-2.1/capytaine/green_functions/libDelhommeau/benchmarks/openmp/benchmark_omp.f90 +212 -0
  33. capytaine-2.1/capytaine/green_functions/libDelhommeau/benchmarks/openmp/display_mesh.py +7 -0
  34. capytaine-2.1/capytaine/green_functions/libDelhommeau/benchmarks/openmp/read_output.py +82 -0
  35. capytaine-2.1/capytaine/green_functions/libDelhommeau/benchmarks/profiling/benchmark_profiling.f90 +201 -0
  36. capytaine-2.1/capytaine/green_functions/libDelhommeau/benchmarks/tabulations/benchmark_tabulation.f90 +87 -0
  37. capytaine-2.1/capytaine/green_functions/libDelhommeau/examples/minimal/minimal_example.f90 +213 -0
  38. capytaine-2.1/capytaine/green_functions/libDelhommeau/examples/minimal/minimal_example.py +60 -0
  39. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/Delhommeau_integrals.f90 +104 -27
  40. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/Green_Rankine.f90 +4 -2
  41. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/Green_wave.f90 +42 -35
  42. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/matrices.f90 +99 -28
  43. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/old_Prony_decomposition.f90 +2 -2
  44. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/io/bemio.py +18 -18
  45. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/io/legacy.py +91 -11
  46. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/io/mesh_loaders.py +61 -5
  47. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/io/mesh_writers.py +44 -4
  48. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/io/xarray.py +151 -82
  49. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/matrices/__init__.py +0 -2
  50. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/matrices/block.py +28 -4
  51. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/matrices/block_toeplitz.py +0 -2
  52. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/matrices/builders.py +2 -4
  53. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/matrices/linear_solvers.py +84 -6
  54. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/matrices/low_rank.py +2 -4
  55. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/meshes/__init__.py +0 -2
  56. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/meshes/clipper.py +2 -5
  57. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/meshes/collections.py +40 -32
  58. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/meshes/geometry.py +36 -4
  59. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/meshes/meshes.py +56 -199
  60. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/meshes/predefined/__init__.py +0 -1
  61. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/meshes/predefined/cylinders.py +46 -5
  62. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/meshes/predefined/rectangles.py +43 -10
  63. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/meshes/predefined/spheres.py +15 -4
  64. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/meshes/properties.py +23 -7
  65. capytaine-2.1/capytaine/meshes/quadratures.py +80 -0
  66. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/meshes/quality.py +7 -7
  67. capytaine-2.1/capytaine/meshes/surface_integrals.py +63 -0
  68. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/meshes/symmetric.py +55 -14
  69. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/post_pro/free_surfaces.py +4 -7
  70. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/post_pro/impedance.py +21 -19
  71. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/post_pro/kochin.py +6 -4
  72. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/post_pro/rao.py +16 -17
  73. capytaine-2.1/capytaine/tools/cache_on_disk.py +24 -0
  74. capytaine-2.1/capytaine/tools/deprecation_handling.py +18 -0
  75. capytaine-2.1/capytaine/tools/lists_of_points.py +52 -0
  76. capytaine-2.1/capytaine/tools/lru_cache.py +49 -0
  77. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/tools/optional_imports.py +0 -2
  78. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/tools/prony_decomposition.py +0 -3
  79. capytaine-2.1/capytaine/tools/symbolic_multiplication.py +104 -0
  80. capytaine-2.1/capytaine/ui/__init__.py +0 -0
  81. capytaine-2.1/capytaine/ui/cli.py +28 -0
  82. capytaine-2.1/capytaine/ui/rich.py +5 -0
  83. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/ui/vtk/__init__.py +0 -3
  84. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/ui/vtk/animation.py +30 -55
  85. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/ui/vtk/body_viewer.py +0 -2
  86. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/ui/vtk/helpers.py +0 -3
  87. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/ui/vtk/mesh_viewer.py +0 -3
  88. capytaine-2.1/capytaine.scm +61 -0
  89. capytaine-2.1/docs/Makefile +31 -0
  90. capytaine-2.1/docs/_static/custom.css +18 -0
  91. capytaine-2.1/docs/_static/proof.css +34 -0
  92. capytaine-2.1/docs/_static/proof.js +8 -0
  93. capytaine-2.1/docs/_templates/layout.html +6 -0
  94. capytaine-2.1/docs/changelog.rst +754 -0
  95. capytaine-2.1/docs/citing.rst +61 -0
  96. capytaine-2.1/docs/conf.py +206 -0
  97. capytaine-2.1/docs/developer_manual/index.rst +10 -0
  98. capytaine-2.1/docs/developer_manual/installation.rst +190 -0
  99. capytaine-2.1/docs/developer_manual/overview.rst +154 -0
  100. capytaine-2.1/docs/features.rst +59 -0
  101. capytaine-2.1/docs/index.rst +93 -0
  102. capytaine-2.1/docs/theory_manual/bibliography.rst +26 -0
  103. capytaine-2.1/docs/theory_manual/index.rst +11 -0
  104. capytaine-2.1/docs/theory_manual/theory.rst +717 -0
  105. capytaine-2.1/docs/user_manual/conventions.rst +109 -0
  106. capytaine-2.1/docs/user_manual/cookbook.rst +155 -0
  107. capytaine-2.1/docs/user_manual/examples/Malenica_forward_speed.py +76 -0
  108. capytaine-2.1/docs/user_manual/examples/Nemoh.cal +30 -0
  109. capytaine-2.1/docs/user_manual/examples/animate_free_surface.py +46 -0
  110. capytaine-2.1/docs/user_manual/examples/axisymmetric_buoy.py +48 -0
  111. capytaine-2.1/docs/user_manual/examples/boat_200.mar +770 -0
  112. capytaine-2.1/docs/user_manual/examples/boat_animation.py +61 -0
  113. capytaine-2.1/docs/user_manual/examples/compare_Green_functions.py +33 -0
  114. capytaine-2.1/docs/user_manual/examples/convergence_study.py +42 -0
  115. capytaine-2.1/docs/user_manual/examples/custom_Green_function.py +62 -0
  116. capytaine-2.1/docs/user_manual/examples/custom_dofs.py +52 -0
  117. capytaine-2.1/docs/user_manual/examples/elasticity_of_beam.py +77 -0
  118. capytaine-2.1/docs/user_manual/examples/finite_depth_cylinder.py +52 -0
  119. capytaine-2.1/docs/user_manual/examples/free_surface_elevation.py +22 -0
  120. capytaine-2.1/docs/user_manual/examples/haskind.py +64 -0
  121. capytaine-2.1/docs/user_manual/examples/hydrostatics.py +65 -0
  122. capytaine-2.1/docs/user_manual/examples/kochin.py +39 -0
  123. capytaine-2.1/docs/user_manual/examples/multibody.py +47 -0
  124. capytaine-2.1/docs/user_manual/examples/plot_influence_matrix.py +30 -0
  125. capytaine-2.1/docs/user_manual/examples/plot_velocity_in_domain.py +38 -0
  126. capytaine-2.1/docs/user_manual/examples/preconditioner.py +89 -0
  127. capytaine-2.1/docs/user_manual/examples/quickstart.py +32 -0
  128. capytaine-2.1/docs/user_manual/examples/radiation_cylinder.py +54 -0
  129. capytaine-2.1/docs/user_manual/examples/symmetric_body.py +24 -0
  130. capytaine-2.1/docs/user_manual/hydrostatics.rst +153 -0
  131. capytaine-2.1/docs/user_manual/index.rst +18 -0
  132. capytaine-2.1/docs/user_manual/installation.rst +152 -0
  133. capytaine-2.1/docs/user_manual/mesh.rst +296 -0
  134. capytaine-2.1/docs/user_manual/outputs.rst +178 -0
  135. capytaine-2.1/docs/user_manual/post_pro.rst +120 -0
  136. capytaine-2.1/docs/user_manual/problem_setup.rst +157 -0
  137. capytaine-2.1/docs/user_manual/quickstart.rst +15 -0
  138. capytaine-2.1/docs/user_manual/resolution.rst +202 -0
  139. capytaine-2.1/docs/user_manual/tutorial.rst +271 -0
  140. capytaine-2.1/meson.build +107 -0
  141. capytaine-2.1/noxfile.py +55 -0
  142. capytaine-2.1/pyproject.toml +48 -0
  143. capytaine-2.1/pytest/Bemio_verification_cases/sphere.out +7845 -0
  144. capytaine-2.1/pytest/Hydrostatics_cases/sphere__hor_cyl__ver_cyl.pkl.json +1 -0
  145. capytaine-2.1/pytest/Nemoh_verification_cases/Cylinder/Cylinder.dat +843 -0
  146. capytaine-2.1/pytest/Nemoh_verification_cases/Cylinder/Nemoh.cal +34 -0
  147. capytaine-2.1/pytest/Nemoh_verification_cases/Cylinder/Nemoh_v3.cal +37 -0
  148. capytaine-2.1/pytest/Nemoh_verification_cases/Cylinder/reference_results/DiffractionForce.tec +10 -0
  149. capytaine-2.1/pytest/Nemoh_verification_cases/Cylinder/reference_results/ExcitationForce.tec +10 -0
  150. capytaine-2.1/pytest/Nemoh_verification_cases/Cylinder/reference_results/RadiationCoefficients.tec +25 -0
  151. capytaine-2.1/pytest/Nemoh_verification_cases/Nemoh.m +121 -0
  152. capytaine-2.1/pytest/Nemoh_verification_cases/NonSymmetrical/Nemoh.cal +34 -0
  153. capytaine-2.1/pytest/Nemoh_verification_cases/NonSymmetrical/Nemoh_v3.cal +37 -0
  154. capytaine-2.1/pytest/Nemoh_verification_cases/NonSymmetrical/NonSymmetrical.dat +634 -0
  155. capytaine-2.1/pytest/Nemoh_verification_cases/NonSymmetrical/reference_results/DiffractionForce.tec +49 -0
  156. capytaine-2.1/pytest/Nemoh_verification_cases/NonSymmetrical/reference_results/ExcitationForce.tec +49 -0
  157. capytaine-2.1/pytest/Nemoh_verification_cases/NonSymmetrical/reference_results/RadiationCoefficients.tec +259 -0
  158. capytaine-2.1/pytest/envs/2023-11-07.lock +1132 -0
  159. capytaine-2.1/pytest/io_legacy_cases/reference_data/single_body/Hydrostatics.dat +4 -0
  160. capytaine-2.1/pytest/io_legacy_cases/reference_data/single_body/KH.dat +6 -0
  161. capytaine-2.1/pytest/io_legacy_cases/reference_data/single_body_list/Hydrostatics.dat +4 -0
  162. capytaine-2.1/pytest/io_legacy_cases/reference_data/single_body_list/KH.dat +6 -0
  163. capytaine-2.1/pytest/io_legacy_cases/reference_data/two_bodies_list/Hydrostatics_0.dat +4 -0
  164. capytaine-2.1/pytest/io_legacy_cases/reference_data/two_bodies_list/Hydrostatics_1.dat +4 -0
  165. capytaine-2.1/pytest/io_legacy_cases/reference_data/two_bodies_list/KH_0.dat +6 -0
  166. capytaine-2.1/pytest/io_legacy_cases/reference_data/two_bodies_list/KH_1.dat +6 -0
  167. capytaine-2.1/pytest/mesh_files_examples/barge.med +0 -0
  168. capytaine-2.1/pytest/test_airy_waves.py +19 -0
  169. capytaine-2.1/pytest/test_bem_engines.py +139 -0
  170. capytaine-2.1/pytest/test_bem_green_functions.py +140 -0
  171. capytaine-2.1/pytest/test_bem_green_functions_table_density.py +108 -0
  172. capytaine-2.1/pytest/test_bem_hierarchical_toeplitz_matrices.py +223 -0
  173. capytaine-2.1/pytest/test_bem_linear_combination_of_dofs.py +58 -0
  174. capytaine-2.1/pytest/test_bem_potential_velocity_and_free_surface_elevation.py +265 -0
  175. capytaine-2.1/pytest/test_bem_problems_and_results.py +329 -0
  176. capytaine-2.1/pytest/test_bem_solver.py +153 -0
  177. capytaine-2.1/pytest/test_bem_with_quadratures.py +76 -0
  178. capytaine-2.1/pytest/test_bodies.py +276 -0
  179. capytaine-2.1/pytest/test_bodies_predefined.py +181 -0
  180. capytaine-2.1/pytest/test_consistency_with_Nemoh_2.py +236 -0
  181. capytaine-2.1/pytest/test_forward_speed.py +223 -0
  182. capytaine-2.1/pytest/test_hydrostatics.py +459 -0
  183. capytaine-2.1/pytest/test_io.py +143 -0
  184. capytaine-2.1/pytest/test_io_meshes.py +365 -0
  185. capytaine-2.1/pytest/test_linear_solvers.py +172 -0
  186. capytaine-2.1/pytest/test_matrices.py +518 -0
  187. capytaine-2.1/pytest/test_meshes.py +223 -0
  188. capytaine-2.1/pytest/test_meshes_collections_and_symmetries.py +141 -0
  189. capytaine-2.1/pytest/test_meshes_geometry.py +136 -0
  190. capytaine-2.1/pytest/test_meshes_predefined.py +243 -0
  191. capytaine-2.1/pytest/test_post_pro.py +106 -0
  192. capytaine-2.1/pytest/test_post_pro_kochin.py +115 -0
  193. capytaine-2.1/pytest/test_tool_lru_cache.py +107 -0
  194. capytaine-2.1/pytest/test_tool_symbolic_multiplication.py +102 -0
  195. capytaine-2.1/pytest/test_ui_matplotlib.py +34 -0
  196. capytaine-2.1/pytest/test_ui_vtk.py +29 -0
  197. capytaine-1.5.post1/PKG-INFO +0 -11
  198. capytaine-1.5.post1/README.md +0 -33
  199. capytaine-1.5.post1/capytaine/bem/problems_and_results.py +0 -408
  200. capytaine-1.5.post1/capytaine/bem/solver.py +0 -278
  201. capytaine-1.5.post1/capytaine/green_functions/delhommeau.py +0 -235
  202. capytaine-1.5.post1/capytaine/meshes/surface_integrals.py +0 -156
  203. capytaine-1.5.post1/capytaine/tools/lru_cache.py +0 -55
  204. capytaine-1.5.post1/capytaine/ui/cli.py +0 -48
  205. capytaine-1.5.post1/capytaine.egg-info/PKG-INFO +0 -11
  206. capytaine-1.5.post1/capytaine.egg-info/SOURCES.txt +0 -76
  207. capytaine-1.5.post1/capytaine.egg-info/dependency_links.txt +0 -1
  208. capytaine-1.5.post1/capytaine.egg-info/entry_points.txt +0 -2
  209. capytaine-1.5.post1/capytaine.egg-info/requires.txt +0 -33
  210. capytaine-1.5.post1/capytaine.egg-info/top_level.txt +0 -1
  211. capytaine-1.5.post1/setup.cfg +0 -4
  212. capytaine-1.5.post1/setup.py +0 -128
  213. {capytaine-1.5.post1 → capytaine-2.1}/LICENSE +0 -0
  214. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/bem/__init__.py +0 -0
  215. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/green_functions/__init__.py +0 -0
  216. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/constants.f90 +0 -0
  217. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/float32.f90 +0 -0
  218. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/green_functions/libDelhommeau/src/float64.f90 +0 -0
  219. {capytaine-1.5.post1/capytaine/io → capytaine-2.1/capytaine/green_functions/libs}/__init__.py +0 -0
  220. {capytaine-1.5.post1/capytaine/tools → capytaine-2.1/capytaine/io}/__init__.py +0 -0
  221. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/io/meshio.py +0 -0
  222. {capytaine-1.5.post1 → capytaine-2.1}/capytaine/post_pro/__init__.py +0 -0
  223. {capytaine-1.5.post1/capytaine/ui → capytaine-2.1/capytaine/tools}/__init__.py +0 -0
@@ -0,0 +1,46 @@
1
+ name: Build and deploy documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ paths:
8
+ - 'docs/**'
9
+
10
+ pull_request:
11
+ paths:
12
+ - 'docs/**'
13
+
14
+ workflow_dispatch:
15
+
16
+
17
+ jobs:
18
+ build:
19
+
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+
24
+ - name: Checkout
25
+ uses: actions/checkout@v4
26
+
27
+ - uses: actions/setup-python@v5
28
+ with:
29
+ python-version: '3.12'
30
+
31
+ - name: Install Capytaine and other dependencies
32
+ run: pip install .[optional,docs]
33
+
34
+ - name: Build documentation
35
+ run: cd docs && make
36
+
37
+ - name: Deploy pages
38
+ if: github.ref == 'refs/heads/master' # Only deploy the version merged into the master branch
39
+ uses: JamesIves/github-pages-deploy-action@releases/v4
40
+ with:
41
+ folder: ./docs/_build/html/
42
+ repository-name: capytaine/capytaine.github.io
43
+ branch: main
44
+ target-folder: master/
45
+ clean: true
46
+ token: ${{ secrets.TOKEN_PAGES }}
@@ -0,0 +1,45 @@
1
+ name: Build wheels
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ tags:
7
+ - v*
8
+ schedule:
9
+ - cron: '5 5 5/15 * *' # On the 5th and 20th of each month at 5:05
10
+
11
+
12
+ jobs:
13
+ build_wheels:
14
+ name: Build wheels on ${{ matrix.os }}
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ matrix:
18
+ os: [ubuntu-20.04, macos-11, windows-2019]
19
+
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - uses: fortran-lang/setup-fortran@v1
24
+ id: setup-fortran
25
+ with:
26
+ compiler: 'gcc'
27
+ version: '13'
28
+
29
+ - name: Build wheels
30
+ uses: pypa/cibuildwheel@v2.17.0
31
+ env:
32
+ CIBW_SKIP: "pp* *i686* *musllinux* *win32*"
33
+ # Package the DLL dependencies in the wheel for windows (done by default for the other platforms).
34
+ # delvewheel cannot mangle the libraries, stripping does not work.
35
+ CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel
36
+ CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel show {wheel} && delvewheel repair -w {dest_dir} {wheel} --no-mangle-all"
37
+ # with:
38
+ # package-dir: .
39
+ # output-dir: wheelhouse
40
+ # config-file: "{package}/pyproject.toml"
41
+
42
+ - uses: actions/upload-artifact@v4
43
+ with:
44
+ name: wheels-${{ matrix.os }}
45
+ path: ./wheelhouse/*.whl
@@ -0,0 +1,44 @@
1
+ name: Build and test in fixed environments
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - 'master'
7
+ paths-ignore:
8
+ # Do not run if only the documentation has been changed
9
+ - 'docs/**'
10
+ - '**/*.md'
11
+ pull_request:
12
+ paths-ignore:
13
+ # Do not run if only the documentation has been changed
14
+ - 'docs/**'
15
+ - '**/*.md'
16
+
17
+ env:
18
+ FORCE_COLOR: 3
19
+ # Colors for nox
20
+
21
+ jobs:
22
+ build_and_test:
23
+
24
+ runs-on: ubuntu-latest
25
+
26
+ strategy:
27
+ matrix:
28
+ python-version: ['3.8', '3.11']
29
+
30
+ steps:
31
+
32
+ - name: Checkout repository and submodules
33
+ uses: actions/checkout@v4
34
+
35
+ - name: Set up Python ${{ matrix.python-version }}
36
+ uses: actions/setup-python@v5
37
+ with:
38
+ python-version: ${{ matrix.python-version }}
39
+
40
+ - name: Set up nox
41
+ uses: wntrblm/nox@2024.03.02
42
+
43
+ - name: Run nox session
44
+ run: nox -s build_and_test_on_locked_env
@@ -0,0 +1,35 @@
1
+ name: Build and test using latest available dependencies
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ schedule:
6
+ - cron: '5 5 5/15 * *' # On the 5th and 20th of each month at 5:05
7
+
8
+ env:
9
+ FORCE_COLOR: 3
10
+ # Colors for nox
11
+
12
+ jobs:
13
+ build_and_test:
14
+
15
+ runs-on: ubuntu-latest
16
+
17
+ strategy:
18
+ matrix:
19
+ python-version: ['3.7', '3.12']
20
+
21
+ steps:
22
+
23
+ - name: Checkout repository and submodules
24
+ uses: actions/checkout@v4
25
+
26
+ - name: Set up Python ${{ matrix.python-version }}
27
+ uses: actions/setup-python@v5
28
+ with:
29
+ python-version: ${{ matrix.python-version }}
30
+
31
+ - name: Set up nox
32
+ uses: wntrblm/nox@2024.03.02
33
+
34
+ - name: Run nox session
35
+ run: nox -s build_and_test_on_latest_env
@@ -0,0 +1,153 @@
1
+ .idea/
2
+ pytest/Nemoh_verification_cases/*/results/
3
+ docs/_static/
4
+ docs/developer_manual/api/*.rst
5
+ .pytest_cache/
6
+ .vscode/
7
+ *.ogv
8
+
9
+ # Created by https://www.gitignore.io/api/python,fortran
10
+
11
+ ### Fortran ###
12
+ # Prerequisites
13
+ *.d
14
+
15
+ # Compiled Object files
16
+ *.slo
17
+ *.lo
18
+ *.o
19
+ *.obj
20
+
21
+ # Precompiled Headers
22
+ *.gch
23
+ *.pch
24
+
25
+ # Compiled Dynamic libraries
26
+ *.so
27
+ *.dylib
28
+ *.dll
29
+
30
+ # Fortran module files
31
+ *.mod
32
+ *.smod
33
+
34
+ # Compiled Static libraries
35
+ *.lai
36
+ *.la
37
+ *.a
38
+ *.lib
39
+
40
+ # Executables
41
+ *.exe
42
+ *.out
43
+ *.app
44
+
45
+ ### Python ###
46
+ # Byte-compiled / optimized / DLL files
47
+ __pycache__/
48
+ *.py[cod]
49
+ *$py.class
50
+
51
+ # C extensions
52
+
53
+ # Distribution / packaging
54
+ .Python
55
+ env/
56
+ build/
57
+ develop-eggs/
58
+ dist/
59
+ downloads/
60
+ eggs/
61
+ .eggs/
62
+ lib/
63
+ lib64/
64
+ parts/
65
+ sdist/
66
+ var/
67
+ wheels/
68
+ wheelhouse/
69
+ *.egg-info/
70
+ .installed.cfg
71
+ *.egg
72
+
73
+ # PyInstaller
74
+ # Usually these files are written by a python script from a template
75
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
76
+ *.manifest
77
+ *.spec
78
+
79
+ # Installer logs
80
+ pip-log.txt
81
+ pip-delete-this-directory.txt
82
+
83
+ # Unit test / coverage reports
84
+ htmlcov/
85
+ .tox/
86
+ .coverage
87
+ .coverage.*
88
+ .cache
89
+ nosetests.xml
90
+ coverage.xml
91
+ *,cover
92
+ .hypothesis/
93
+
94
+ # Translations
95
+ *.mo
96
+ *.pot
97
+
98
+ # Django stuff:
99
+ *.log
100
+ local_settings.py
101
+
102
+ # Flask stuff:
103
+ instance/
104
+ .webassets-cache
105
+
106
+ # Scrapy stuff:
107
+ .scrapy
108
+
109
+ # Sphinx documentation
110
+ docs/_build/
111
+
112
+ # PyBuilder
113
+ target/
114
+
115
+ # Jupyter Notebook
116
+ .ipynb_checkpoints
117
+
118
+ # pyenv
119
+ .python-version
120
+
121
+ # celery beat schedule file
122
+ celerybeat-schedule
123
+
124
+ # SageMath parsed files
125
+ *.sage.py
126
+
127
+ # dotenv
128
+ .env
129
+
130
+ # virtualenv
131
+ .venv
132
+ venv/
133
+ ENV/
134
+
135
+ # Spyder project settings
136
+ .spyderproject
137
+ .spyproject
138
+
139
+ # Rope project settings
140
+ .ropeproject
141
+
142
+ # mkdocs documentation
143
+ /site
144
+
145
+ # End of https://www.gitignore.io/api/python,fortran
146
+ pytest/io_legacy_cases/single_body/Hydrostatics.dat
147
+ pytest/io_legacy_cases/single_body/KH.dat
148
+ pytest/io_legacy_cases/single_body_list/Hydrostatics.dat
149
+ pytest/io_legacy_cases/single_body_list/KH.dat
150
+ pytest/io_legacy_cases/two_bodies_list/Hydrostatics_0.dat
151
+ pytest/io_legacy_cases/two_bodies_list/Hydrostatics_1.dat
152
+ pytest/io_legacy_cases/two_bodies_list/KH_0.dat
153
+ pytest/io_legacy_cases/two_bodies_list/KH_1.dat
@@ -0,0 +1,40 @@
1
+ exclude: "pytest/.*/.*"
2
+ repos:
3
+ - repo: https://github.com/pre-commit/pre-commit-hooks
4
+ rev: "v4.4.0"
5
+ hooks:
6
+ # Prevent giant files from being committed
7
+ - id: check-added-large-files
8
+ # Simply check whether files parse as valid python
9
+ - id: check-ast
10
+ # Check for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT
11
+ - id: check-case-conflict
12
+ # Check for files that contain merge conflict strings
13
+ - id: check-merge-conflict
14
+ # Checks for symlinks which do not point to anything
15
+ - id: check-symlinks
16
+ # Attempts to load all TOML files to verify syntax
17
+ - id: check-toml
18
+ # Attempts to load all YAML files to verify syntax
19
+ - id: check-yaml
20
+ # Check for calls to breakpoint()
21
+ - id: debug-statements
22
+ # Makes sure files end in a newline and only a newline
23
+ - id: end-of-file-fixer
24
+ # Disallow commiting directly to "master"
25
+ - id: no-commit-to-branch
26
+ # Check the kind of line ending (LF or CRLF)
27
+ - id: mixed-line-ending
28
+ # Trim trailing whitespaces
29
+ - id: trailing-whitespace
30
+
31
+ # - repo: https://github.com/astral-sh/ruff-pre-commit
32
+ # rev: "v0.0.291"
33
+ # hooks:
34
+ # - id: ruff
35
+
36
+ - repo: https://github.com/codespell-project/codespell
37
+ rev: "v2.2.5"
38
+ hooks:
39
+ - id: codespell
40
+ args: ["-L", "ba,informations,inout,ist,lamda,ment,noe,periode,sur"]
@@ -0,0 +1,15 @@
1
+ {
2
+ "title": "Capytaine",
3
+ "upload_type": "software",
4
+ "creators": [
5
+ {
6
+ "affiliation": "Eurobios Mews Labs",
7
+ "name": "Matthieu Ancellin",
8
+ "orcid": "0000-0002-0316-3230"
9
+ },
10
+ {
11
+ "name": "the Capytaine contributors"
12
+ }
13
+ ],
14
+ "access_right": "open"
15
+ }
@@ -0,0 +1,51 @@
1
+ # How to contribute
2
+
3
+ Thank you for your interest into Capytaine.
4
+ Here are some things you should know before you go further.
5
+
6
+ ## Contact
7
+
8
+ The best place to report a bug or to propose an enhancement is the [issue
9
+ tracker](https://github.com/mancellin/capytaine/issues) of Capytaine's Github
10
+ repository.
11
+
12
+ The [discussion page](https://github.com/mancellin/capytaine/discussions) can
13
+ also be used to ask questions and submit ideas.
14
+
15
+ ## Submitting changes
16
+
17
+ Pull requests are welcome.
18
+ Before submitting one, please take a look at the following points:
19
+
20
+ * To submit a pull request (PR), you will need to fork the repository. Then, it is
21
+ recommended to create a new branch in your fork dedicated to your bug fix or
22
+ new feature. Once the PR has been accepted, the content of the branch will be
23
+ squashed into a single commit on the master branch. Afterward, the branch can
24
+ be deleted (or forgotten).
25
+
26
+ * For simple modifications (e.g. typos) the whole process above can be done
27
+ automatically by Github by using its edition functionality (the pencil icon
28
+ on the top left of Github's file viewer).
29
+
30
+ * The Github repository includes tests in the `pytest` directory.
31
+ Tests can be run with the `pytest` module (`python -m pytest`).
32
+ Before submitting a change of the code, make sure that all tests are passing.
33
+ If you'd like to add a feature, please add the relevant tests to the `pytest`
34
+ directory.
35
+
36
+ * All modifications of the code are listed in the `docs/changelog.rst`.
37
+ If you submit a bug fix or a new feature, please add a line in the changelog.
38
+
39
+ * New features should also be documented in the user manual (`docs/user_manual/`).
40
+ Please add a short documentation of the feature in the relevant page.
41
+
42
+ * The code follows the [PEP8](https://pep8.org/) guidelines for code style.
43
+ Indentation is done with four spaces.
44
+ Try to avoid trailing whitespaces whenever possible.
45
+
46
+ The whole of Capytaine is currently licensed under the terms of the General
47
+ Public License (GPL). In the future, some modules might be extracted and
48
+ released with another free software license, such as the Apache License. If
49
+ your contribution cannot be released under another license (because it includes
50
+ code from another GPL package or just because you don't want to), please tell
51
+ us explicitly.
@@ -0,0 +1,13 @@
1
+ FROM ubuntu:jammy
2
+
3
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
4
+ git \
5
+ gfortran \
6
+ python3 \
7
+ python3-pip \
8
+ ipython3 \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ WORKDIR /home/user/
12
+ ADD ./ ./capytaine/
13
+ RUN pip install ./capytaine
capytaine-2.1/Makefile ADDED
@@ -0,0 +1,30 @@
1
+ install:
2
+ pip install .
3
+
4
+ develop:
5
+ pip install meson-python ninja "numpy>=2.0.0rc1,<2.3" charset-normalizer # No installed from pyproject.toml in this case...
6
+ pip install --no-build-isolation -e .
7
+
8
+ TEMP_DIR := $(shell mktemp -d)
9
+ test_fortran_compilation:
10
+ # Compile the Fortran code without parallelism for easier reading of the errors.
11
+ # It is assumed that meson and ninja are already installed.
12
+ meson setup --wipe $(TEMP_DIR) && meson compile -C $(TEMP_DIR) -j 1
13
+
14
+ test:
15
+ # Build and test the current repository in a fixed environment.
16
+ nox -s build_and_test_on_locked_env
17
+
18
+ clean:
19
+ rm -f capytaine/green_functions/libs/*.so
20
+ rm -rf build/
21
+ rm -rf dist/
22
+ rm -rf capytaine.egg-info/
23
+ rm -rf docs/_build
24
+ rm -rf .pytest_cache/
25
+ rm -rf .nox/
26
+ rm -rf .venv/
27
+ rm -rf __pycache__ */__pycache__ */*/__pycache__ */*/*/__pycache__
28
+ rm -rf ${HOME}/.cache/capytaine/*
29
+
30
+ .PHONY: install develop test clean test_fortran_compilation