BornSim 0.5.1__tar.gz → 0.5.4__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.

Potentially problematic release.


This version of BornSim might be problematic. Click here for more details.

Files changed (117) hide show
  1. {bornsim-0.5.1 → bornsim-0.5.4}/.zenodo.json +2 -2
  2. {bornsim-0.5.1 → bornsim-0.5.4/BornSim.egg-info}/PKG-INFO +4 -2
  3. {bornsim-0.5.1 → bornsim-0.5.4}/BornSim.egg-info/SOURCES.txt +2 -0
  4. {bornsim-0.5.1 → bornsim-0.5.4}/BornSim.egg-info/requires.txt +3 -1
  5. {bornsim-0.5.1 → bornsim-0.5.4}/CITATION.cff +1 -1
  6. {bornsim-0.5.1/BornSim.egg-info → bornsim-0.5.4}/PKG-INFO +4 -2
  7. bornsim-0.5.4/bornsim/_version.py +1 -0
  8. {bornsim-0.5.1 → bornsim-0.5.4}/conda.recipe/meta.yaml +3 -2
  9. bornsim-0.5.4/docs/source/_static/favicon.svg +1 -0
  10. bornsim-0.5.4/docs/source/_static/logo.svg +1 -0
  11. bornsim-0.5.4/docs/source/conf.py +104 -0
  12. {bornsim-0.5.1 → bornsim-0.5.4}/pyproject.toml +15 -3
  13. bornsim-0.5.1/bornsim/_version.py +0 -1
  14. bornsim-0.5.1/docs/source/conf.py +0 -154
  15. {bornsim-0.5.1 → bornsim-0.5.4}/.coveragerc +0 -0
  16. {bornsim-0.5.1 → bornsim-0.5.4}/.pre-commit-config.yaml +0 -0
  17. {bornsim-0.5.1 → bornsim-0.5.4}/BornSim.egg-info/dependency_links.txt +0 -0
  18. {bornsim-0.5.1 → bornsim-0.5.4}/BornSim.egg-info/top_level.txt +0 -0
  19. {bornsim-0.5.1 → bornsim-0.5.4}/CONTRIBUTING.md +0 -0
  20. {bornsim-0.5.1 → bornsim-0.5.4}/LICENSE +0 -0
  21. {bornsim-0.5.1 → bornsim-0.5.4}/MANIFEST.in +0 -0
  22. {bornsim-0.5.1 → bornsim-0.5.4}/README.rst +0 -0
  23. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/__init__.py +0 -0
  24. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/angular_data.py +0 -0
  25. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/api.py +0 -0
  26. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/directions.py +0 -0
  27. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/ensemble.py +0 -0
  28. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/ensemble_sampling.py +0 -0
  29. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/geometry.py +0 -0
  30. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/green.py +0 -0
  31. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/grid.py +0 -0
  32. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/material.py +0 -0
  33. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/medium/__init__.py +0 -0
  34. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/medium/base.py +0 -0
  35. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/medium/random_medium.py +0 -0
  36. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/medium/random_spheres.py +0 -0
  37. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/results.py +0 -0
  38. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/rotation.py +0 -0
  39. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/sampling.py +0 -0
  40. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/series.py +0 -0
  41. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/solver.py +0 -0
  42. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/source.py +0 -0
  43. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/units.py +0 -0
  44. {bornsim-0.5.1 → bornsim-0.5.4}/bornsim/volume.py +0 -0
  45. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/README.rst +0 -0
  46. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/born_orders/README.rst +0 -0
  47. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/born_orders/born_interference.py +0 -0
  48. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/born_orders/compare_orders.py +0 -0
  49. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/random_media/README.rst +0 -0
  50. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/random_media/covariance_models.py +0 -0
  51. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/random_media/phase_function.py +0 -0
  52. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/random_media/random_medium.py +0 -0
  53. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/random_media/random_spheres.py +0 -0
  54. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/random_media/theory_random_fields.py +0 -0
  55. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/random_media/wavelength_dependence.py +0 -0
  56. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/results/README.rst +0 -0
  57. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/results/result_plots.py +0 -0
  58. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/results/save_load_results.py +0 -0
  59. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/structured_media/README.rst +0 -0
  60. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/structured_media/dielectric_sphere.py +0 -0
  61. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/structured_media/structured_media.py +0 -0
  62. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/structured_media/theory_directional_interference.py +0 -0
  63. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/validation/README.rst +0 -0
  64. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/validation/angular_convergence.py +0 -0
  65. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/validation/ensemble_sampling.py +0 -0
  66. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/validation/finite_size_comparison.py +0 -0
  67. {bornsim-0.5.1 → bornsim-0.5.4}/docs/examples/validation/grid_refinement.py +0 -0
  68. {bornsim-0.5.1 → bornsim-0.5.4}/docs/images/branding-prompts.rst +0 -0
  69. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/_static/favicon.png +0 -0
  70. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/_static/logo.png +0 -0
  71. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/_static/phase_function.svg +0 -0
  72. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/api.rst +0 -0
  73. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/development.rst +0 -0
  74. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/examples.rst +0 -0
  75. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/gallery_config.py +0 -0
  76. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/getting_started.rst +0 -0
  77. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/guide.rst +0 -0
  78. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/index.rst +0 -0
  79. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/medium_visualization.rst +0 -0
  80. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/overview.rst +0 -0
  81. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/research.rst +0 -0
  82. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/resources.rst +0 -0
  83. {bornsim-0.5.1 → bornsim-0.5.4}/docs/source/theory.rst +0 -0
  84. {bornsim-0.5.1 → bornsim-0.5.4}/makefile +0 -0
  85. {bornsim-0.5.1 → bornsim-0.5.4}/pytest.ini +0 -0
  86. {bornsim-0.5.1 → bornsim-0.5.4}/setup.cfg +0 -0
  87. {bornsim-0.5.1 → bornsim-0.5.4}/tests/analytical/reference.py +0 -0
  88. {bornsim-0.5.1 → bornsim-0.5.4}/tests/analytical/test_model.py +0 -0
  89. {bornsim-0.5.1 → bornsim-0.5.4}/tests/analytical/test_numerical_reference.py +0 -0
  90. {bornsim-0.5.1 → bornsim-0.5.4}/tests/conftest.py +0 -0
  91. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_api.py +0 -0
  92. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_api_keywords.py +0 -0
  93. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_api_ownership.py +0 -0
  94. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_api_scope.py +0 -0
  95. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_configuration.py +0 -0
  96. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_directional_api.py +0 -0
  97. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_directions.py +0 -0
  98. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_engine.py +0 -0
  99. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_explicit_physics.py +0 -0
  100. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_geometry.py +0 -0
  101. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_media.py +0 -0
  102. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_medium_composition.py +0 -0
  103. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_medium_metadata.py +0 -0
  104. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_plot_contract.py +0 -0
  105. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_random_spheres.py +0 -0
  106. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_result.py +0 -0
  107. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_result_contract.py +0 -0
  108. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_rotation.py +0 -0
  109. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_series.py +0 -0
  110. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_unit_contract.py +0 -0
  111. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_units.py +0 -0
  112. {bornsim-0.5.1 → bornsim-0.5.4}/tests/numerical/test_volume_plotting.py +0 -0
  113. {bornsim-0.5.1 → bornsim-0.5.4}/tests/packaging/test_release_tools.py +0 -0
  114. {bornsim-0.5.1 → bornsim-0.5.4}/tools/check_release.py +0 -0
  115. {bornsim-0.5.1 → bornsim-0.5.4}/tools/check_wheel.py +0 -0
  116. {bornsim-0.5.1 → bornsim-0.5.4}/tools/next_release_version.py +0 -0
  117. {bornsim-0.5.1 → bornsim-0.5.4}/tools/release_tag.py +0 -0
@@ -8,11 +8,11 @@
8
8
  }
9
9
  ],
10
10
  "license": "mit",
11
- "version": "0.5.1",
11
+ "version": "0.5.4",
12
12
  "keywords": [
13
13
  "Born approximation",
14
14
  "light scattering",
15
15
  "random media"
16
16
  ],
17
- "publication_date": "2026-10-16"
17
+ "publication_date": "2026-10-20"
18
18
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BornSim
3
- Version: 0.5.1
3
+ Version: 0.5.4
4
4
  Summary: Vector Born-series scattering from continuous random dielectric media
5
5
  Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
6
6
  License-Expression: MIT
@@ -19,7 +19,8 @@ Requires-Python: >=3.11
19
19
  Description-Content-Type: text/x-rst
20
20
  License-File: LICENSE
21
21
  Requires-Dist: numpy<3,>=1.24
22
- Requires-Dist: TypedUnit==0.0.11
22
+ Requires-Dist: TypedUnit>=0.2.9
23
+ Requires-Dist: pint<0.26,>=0.24
23
24
  Requires-Dist: matplotlib<4,>=3.7
24
25
  Requires-Dist: plotly<7,>=6
25
26
  Provides-Extra: testing
@@ -28,6 +29,7 @@ Requires-Dist: pytest-cov<8,>=5; extra == "testing"
28
29
  Provides-Extra: test
29
30
  Requires-Dist: BornSim[testing]; extra == "test"
30
31
  Provides-Extra: documentation
32
+ Requires-Dist: MartinPdeS-docs>=0.1.4; extra == "documentation"
31
33
  Requires-Dist: sphinx<10,>=7; extra == "documentation"
32
34
  Requires-Dist: pydata-sphinx-theme<0.20,>=0.16; extra == "documentation"
33
35
  Requires-Dist: sphinx-gallery<1,>=0.19; extra == "documentation"
@@ -76,7 +76,9 @@ docs/source/research.rst
76
76
  docs/source/resources.rst
77
77
  docs/source/theory.rst
78
78
  docs/source/_static/favicon.png
79
+ docs/source/_static/favicon.svg
79
80
  docs/source/_static/logo.png
81
+ docs/source/_static/logo.svg
80
82
  docs/source/_static/phase_function.svg
81
83
  tests/conftest.py
82
84
  tests/analytical/reference.py
@@ -1,5 +1,6 @@
1
1
  numpy<3,>=1.24
2
- TypedUnit==0.0.11
2
+ TypedUnit>=0.2.9
3
+ pint<0.26,>=0.24
3
4
  matplotlib<4,>=3.7
4
5
  plotly<7,>=6
5
6
 
@@ -11,6 +12,7 @@ twine<7,>=6
11
12
  pre-commit<5,>=4
12
13
 
13
14
  [documentation]
15
+ MartinPdeS-docs>=0.1.4
14
16
  sphinx<10,>=7
15
17
  pydata-sphinx-theme<0.20,>=0.16
16
18
  sphinx-gallery<1,>=0.19
@@ -2,7 +2,7 @@ cff-version: 1.2.0
2
2
  message: "If you use BornSim in research, please cite the software version used."
3
3
  title: "BornSim"
4
4
  type: software
5
- version: "0.5.1"
5
+ version: "0.5.4"
6
6
  authors:
7
7
  - family-names: "Poinsinet de Sivry-Houle"
8
8
  given-names: "Martin"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BornSim
3
- Version: 0.5.1
3
+ Version: 0.5.4
4
4
  Summary: Vector Born-series scattering from continuous random dielectric media
5
5
  Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
6
6
  License-Expression: MIT
@@ -19,7 +19,8 @@ Requires-Python: >=3.11
19
19
  Description-Content-Type: text/x-rst
20
20
  License-File: LICENSE
21
21
  Requires-Dist: numpy<3,>=1.24
22
- Requires-Dist: TypedUnit==0.0.11
22
+ Requires-Dist: TypedUnit>=0.2.9
23
+ Requires-Dist: pint<0.26,>=0.24
23
24
  Requires-Dist: matplotlib<4,>=3.7
24
25
  Requires-Dist: plotly<7,>=6
25
26
  Provides-Extra: testing
@@ -28,6 +29,7 @@ Requires-Dist: pytest-cov<8,>=5; extra == "testing"
28
29
  Provides-Extra: test
29
30
  Requires-Dist: BornSim[testing]; extra == "test"
30
31
  Provides-Extra: documentation
32
+ Requires-Dist: MartinPdeS-docs>=0.1.4; extra == "documentation"
31
33
  Requires-Dist: sphinx<10,>=7; extra == "documentation"
32
34
  Requires-Dist: pydata-sphinx-theme<0.20,>=0.16; extra == "documentation"
33
35
  Requires-Dist: sphinx-gallery<1,>=0.19; extra == "documentation"
@@ -0,0 +1 @@
1
+ __version__ = version = "0.5.4"
@@ -1,6 +1,6 @@
1
1
  package:
2
2
  name: bornsim
3
- version: 0.5.1
3
+ version: 0.5.4
4
4
 
5
5
  source:
6
6
  path: ..
@@ -18,7 +18,8 @@ requirements:
18
18
  run:
19
19
  - python {{ PY_VER }}.*
20
20
  - numpy >=1.24,<3
21
- - typedunit ==0.0.11
21
+ - typedunit >=0.2.9
22
+ - pint >=0.24,<0.26
22
23
  - matplotlib >=3.7,<4
23
24
  - plotly >=6,<7
24
25
 
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><circle cx="32" cy="32" r="29" fill="#172033"/><path fill="none" stroke="#5eead4" stroke-width="6" stroke-linecap="round" d="M10 32h12m-6-9c14 6 14 12 24 18m-24-18c14-6 14-12 24-18"/><circle cx="35" cy="32" r="6" fill="#fbbf24"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 380 96" role="img" aria-labelledby="t d"><title id="t">BornSim</title><desc id="d">Two clean wavefronts passing through a scattering point.</desc><path fill="none" stroke="#0f766e" stroke-width="8" stroke-linecap="round" d="M18 48h72m-42-20c22 10 22 30 44 40m-44-40c22-10 22-30 44-40"/><circle cx="142" cy="48" r="15" fill="#f59e0b"/><path fill="none" stroke="#2563eb" stroke-width="8" stroke-linecap="round" d="M168 48h48m-28-20c22 10 22 30 44 40m-44-40c22-10 22-30 44-40"/><text x="250" y="58" fill="#172033" font-family="system-ui,sans-serif" font-size="30" font-weight="650">BornSim</text></svg>
@@ -0,0 +1,104 @@
1
+ """BornSim documentation configuration."""
2
+
3
+ import os
4
+ import sys
5
+ from pathlib import Path
6
+
7
+ sys.path.insert(0, str(Path(__file__).parent))
8
+
9
+ from bornsim import __version__
10
+ from bornsim.units import ureg
11
+ from martinpdes_docs import configure
12
+
13
+ project = "BornSim"
14
+ package = "BornSim"
15
+ repository = "MartinPdeS/BornSim"
16
+ author = "Martin Poinsinet de Sivry-Houle"
17
+ documentation_version = os.getenv("tag", "latest")
18
+
19
+ release = __version__
20
+ version = release
21
+
22
+
23
+ globals().update(
24
+ configure(
25
+ project=project,
26
+ package=package,
27
+ author=author,
28
+ repository=repository,
29
+ version=documentation_version,
30
+ logo="_static/logo.png",
31
+ favicon="_static/favicon.png",
32
+ sphinx_gallery_conf={
33
+ "examples_dirs": "../examples",
34
+ "gallery_dirs": "auto_examples",
35
+ "filename_pattern": r"\.py$",
36
+ "capture_repr": (),
37
+ "image_scrapers": ("matplotlib", "gallery_config.plotly_scraper"),
38
+ "abort_on_example_error": True,
39
+ "download_all_examples": False,
40
+ "backreferences_dir": None,
41
+ "reset_argv": "gallery_config.gallery_arguments",
42
+ "subsection_order": [
43
+ "../examples/random_media",
44
+ "../examples/structured_media",
45
+ "../examples/born_orders",
46
+ "../examples/results",
47
+ "../examples/validation",
48
+ ],
49
+ },
50
+ )
51
+ )
52
+
53
+ extensions += ["sphinx.ext.mathjax"]
54
+ html_css_files += ["layout.css"]
55
+ html_context.update({"doc_path": "docs/source", "default_mode": "dark"})
56
+
57
+
58
+ def write_interactive_media(app, exception):
59
+ """Export browser volume views for HTML documentation builds."""
60
+
61
+ if exception is not None or app.builder.format != "html":
62
+ return
63
+
64
+ output = Path(app.outdir) / "_static"
65
+ output.mkdir(exist_ok=True)
66
+
67
+ from bornsim import Grid
68
+ from bornsim.medium.random_medium import ExponentialMedium, GaussianMedium
69
+
70
+ grid = Grid(
71
+ shape=(16, 16, 16),
72
+ spacing=2.5e-08 * ureg.meter,
73
+ )
74
+
75
+ for correlation, medium_type in (("gaussian", GaussianMedium), ("exponential", ExponentialMedium)):
76
+ medium = medium_type(
77
+ refractive_index_std=0.01,
78
+ correlation_length=7.5e-08 * ureg.meter,
79
+ background_refractive_index=1.33,
80
+ )
81
+
82
+ volume = medium.to_volume(
83
+ grid=grid,
84
+ seed=42,
85
+ )
86
+
87
+ figure = volume.plot_3d(
88
+ backend="plotly",
89
+ mode="volume",
90
+ field="refractive_index",
91
+ surface_count=16,
92
+ opacity=0.2,
93
+ opacity_scale="increasing",
94
+ )
95
+
96
+ figure.update_layout(title=f"{correlation.capitalize()} random medium · higher refractive index is more opaque")
97
+ figure.write_html(
98
+ file=str(output / f"random-medium-{correlation}.html"),
99
+ include_plotlyjs=True,
100
+ )
101
+
102
+
103
+ def setup(app):
104
+ app.connect("build-finished", write_interactive_media)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "BornSim"
7
- version = "0.5.1"
7
+ version = "0.5.4"
8
8
  description = "Vector Born-series scattering from continuous random dielectric media"
9
9
  readme = "README.rst"
10
10
  license = "MIT"
@@ -26,12 +26,24 @@ classifiers = [
26
26
  "Topic :: Scientific/Engineering :: Visualization",
27
27
  ]
28
28
  keywords = ["born approximation", "light scattering", "random media", "tissue optics"]
29
- dependencies = ["numpy>=1.24,<3", "TypedUnit==0.0.11", "matplotlib>=3.7,<4", "plotly>=6,<7"]
29
+ dependencies = [
30
+ "numpy>=1.24,<3",
31
+ "TypedUnit>=0.2.9",
32
+ "pint>=0.24,<0.26",
33
+ "matplotlib>=3.7,<4",
34
+ "plotly>=6,<7",
35
+ ]
30
36
 
31
37
  [project.optional-dependencies]
32
38
  testing = ["pytest>=8,<10", "pytest-cov>=5,<8"]
33
39
  test = ["BornSim[testing]"]
34
- documentation = ["sphinx>=7,<10", "pydata-sphinx-theme>=0.16,<0.20", "sphinx-gallery>=0.19,<1", "sphinx-design>=0.6,<1"]
40
+ documentation = [
41
+ "MartinPdeS-docs>=0.1.4",
42
+ "sphinx>=7,<10",
43
+ "pydata-sphinx-theme>=0.16,<0.20",
44
+ "sphinx-gallery>=0.19,<1",
45
+ "sphinx-design>=0.6,<1",
46
+ ]
35
47
  dev = ["ruff>=0.11,<1", "mypy>=1.11,<2", "build>=1.2,<2", "twine>=6,<7", "pre-commit>=4,<5"]
36
48
 
37
49
  [tool.setuptools.packages.find]
@@ -1 +0,0 @@
1
- __version__ = version = "0.5.1"
@@ -1,154 +0,0 @@
1
- """BornSim documentation configuration."""
2
-
3
- from pathlib import Path
4
- import os
5
- import sys
6
-
7
- sys.path.insert(0, str(Path(__file__).parent))
8
-
9
- from bornsim import __version__
10
- from bornsim.units import ureg
11
-
12
- project = "BornSim"
13
-
14
- author = "Martin Poinsinet de Sivry-Houle"
15
-
16
- copyright = "2026, Martin Poinsinet de Sivry-Houle"
17
-
18
- release = __version__
19
-
20
- version = release
21
-
22
- extensions = [
23
- "sphinx.ext.autodoc",
24
- "sphinx.ext.napoleon",
25
- "sphinx.ext.mathjax",
26
- "sphinx.ext.viewcode",
27
- "sphinx_gallery.gen_gallery",
28
- "sphinx_design",
29
- ]
30
-
31
- html_theme = "pydata_sphinx_theme"
32
-
33
- html_static_path = ["_static"]
34
- html_css_files = ["layout.css"]
35
-
36
- html_logo = "_static/logo.png"
37
-
38
- html_favicon = "_static/favicon.png"
39
-
40
- html_theme_options = {
41
- "logo": {"alt_text": "BornSim"},
42
- "show_nav_level": 0,
43
- "navbar_align": "content",
44
- "navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
45
- "icon_links": [
46
- {
47
- "name": "GitHub",
48
- "url": "https://github.com/MartinPdeS/BornSim",
49
- "icon": "fa-brands fa-github",
50
- },
51
- ],
52
- "show_prev_next": False,
53
- "show_version_warning_banner": True,
54
- "footer_start": ["copyright"],
55
- "footer_end": ["sphinx-version", "theme-version"],
56
- "pygments_light_style": "default",
57
- "pygments_dark_style": "github-dark",
58
- "switcher": {
59
- "json_url": "https://raw.githubusercontent.com/MartinPdeS/BornSim/documentation_page/version_switcher.json",
60
- "version_match": os.getenv("tag", "latest"),
61
- },
62
- # The deployment regenerates this remote manifest after the build.
63
- "check_switcher": False,
64
- }
65
-
66
- html_context = {
67
- "github_url": "https://github.com",
68
- "github_user": "MartinPdeS",
69
- "github_repo": "BornSim",
70
- "github_version": "master" if os.getenv("tag", "latest") == "latest" else os.environ["tag"],
71
- "doc_path": "docs/source",
72
- "default_mode": "dark",
73
- }
74
-
75
- exclude_patterns = []
76
-
77
- autodoc_typehints = "description"
78
-
79
- napoleon_google_docstring = False
80
-
81
- napoleon_numpy_docstring = True
82
-
83
-
84
- sphinx_gallery_conf = {
85
- "examples_dirs": "../examples",
86
- "gallery_dirs": "auto_examples",
87
- "filename_pattern": r"\.py$",
88
- "capture_repr": (),
89
- "image_scrapers": ("matplotlib", "gallery_config.plotly_scraper"),
90
- "abort_on_example_error": True,
91
- "download_all_examples": False,
92
- "backreferences_dir": None,
93
- "reset_argv": "gallery_config.gallery_arguments",
94
- "subsection_order": [
95
- "../examples/random_media",
96
- "../examples/structured_media",
97
- "../examples/born_orders",
98
- "../examples/results",
99
- "../examples/validation",
100
- ],
101
- }
102
-
103
-
104
- def write_interactive_media(app, exception):
105
- """Export browser volume views for HTML documentation builds."""
106
-
107
- if exception is not None or app.builder.format != "html":
108
- return
109
-
110
- from pathlib import Path
111
-
112
- output = Path(app.outdir) / "_static"
113
-
114
- output.mkdir(exist_ok=True)
115
-
116
- from bornsim import Grid
117
- from bornsim.medium.random_medium import GaussianMedium, ExponentialMedium
118
-
119
- grid = Grid(
120
- shape=(16, 16, 16),
121
- spacing=2.5e-08 * ureg.meter,
122
- )
123
-
124
- for correlation, medium_type in (("gaussian", GaussianMedium), ("exponential", ExponentialMedium)):
125
- medium = medium_type(
126
- refractive_index_std=0.01,
127
- correlation_length=7.5e-08 * ureg.meter,
128
- background_refractive_index=1.33,
129
- )
130
-
131
- volume = medium.to_volume(
132
- grid=grid,
133
- seed=42,
134
- )
135
-
136
- figure = volume.plot_3d(
137
- backend="plotly",
138
- mode="volume",
139
- field="refractive_index",
140
- surface_count=16,
141
- opacity=0.2,
142
- opacity_scale="increasing",
143
- )
144
-
145
- figure.update_layout(title=f"{correlation.capitalize()} random medium · higher refractive index is more opaque")
146
-
147
- figure.write_html(
148
- file=str(output / f"random-medium-{correlation}.html"),
149
- include_plotlyjs=True,
150
- )
151
-
152
-
153
- def setup(app):
154
- app.connect("build-finished", write_interactive_media)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes