FiberFusing 1.5.0.4__tar.gz → 1.6.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 (139) hide show
  1. fiberfusing-1.5.0.4/.github/workflows/deploy_documentation.yml → fiberfusing-1.6.0/.github/workflows/build_documentation.yml +9 -16
  2. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/.github/workflows/deploy_PyPI.yml +1 -1
  3. fiberfusing-1.6.0/.github/workflows/deploy_documentation.yml +123 -0
  4. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/.gitignore +8 -3
  5. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/_version.py +2 -2
  6. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing.egg-info/PKG-INFO +1 -1
  7. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing.egg-info/SOURCES.txt +1 -2
  8. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/PKG-INFO +1 -1
  9. fiberfusing-1.5.0.4/docs/source/gallery/index.rst → fiberfusing-1.6.0/docs/examples/README.rst +0 -14
  10. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/radomize_core.py +12 -6
  11. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/structure_shift.py +10 -8
  12. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/source/code/utils.rst +0 -5
  13. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/source/code.rst +0 -1
  14. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/source/conf.py +32 -31
  15. fiberfusing-1.6.0/docs/source/gallery/index.rst +441 -0
  16. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/source/index.rst +0 -3
  17. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/meta.yaml +1 -1
  18. fiberfusing-1.5.0.4/.github/workflows/add_documentation_version.yml +0 -73
  19. fiberfusing-1.5.0.4/docs/examples/README.rst +0 -6
  20. fiberfusing-1.5.0.4/docs/source/code/overlay_structure.rst +0 -12
  21. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/.flake8 +0 -0
  22. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/.github/dependabot.yml +0 -0
  23. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/.github/workflows/deploy_anaconda.yml +0 -0
  24. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/.github/workflows/deploy_coverage.yml +0 -0
  25. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/.readthedocs.yml +0 -0
  26. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/__init__.py +0 -0
  27. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/background.py +0 -0
  28. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/base_fused.py +0 -0
  29. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/buffer.py +0 -0
  30. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/components/__init__.py +0 -0
  31. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/components/base_class.py +0 -0
  32. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/components/linestring.py +0 -0
  33. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/components/point.py +0 -0
  34. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/components/polygon.py +0 -0
  35. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/components/utils.py +0 -0
  36. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/__init__.py +0 -0
  37. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/line/__init__.py +0 -0
  38. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/line/configuration_01x01.py +0 -0
  39. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/line/configuration_02x02.py +0 -0
  40. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/line/configuration_03x03.py +0 -0
  41. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/line/configuration_04x04.py +0 -0
  42. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/line/configuration_05x05.py +0 -0
  43. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/ring/__init__.py +0 -0
  44. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/ring/configuration_01x01.py +0 -0
  45. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/ring/configuration_02x02.py +0 -0
  46. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/ring/configuration_03x03.py +0 -0
  47. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/ring/configuration_04x04.py +0 -0
  48. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/ring/configuration_05x05.py +0 -0
  49. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/ring/configuration_06x06.py +0 -0
  50. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/ring/configuration_07x07.py +0 -0
  51. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/ring/configuration_10x10.py +0 -0
  52. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/ring/configuration_12x12.py +0 -0
  53. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/configuration/ring/configuration_19x19.py +0 -0
  54. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/connection.py +0 -0
  55. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/connection_optimization.py +0 -0
  56. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/coordinate_system.py +0 -0
  57. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/directories.py +0 -0
  58. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/__init__.py +0 -0
  59. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/catalogue.py +0 -0
  60. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/1550BHP.yaml +0 -0
  61. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/DCF13.yaml +0 -0
  62. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/DCF1300S_20.yaml +0 -0
  63. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/DCF1300S_26.yaml +0 -0
  64. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/DCF1300S_33.yaml +0 -0
  65. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/DCF1300S_42.yaml +0 -0
  66. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/F2028M12.yaml +0 -0
  67. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/F2028M21.yaml +0 -0
  68. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/F2028M24.yaml +0 -0
  69. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/F2058G1.yaml +0 -0
  70. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/F2058L1.yaml +0 -0
  71. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/HI1060.yaml +0 -0
  72. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/HP630.yaml +0 -0
  73. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/SM1950.yaml +0 -0
  74. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/SMF28.yaml +0 -0
  75. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/fluorine_doped_1%_capillary.yaml +0 -0
  76. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/fluorine_doped_2%_capillary.yaml +0 -0
  77. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/test_fiber.yaml +0 -0
  78. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/fiber_files/test_multimode_fiber.yaml +0 -0
  79. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/generic_fiber.py +0 -0
  80. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/loader.py +0 -0
  81. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber/structure_collection.py +0 -0
  82. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/fiber_structure.py +0 -0
  83. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/geometry.py +0 -0
  84. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/helper.py +0 -0
  85. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/optical_structure.py +0 -0
  86. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/plottings.py +0 -0
  87. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing/utils.py +0 -0
  88. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing.egg-info/dependency_links.txt +0 -0
  89. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing.egg-info/requires.txt +0 -0
  90. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/FiberFusing.egg-info/top_level.txt +0 -0
  91. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/LICENSE +0 -0
  92. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/README.rst +0 -0
  93. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/Makefile +0 -0
  94. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/README.rst +0 -0
  95. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/fusion_degree.py +0 -0
  96. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/plot_line_3.py +0 -0
  97. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/plot_line_4.py +0 -0
  98. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/plot_line_5.py +0 -0
  99. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/plot_ring_12.py +0 -0
  100. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/plot_ring_19.py +0 -0
  101. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/plot_ring_2.py +0 -0
  102. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/plot_ring_3py +0 -0
  103. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/plot_ring_4.py +0 -0
  104. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/plot_ring_7.py +0 -0
  105. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/clad/plot_single.py +0 -0
  106. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/geometry/README.rst +0 -0
  107. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/geometry/plot_line_3.py +0 -0
  108. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/geometry/plot_line_4.py +0 -0
  109. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/geometry/plot_line_5.py +0 -0
  110. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/geometry/plot_ring_10.py +0 -0
  111. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/geometry/plot_ring_2.py +0 -0
  112. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/geometry/plot_ring_3.py +0 -0
  113. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/geometry/plot_ring_4.py +0 -0
  114. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/geometry/plot_ring_5.py +0 -0
  115. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/geometry/plot_ring_7.py +0 -0
  116. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/examples/geometry/plot_single.py +0 -0
  117. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/images/example_3x3.png +0 -0
  118. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/images/logo.png +0 -0
  119. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/make.bat +0 -0
  120. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/source/_static/default.css +0 -0
  121. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/source/_static/thumbnail.png +0 -0
  122. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/source/code/buffer.rst +0 -0
  123. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/source/code/components.rst +0 -0
  124. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/source/code/coordinate_system.rst +0 -0
  125. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/source/code/geometry.rst +0 -0
  126. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/source/references.rst +0 -0
  127. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/docs/source/theory.rst +0 -0
  128. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/notebook.ipynb +0 -0
  129. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/pyproject.toml +0 -0
  130. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/setup.cfg +0 -0
  131. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/tests/__init__.py +0 -0
  132. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/tests/fiber_loader.py +0 -0
  133. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/tests/test_boundaries.py +0 -0
  134. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/tests/test_cooordinate_system.py +0 -0
  135. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/tests/test_fiber.py +0 -0
  136. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/tests/test_fused_structure.py +0 -0
  137. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/tests/test_generic_fiber.py +0 -0
  138. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/tests/test_geometries.py +0 -0
  139. {fiberfusing-1.5.0.4 → fiberfusing-1.6.0}/tests/test_polygon.py +0 -0
@@ -22,19 +22,20 @@ jobs:
22
22
  uses: actions/setup-python@v5
23
23
  id: cp311
24
24
  with:
25
- python-version: "3.11"
25
+ python-version: 3.11
26
26
 
27
27
  - name: "Install: Dependencies for headless server"
28
28
  shell: bash
29
29
  run: |
30
30
  sudo apt-get update
31
- sudo apt-get install xvfb
31
+ sudo apt-get install -y xvfb jq
32
32
 
33
33
  - name: "Checkout requirements and files for testing"
34
34
  uses: actions/checkout@v4
35
35
  with:
36
36
  fetch-depth: 0
37
37
  submodules: true
38
+ ref: master
38
39
 
39
40
  - name: Install everything, run the tests, produce the .coverage file
40
41
  run: |
@@ -42,26 +43,18 @@ jobs:
42
43
  python -m build --wheel
43
44
  python -m pip install .[documentation]
44
45
 
45
- - name: Install dependencies
46
- run: |
47
- pip install sphinx sphinx_rtd_theme myst_parser jq
48
-
49
46
  - name: Get current tag
50
47
  id: get_tag
51
48
  run: |
52
49
  git fetch --tags
53
50
  echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
54
51
 
55
- - name: Sphinx build
52
+ - name: "Sphinx build"
56
53
  run: |
57
- sphinx-build docs/source _build
54
+ sphinx-build docs/source documentation_build
58
55
 
59
- - name: "Deploy to documentation_page: specific version"
60
- uses: peaceiris/actions-gh-pages@v3
61
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
56
+ - name: "Upload Documentation Artifact"
57
+ uses: actions/upload-artifact@v4
62
58
  with:
63
- publish_branch: documentation_page
64
- github_token: ${{ secrets.GITHUB_TOKEN }}
65
- publish_dir: _build/
66
- destination_dir: "docs/${{ env.tag }}"
67
- keep_files: true
59
+ name: documentation_build
60
+ path: documentation_build
@@ -1,4 +1,4 @@
1
- name: Deploy Wheel
1
+ name: Deploy Wheel to PyPi
2
2
 
3
3
  on:
4
4
  push:
@@ -0,0 +1,123 @@
1
+ # Simple workflow for deploying static content to GitHub Pages
2
+ name: Deploy static content to Pages
3
+
4
+
5
+ on:
6
+ workflow_run:
7
+ workflows: ["Documentation"] # This references the name of the first workflow
8
+ types:
9
+ - completed # Run when the Documentation workflow is completed successfully
10
+
11
+
12
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13
+ permissions:
14
+ contents: write
15
+ pages: write
16
+ id-token: write
17
+
18
+ jobs:
19
+ deploy:
20
+ runs-on: ubuntu-latest
21
+ environment:
22
+ name: github-pages
23
+ url: ${{ steps.deployment.outputs.page_url }}
24
+
25
+ steps:
26
+ - name: Checkout
27
+ uses: actions/checkout@v4
28
+ with:
29
+ fetch-depth: 0
30
+ ref: documentation_page
31
+
32
+ - name: Set up Git user
33
+ run: |
34
+ git config --global user.name "GitHub Actions"
35
+ git config --global user.email "actions@github.com"
36
+
37
+ - name: Download artifact
38
+ id: download-artifact
39
+ uses: dawidd6/action-download-artifact@v6
40
+ with:
41
+ workflow: build_documentation.yml
42
+ name: documentation_build
43
+ path: ./documentation_build
44
+
45
+ - name: Get current tag
46
+ id: get_tag
47
+ run: |
48
+ # Fetch all tags to ensure they are available
49
+ git fetch --tags
50
+ git tag -l
51
+
52
+ # Get the latest tag by creation date
53
+ TAG=$(git tag --sort=-creatordate | head -n 1)
54
+
55
+ # Fallback to a default tag if no tag is found
56
+ if [ -z "$TAG" ]; then
57
+ TAG="0.0.0.0"
58
+ fi
59
+
60
+ echo "tag=$TAG" >> $GITHUB_ENV
61
+ echo "Tag found or default: $TAG"
62
+
63
+ - name: Update new documentation version
64
+ run: |
65
+ rm -rf docs/${{ env.tag }}
66
+ mv documentation_build docs/${{ env.tag }}
67
+
68
+ - name: Scan, sort versions, and update version_switcher.json
69
+ run: |
70
+ # Define the path to version_switcher.json
71
+ json_file="version_switcher.json"
72
+ rm $json_file
73
+ docs_path="docs"
74
+ base_url="https://martinpdes.github.io/FiberFusing"
75
+
76
+ # Start the JSON array
77
+ echo "[" > $json_file
78
+
79
+ # Get sorted version directories in descending order
80
+ version_dirs=$(ls -v $docs_path | sort -V -r)
81
+
82
+
83
+ # Loop over sorted versions and add to JSON file
84
+ first_entry=true
85
+ for version in $version_dirs; do
86
+ version_url="${base_url}/${docs_path}/${version}"
87
+
88
+ # Add a comma if it's not the first entry
89
+ if [ "$first_entry" = true ]; then
90
+ first_entry=false
91
+ else
92
+ echo "," >> $json_file
93
+ fi
94
+
95
+ # Append each version as a JSON entry
96
+ jq -n \
97
+ --arg name "$version" \
98
+ --arg version "$version" \
99
+ --arg url "$version_url" \
100
+ '{name: $name, version: $version, url: $url}' >> $json_file
101
+ done
102
+
103
+ # End the JSON array
104
+ echo "]" >> $json_file
105
+
106
+ # Add and commit the updated version_switcher.json
107
+ git add $json_file
108
+ echo $json_file
109
+ git add docs/
110
+ git commit --allow-empty -m "Update version_switcher.json"
111
+ git push origin HEAD
112
+
113
+ - name: Setup Pages
114
+ uses: actions/configure-pages@v5
115
+
116
+ - name: Upload artifact
117
+ uses: actions/upload-pages-artifact@v3
118
+ with:
119
+ path: '.'
120
+
121
+ - name: Deploy to GitHub Pages
122
+ id: deployment
123
+ uses: actions/deploy-pages@v4
@@ -1,6 +1,4 @@
1
-
2
-
3
-
1
+ # General patterns
4
2
  *.DS_store
5
3
  *.ipynb_checkpoints*
6
4
  *__pycache__*
@@ -19,5 +17,12 @@ install_manifest.txt
19
17
  cmake_install.cmake
20
18
  wheelhouse
21
19
 
20
+ # Docs-specific patterns
22
21
  docs/source/gallery/*
23
22
  !docs/source/gallery/index.rst
23
+ PyOptik/data/**/test*
24
+ PyOptik/data/**/example*
25
+
26
+ # Override for documentation_build
27
+ !documentation_build
28
+ !documentation_build/**
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.5.0.4'
16
- __version_tuple__ = version_tuple = (1, 5, 0, 4)
15
+ __version__ = version = '1.6.0'
16
+ __version_tuple__ = version_tuple = (1, 6, 0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: FiberFusing
3
- Version: 1.5.0.4
3
+ Version: 1.6.0
4
4
  Summary: A package fiber fusing configuration simulating the transverse fusion of fiber optics.
5
5
  Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
6
6
  License: MIT License
@@ -7,7 +7,7 @@ meta.yaml
7
7
  notebook.ipynb
8
8
  pyproject.toml
9
9
  .github/dependabot.yml
10
- .github/workflows/add_documentation_version.yml
10
+ .github/workflows/build_documentation.yml
11
11
  .github/workflows/deploy_PyPI.yml
12
12
  .github/workflows/deploy_anaconda.yml
13
13
  .github/workflows/deploy_coverage.yml
@@ -121,7 +121,6 @@ docs/source/code/buffer.rst
121
121
  docs/source/code/components.rst
122
122
  docs/source/code/coordinate_system.rst
123
123
  docs/source/code/geometry.rst
124
- docs/source/code/overlay_structure.rst
125
124
  docs/source/code/utils.rst
126
125
  docs/source/gallery/index.rst
127
126
  tests/__init__.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: FiberFusing
3
- Version: 1.5.0.4
3
+ Version: 1.6.0
4
4
  Summary: A package fiber fusing configuration simulating the transverse fusion of fiber optics.
5
5
  Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
6
6
  License: MIT License
@@ -5,17 +5,3 @@ Coding examples
5
5
 
6
6
  Explore our gallery of examples demonstrating the usage of FiberFusing. These examples range from general API usage to specific applications, presented in a tutorial format to guide users through practical implementations.
7
7
 
8
- .. toctree::
9
- :maxdepth: 2
10
- :hidden:
11
-
12
- clad/index.rst
13
- geometry/index.rst
14
-
15
-
16
- .. include:: clad/index.rst
17
- :start-after: .. _clad_index:
18
-
19
- .. include:: geometry/index.rst
20
- :start-after: .. _geometry_index:
21
-
@@ -17,11 +17,17 @@ structure = FusedProfile(
17
17
  index=material.compute_refractive_index(wavelength),
18
18
  )
19
19
 
20
+ # %%
21
+ factor = 0
22
+ structure.randomize_core_position(random_factor=factor)
23
+ structure.plot(show_centers=True, show_cores=True)
20
24
 
21
- for factor in [0, 10e-6]:
22
- structure.randomize_core_position(random_factor=factor)
23
-
24
- structure.plot(show_centers=True, show_cores=True)
25
-
25
+ # %%
26
+ factor = 10e-6
27
+ structure.randomize_core_position(random_factor=factor)
28
+ structure.plot(show_centers=True, show_cores=True)
26
29
 
27
- # -
30
+ # %%
31
+ factor = 10e-6
32
+ structure.randomize_core_position(random_factor=factor)
33
+ structure.plot(show_centers=True, show_cores=True)
@@ -1,6 +1,6 @@
1
1
  """
2
- Effect of fusion degree
3
- =======================
2
+ Effect of translation
3
+ =====================
4
4
  """
5
5
 
6
6
  # %%
@@ -17,10 +17,12 @@ structure = FusedProfile(
17
17
  index=material.compute_refractive_index(wavelength),
18
18
  )
19
19
 
20
- for shift in [(0, 0), (20e-6, 0)]:
21
- structure.translate(shift)
22
-
23
- structure.plot()
24
-
20
+ # %%
21
+ shift = (0, 0)
22
+ structure.translate(shift)
23
+ structure.plot()
25
24
 
26
- # -
25
+ # %%
26
+ shift = (20e-6, 0)
27
+ structure.translate(shift)
28
+ structure.plot()
@@ -3,11 +3,6 @@
3
3
  Utilities Module
4
4
  ----------------
5
5
 
6
- .. autofunction:: FiberFusing.utils.get_silica_index
7
- :noindex:
8
-
9
- The `get_silica_index` function calculates the refractive index of silica based on the wavelength, using established empirical formulas. It is a core utility for determining optical properties within the simulation.
10
-
11
6
  .. autofunction:: FiberFusing.utils.union_geometries
12
7
  :noindex:
13
8
 
@@ -14,5 +14,4 @@ This section provides an overview of the primary classes used in the `FiberFusin
14
14
  code/coordinate_system.rst
15
15
  code/buffer.rst
16
16
  code/components.rst
17
- code/overlay_structure.rst
18
17
  code/utils.rst
@@ -3,28 +3,36 @@
3
3
 
4
4
  import sys
5
5
  import os
6
+ from sphinx_gallery.sorting import FileNameSortKey
6
7
  from MPSPlots.styles import use_mpsplots_style
7
- import FiberFusing
8
8
  from pathlib import Path
9
- from FiberFusing.directories import doc_css_path, examples_path
9
+ import FiberFusing
10
+ from FiberFusing.directories import doc_css_path
11
+
12
+
13
+ package_name = "FiberFusing"
14
+ version = FiberFusing.__version__
10
15
 
11
- sys.path.append(str(Path(".").resolve()))
16
+ current_dir = Path(".")
17
+
18
+ sys.path.append(str(current_dir.resolve()))
12
19
 
13
20
 
14
21
  def setup(app):
15
22
  app.add_css_file(str(doc_css_path))
16
23
 
17
24
 
18
- autodoc_mock_imports = []
25
+ autodoc_mock_imports = [
26
+ 'numpy',
27
+ 'matplotlib',
28
+ 'numpydoc',
29
+ ]
19
30
 
20
31
 
21
- project = 'FiberFusing'
32
+ project = package_name
22
33
  copyright = '2024, Martin Poinsinet de Sivry-Houle'
23
34
  author = 'Martin Poinsinet de Sivry-Houle'
24
35
 
25
-
26
- version = FiberFusing.__version__
27
-
28
36
  extensions = [
29
37
  'sphinx.ext.mathjax',
30
38
  'pyvista.ext.plot_directive',
@@ -49,21 +57,15 @@ def reset_mpl(gallery_conf, fname):
49
57
 
50
58
 
51
59
  examples_files = [
52
- 'clad', 'geometry'
53
- ]
54
-
55
-
56
- examples_dirs = [
57
- examples_path.joinpath('clad'),
58
- examples_path.joinpath('geometry')
60
+ 'utils', 'sellmeier', 'tabulated'
59
61
  ]
60
62
 
61
-
62
63
  sphinx_gallery_conf = {
63
- "examples_dirs": ['../examples/' + f for f in examples_files],
64
- "gallery_dirs": ['gallery/' + f for f in examples_files],
64
+ 'examples_dirs': ['../examples'],
65
+ 'gallery_dirs': ['gallery'],
65
66
  'image_scrapers': ('matplotlib'),
66
67
  'ignore_pattern': '/__',
68
+ 'filename_pattern': r'.*\.py',
67
69
  'plot_gallery': True,
68
70
  'thumbnail_size': [600, 600],
69
71
  'download_all_examples': False,
@@ -72,6 +74,7 @@ sphinx_gallery_conf = {
72
74
  'remove_config_comments': True,
73
75
  'capture_repr': ('_repr_html_', '__repr__'),
74
76
  'nested_sections': True,
77
+ 'within_subsection_order': FileNameSortKey,
75
78
  }
76
79
 
77
80
 
@@ -92,7 +95,6 @@ language = 'en'
92
95
  highlight_language = 'python3'
93
96
  html_theme = "pydata_sphinx_theme"
94
97
 
95
-
96
98
  # -- Options for HTML output -------------------------------------------------
97
99
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
98
100
 
@@ -101,31 +103,29 @@ exclude_trees = []
101
103
  pygments_style = "sphinx"
102
104
 
103
105
  # -- Sphinx-gallery configuration --------------------------------------------
104
- binder_branch = "main"
105
-
106
106
  major, minor = version[:2]
107
107
  binder_branch = f"v{major}.{minor}.x"
108
108
 
109
109
  html_theme_options = dict()
110
110
 
111
- html_theme_options['logo'] = dict(text='FiberFusing', image="_static/thumbnail.png")
111
+ html_theme_options['logo'] = dict(text=package_name, image="_static/thumbnail.png")
112
112
  html_theme_options["show_nav_level"] = 0
113
113
 
114
114
  html_theme_options.update({
115
115
  "icon_links": [
116
116
  {
117
117
  "name": "GitHub",
118
- "url": "https://github.com/MartinPdeS/FiberFusing",
118
+ "url": f"https://github.com/MartinPdeS/{package_name}",
119
119
  "icon": "fa-brands fa-github",
120
120
  },
121
121
  {
122
122
  "name": "PyPI",
123
- "url": "https://pypi.org/project/fiberfusing/",
123
+ "url": f"https://pypi.org/project/{package_name}/",
124
124
  "icon": "fa-solid fa-box",
125
125
  },
126
126
  {
127
127
  "name": "Anaconda",
128
- "url": "https://anaconda.org/MartinPdeS/fiberfusing",
128
+ "url": f"https://anaconda.org/MartinPdeS/{package_name}",
129
129
  "icon": "fa-brands fa-python",
130
130
  },
131
131
  ],
@@ -145,27 +145,28 @@ html_theme_options.update({
145
145
  current_version = os.getenv("tag", "latest")
146
146
 
147
147
  html_theme_options["switcher"] = dict(
148
- json_url="https://raw.githubusercontent.com/MartinPdeS/FiberFusing/documentation_page/version_switcher.json",
148
+ json_url=f"https://raw.githubusercontent.com/MartinPdeS/{package_name}/documentation_page/version_switcher.json",
149
149
  version_match=current_version,
150
150
  )
151
151
 
152
- htmlhelp_basename = 'FiberFusingdoc'
152
+ htmlhelp_basename = f'{package_name}doc'
153
153
 
154
154
  latex_elements = {}
155
155
 
156
+
156
157
  latex_documents = [
157
- (master_doc, 'FiberFusing.tex', 'FiberFusing Documentation',
158
+ (master_doc, f'{package_name}.tex', f'{package_name} Documentation',
158
159
  'Martin Poinsinet de Sivry-Houle', 'manual'),
159
160
  ]
160
161
 
161
162
  man_pages = [
162
- (master_doc, 'fiberfusing', 'FiberFusing Documentation',
163
+ (master_doc, 'supymode', f'{package_name} Documentation',
163
164
  [author], 1)
164
165
  ]
165
166
 
166
167
  texinfo_documents = [
167
- (master_doc, 'FiberFusing', 'FiberFusing Documentation',
168
- author, 'FiberFusing', 'One line description of project.',
168
+ (master_doc, package_name, f'{package_name} Documentation',
169
+ author, package_name, 'One line description of project.',
169
170
  'Miscellaneous'),
170
171
  ]
171
172