FiberFusing 1.3.4__tar.gz → 1.4.11.post0__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 FiberFusing might be problematic. Click here for more details.
- fiberfusing-1.4.11.post0/.flake8 +6 -0
- fiberfusing-1.4.11.post0/.github/dependabot.yml +11 -0
- fiberfusing-1.4.11.post0/.github/workflows/deploy_anaconda.yml +34 -0
- fiberfusing-1.4.11.post0/.github/workflows/deploy_coverage.yml +54 -0
- fiberfusing-1.4.11.post0/.github/workflows/deploy_documentation.yml +60 -0
- fiberfusing-1.4.11.post0/.github/workflows/deploy_pypi.yml +30 -0
- fiberfusing-1.4.11.post0/.gitignore +23 -0
- fiberfusing-1.4.11.post0/.readthedocs.yml +35 -0
- fiberfusing-1.4.11.post0/FiberFusing/__init__.py +15 -0
- fiberfusing-1.4.11.post0/FiberFusing/_version.py +16 -0
- fiberfusing-1.4.11.post0/FiberFusing/background.py +88 -0
- fiberfusing-1.4.11.post0/FiberFusing/base_fused.py +596 -0
- fiberfusing-1.4.11.post0/FiberFusing/buffer.py +163 -0
- fiberfusing-1.4.11.post0/FiberFusing/components/base_class.py +433 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/components/linestring.py +0 -11
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/components/point.py +10 -24
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/components/polygon.py +27 -96
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/connection.py +107 -81
- fiberfusing-1.4.11.post0/FiberFusing/connection_optimization.py +246 -0
- fiberfusing-1.4.11.post0/FiberFusing/coordinate_system.py +256 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/directories.py +2 -10
- fiberfusing-1.4.11.post0/FiberFusing/fiber/catalogue.py +164 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/1550BHP.yaml +14 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/DCF13.yaml +18 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/DCF1300S_20.yaml +17 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/DCF1300S_26.yaml +18 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/DCF1300S_33.yaml +17 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/DCF1300S_42.yaml +18 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/F2028M12.yaml +18 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/F2028M21.yaml +18 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/F2028M24.yaml +18 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/F2058G1.yaml +18 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/F2058L1.yaml +18 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/HI1060.yaml +14 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/HP630.yaml +13 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/SM1950.yaml +14 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/SMF28.yaml +14 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/fluorine_doped_1%_capillary.yaml +9 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/fluorine_doped_2%_capillary.yaml +9 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/test_fiber.yaml +14 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/fiber_files/test_multimode_fiber.yaml +14 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/generic_fiber.py +442 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber/loader.py +120 -0
- fiberfusing-1.4.11.post0/FiberFusing/fiber_structure.py +210 -0
- fiberfusing-1.4.11.post0/FiberFusing/geometry.py +402 -0
- fiberfusing-1.3.4/FiberFusing/utility/overlay_structure_on_mesh.py → fiberfusing-1.4.11.post0/FiberFusing/helper.py +25 -6
- fiberfusing-1.4.11.post0/FiberFusing/optical_structure.py +96 -0
- fiberfusing-1.4.11.post0/FiberFusing/plottings.py +47 -0
- fiberfusing-1.4.11.post0/FiberFusing/utils.py +218 -0
- fiberfusing-1.4.11.post0/FiberFusing.egg-info/PKG-INFO +186 -0
- fiberfusing-1.4.11.post0/FiberFusing.egg-info/SOURCES.txt +129 -0
- fiberfusing-1.4.11.post0/FiberFusing.egg-info/requires.txt +21 -0
- fiberfusing-1.4.11.post0/PKG-INFO +186 -0
- fiberfusing-1.4.11.post0/README.rst +123 -0
- fiberfusing-1.4.11.post0/docs/Makefile +19 -0
- fiberfusing-1.4.11.post0/docs/examples/README.rst +6 -0
- fiberfusing-1.4.11.post0/docs/examples/clad/README.rst +2 -0
- fiberfusing-1.4.11.post0/docs/examples/clad/plot_line_3.py +18 -0
- fiberfusing-1.4.11.post0/docs/examples/clad/plot_line_4.py +18 -0
- fiberfusing-1.4.11.post0/docs/examples/clad/plot_line_5.py +18 -0
- fiberfusing-1.4.11.post0/docs/examples/clad/plot_ring_12.py +16 -0
- fiberfusing-1.4.11.post0/docs/examples/clad/plot_ring_19.py +17 -0
- fiberfusing-1.4.11.post0/docs/examples/clad/plot_ring_2.py +17 -0
- fiberfusing-1.4.11.post0/docs/examples/clad/plot_ring_3py +17 -0
- fiberfusing-1.4.11.post0/docs/examples/clad/plot_ring_4.py +17 -0
- fiberfusing-1.4.11.post0/docs/examples/clad/plot_ring_7.py +17 -0
- fiberfusing-1.4.11.post0/docs/examples/clad/plot_single.py +17 -0
- fiberfusing-1.4.11.post0/docs/examples/geometry/README.rst +2 -0
- fiberfusing-1.4.11.post0/docs/examples/geometry/plot_line_3.py +44 -0
- fiberfusing-1.4.11.post0/docs/examples/geometry/plot_line_4.py +44 -0
- fiberfusing-1.4.11.post0/docs/examples/geometry/plot_line_5.py +44 -0
- fiberfusing-1.4.11.post0/docs/examples/geometry/plot_ring_10.py +43 -0
- fiberfusing-1.4.11.post0/docs/examples/geometry/plot_ring_2.py +44 -0
- fiberfusing-1.4.11.post0/docs/examples/geometry/plot_ring_3.py +46 -0
- fiberfusing-1.4.11.post0/docs/examples/geometry/plot_ring_4.py +45 -0
- fiberfusing-1.4.11.post0/docs/examples/geometry/plot_ring_5.py +46 -0
- fiberfusing-1.4.11.post0/docs/examples/geometry/plot_ring_7.py +44 -0
- fiberfusing-1.4.11.post0/docs/examples/geometry/plot_single.py +44 -0
- fiberfusing-1.4.11.post0/docs/images/example_3x3.png +0 -0
- fiberfusing-1.4.11.post0/docs/images/logo.png +0 -0
- fiberfusing-1.4.11.post0/docs/make.bat +35 -0
- fiberfusing-1.4.11.post0/docs/source/_static/default.css +19 -0
- fiberfusing-1.4.11.post0/docs/source/code/buffer.rst +17 -0
- fiberfusing-1.4.11.post0/docs/source/code/components.rst +31 -0
- fiberfusing-1.4.11.post0/docs/source/code/coordinate_system.rst +10 -0
- fiberfusing-1.4.11.post0/docs/source/code/geometry.rst +10 -0
- fiberfusing-1.4.11.post0/docs/source/code/overlay_structure.rst +10 -0
- fiberfusing-1.4.11.post0/docs/source/code/utils.rst +22 -0
- fiberfusing-1.4.11.post0/docs/source/code.rst +21 -0
- fiberfusing-1.4.11.post0/docs/source/conf.py +178 -0
- fiberfusing-1.4.11.post0/docs/source/gallery/index.rst +401 -0
- fiberfusing-1.4.11.post0/docs/source/index.rst +16 -0
- fiberfusing-1.4.11.post0/docs/source/references.rst +6 -0
- fiberfusing-1.4.11.post0/docs/source/theory.rst +5 -0
- fiberfusing-1.4.11.post0/meta.yaml +68 -0
- fiberfusing-1.4.11.post0/pyproject.toml +89 -0
- fiberfusing-1.4.11.post0/setup.cfg +4 -0
- fiberfusing-1.4.11.post0/tests/fiber_loader.py +65 -0
- fiberfusing-1.4.11.post0/tests/test_boundaries.py +58 -0
- fiberfusing-1.4.11.post0/tests/test_cooordinate_system.py +155 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/tests/test_fiber.py +29 -9
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/tests/test_fused_structure.py +14 -13
- fiberfusing-1.4.11.post0/tests/test_geometries.py +119 -0
- fiberfusing-1.3.4/FiberFusing/VERSION +0 -1
- fiberfusing-1.3.4/FiberFusing/__init__.py +0 -79
- fiberfusing-1.3.4/FiberFusing/__pycache__/__init__.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/__pycache__/background.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/__pycache__/base_fused.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/__pycache__/buffer.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/__pycache__/connection.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/__pycache__/coordinate_system.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/__pycache__/geometry.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/__pycache__/utils.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/background.py +0 -88
- fiberfusing-1.3.4/FiberFusing/base_fused.py +0 -510
- fiberfusing-1.3.4/FiberFusing/buffer.py +0 -95
- fiberfusing-1.3.4/FiberFusing/components/__pycache__/__init__.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/components/__pycache__/base_class.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/components/__pycache__/linestring.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/components/__pycache__/point.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/components/__pycache__/polygon.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/components/__pycache__/utils.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/components/base_class.py +0 -161
- fiberfusing-1.3.4/FiberFusing/configuration/__pycache__/__init__.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/line/__pycache__/__init__.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/line/__pycache__/configuration_01x01.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/line/__pycache__/configuration_02x02.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/line/__pycache__/configuration_03x03.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/line/__pycache__/configuration_04x04.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/line/__pycache__/configuration_05x05.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/ring/__pycache__/__init__.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/ring/__pycache__/configuration_01x01.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/ring/__pycache__/configuration_02x02.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/ring/__pycache__/configuration_03x03.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/ring/__pycache__/configuration_04x04.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/ring/__pycache__/configuration_05x05.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/ring/__pycache__/configuration_06x06.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/ring/__pycache__/configuration_07x07.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/ring/__pycache__/configuration_10x10.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/ring/__pycache__/configuration_12x12.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/configuration/ring/__pycache__/configuration_19x19.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/coordinate_system.py +0 -165
- fiberfusing-1.3.4/FiberFusing/fiber/__pycache__/__init__.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/fiber/__pycache__/catalogue.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/fiber/__pycache__/generic_fiber.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/fiber/__pycache__/structure_collection.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/fiber/catalogue.py +0 -131
- fiberfusing-1.3.4/FiberFusing/fiber/generic_fiber.py +0 -406
- fiberfusing-1.3.4/FiberFusing/geometry.py +0 -342
- fiberfusing-1.3.4/FiberFusing/sub_structures/__pycache__/__init__.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/sub_structures/__pycache__/base_class.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/sub_structures/__pycache__/line.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/sub_structures/__pycache__/ring.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/sub_structures/base_class.py +0 -139
- fiberfusing-1.3.4/FiberFusing/sub_structures/line.py +0 -78
- fiberfusing-1.3.4/FiberFusing/sub_structures/ring.py +0 -75
- fiberfusing-1.3.4/FiberFusing/utility/__init__.py +0 -0
- fiberfusing-1.3.4/FiberFusing/utility/__pycache__/__init__.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/utility/__pycache__/connection_optimization.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/utility/__pycache__/overlay_structure_on_mesh.cpython-311.pyc +0 -0
- fiberfusing-1.3.4/FiberFusing/utility/connection_optimization.py +0 -232
- fiberfusing-1.3.4/FiberFusing/utils.py +0 -174
- fiberfusing-1.3.4/FiberFusing.egg-info/PKG-INFO +0 -140
- fiberfusing-1.3.4/FiberFusing.egg-info/SOURCES.txt +0 -109
- fiberfusing-1.3.4/FiberFusing.egg-info/requires.txt +0 -22
- fiberfusing-1.3.4/MANIFEST.in +0 -19
- fiberfusing-1.3.4/PKG-INFO +0 -140
- fiberfusing-1.3.4/README.rst +0 -96
- fiberfusing-1.3.4/pyproject.toml +0 -11
- fiberfusing-1.3.4/setup.cfg +0 -79
- fiberfusing-1.3.4/setup.py +0 -6
- fiberfusing-1.3.4/tests/__pycache__/test_boundaries.cpython-311-pytest-8.3.1.pyc +0 -0
- fiberfusing-1.3.4/tests/__pycache__/test_fiber.cpython-311-pytest-8.3.1.pyc +0 -0
- fiberfusing-1.3.4/tests/__pycache__/test_fused_structure.cpython-311-pytest-8.3.1.pyc +0 -0
- fiberfusing-1.3.4/tests/__pycache__/test_geometries.cpython-311-pytest-8.3.1.pyc +0 -0
- fiberfusing-1.3.4/tests/test_boundaries.py +0 -42
- fiberfusing-1.3.4/tests/test_geometries.py +0 -77
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/components/__init__.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/components/utils.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/__init__.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/line/__init__.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/line/configuration_01x01.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/line/configuration_02x02.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/line/configuration_03x03.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/line/configuration_04x04.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/line/configuration_05x05.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/ring/__init__.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/ring/configuration_01x01.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/ring/configuration_02x02.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/ring/configuration_03x03.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/ring/configuration_04x04.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/ring/configuration_05x05.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/ring/configuration_06x06.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/ring/configuration_07x07.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/ring/configuration_10x10.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/ring/configuration_12x12.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/ring/configuration_19x19.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/ring/mode_groupe_pl_6.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/configuration/ring/scaling_photonic_lantern_10.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/fiber/__init__.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing/fiber/structure_collection.py +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing.egg-info/dependency_links.txt +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/FiberFusing.egg-info/top_level.txt +0 -0
- {fiberfusing-1.3.4 → fiberfusing-1.4.11.post0}/LICENSE +0 -0
- {fiberfusing-1.3.4/FiberFusing/sub_structures → fiberfusing-1.4.11.post0/tests}/__init__.py +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Deploy Conda Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "master" ]
|
|
6
|
+
tags:
|
|
7
|
+
- '*'
|
|
8
|
+
pull_request:
|
|
9
|
+
branches: [ "master" ]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build_and_publish_conda_package:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout Repository
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up Miniconda
|
|
19
|
+
uses: conda-incubator/setup-miniconda@v2
|
|
20
|
+
with:
|
|
21
|
+
channels: conda-forge
|
|
22
|
+
python-version: '3.11'
|
|
23
|
+
|
|
24
|
+
- name: Upload to Anaconda (if tag)
|
|
25
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
26
|
+
run: |
|
|
27
|
+
conda config --set anaconda_upload true
|
|
28
|
+
|
|
29
|
+
- name: Create Conda Environment and Install Dependencies
|
|
30
|
+
env:
|
|
31
|
+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} # Ensure the Anaconda token is set
|
|
32
|
+
run: |
|
|
33
|
+
conda install conda-build anaconda-client conda-verify -y
|
|
34
|
+
conda build . -c martinpdes
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# .github/workflows/deploy_coverage.yml
|
|
2
|
+
name: Coverage
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [ "master" ]
|
|
7
|
+
tags:
|
|
8
|
+
- '*'
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ "master" ]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
coverage:
|
|
15
|
+
name: Run test and generate coverage data
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
pull-requests: write
|
|
19
|
+
contents: write
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: "Set-up: Python 3.10"
|
|
23
|
+
uses: actions/setup-python@v4
|
|
24
|
+
id: cp310
|
|
25
|
+
with:
|
|
26
|
+
python-version: "3.10"
|
|
27
|
+
|
|
28
|
+
- name: "Install: Dependencies for headless server"
|
|
29
|
+
shell: bash
|
|
30
|
+
run: |
|
|
31
|
+
sudo apt-get update
|
|
32
|
+
sudo apt-get install xvfb
|
|
33
|
+
|
|
34
|
+
- name: "Checkout requirements and files for testing"
|
|
35
|
+
uses: actions/checkout@v4
|
|
36
|
+
with:
|
|
37
|
+
fetch-depth: 0
|
|
38
|
+
submodules: true
|
|
39
|
+
|
|
40
|
+
- name: Install everything, run the tests, produce the .coverage file
|
|
41
|
+
run: |
|
|
42
|
+
python -m pip install wheel build
|
|
43
|
+
python -m build --wheel
|
|
44
|
+
python -m pip install .[testing]
|
|
45
|
+
pytest
|
|
46
|
+
|
|
47
|
+
- name: Coverage comment
|
|
48
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
49
|
+
uses: py-cov-action/python-coverage-comment-action@v3
|
|
50
|
+
with:
|
|
51
|
+
GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}
|
|
52
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
53
|
+
MINIMUM_GREEN: 90
|
|
54
|
+
MINIMUM_ORANGE: 50
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# .github/workflows/deploy_documentation.yml
|
|
2
|
+
name: Documentation
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [ "master" ]
|
|
7
|
+
tags:
|
|
8
|
+
- '*'
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ "master" ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
documentation:
|
|
14
|
+
name: Run the documentation building tools
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
pull-requests: write
|
|
18
|
+
contents: write
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- name: "Set-up: Python 3.10"
|
|
22
|
+
uses: actions/setup-python@v4
|
|
23
|
+
id: cp310
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.10"
|
|
26
|
+
|
|
27
|
+
- name: "Install: Dependencies for headless server"
|
|
28
|
+
shell: bash
|
|
29
|
+
run: |
|
|
30
|
+
sudo apt-get update
|
|
31
|
+
sudo apt-get install xvfb
|
|
32
|
+
|
|
33
|
+
- name: "Checkout requirements and files for testing"
|
|
34
|
+
uses: actions/checkout@v4
|
|
35
|
+
with:
|
|
36
|
+
fetch-depth: 0
|
|
37
|
+
submodules: true
|
|
38
|
+
|
|
39
|
+
- name: Install everything, run the tests, produce the .coverage file
|
|
40
|
+
run: |
|
|
41
|
+
python -m pip install wheel build
|
|
42
|
+
python -m build --wheel
|
|
43
|
+
python -m pip install .[documentation]
|
|
44
|
+
|
|
45
|
+
- name: Install dependencies
|
|
46
|
+
run: |
|
|
47
|
+
pip install sphinx sphinx_rtd_theme myst_parser
|
|
48
|
+
|
|
49
|
+
- name: Sphinx build
|
|
50
|
+
run: |
|
|
51
|
+
sphinx-build docs/source _build
|
|
52
|
+
|
|
53
|
+
- name: Deploy to GitHub Pages
|
|
54
|
+
uses: peaceiris/actions-gh-pages@v3
|
|
55
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
56
|
+
with:
|
|
57
|
+
publish_branch: gh-pages
|
|
58
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
59
|
+
publish_dir: _build/
|
|
60
|
+
force_orphan: true
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Deploy Wheel
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "master" ]
|
|
6
|
+
tags:
|
|
7
|
+
- '*'
|
|
8
|
+
pull_request:
|
|
9
|
+
branches: [ "master" ]
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build_pure_python:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: MartinPdeS/MPSActions/build_pure_python_package@master
|
|
19
|
+
with:
|
|
20
|
+
python-version: '3.10'
|
|
21
|
+
|
|
22
|
+
publish_wheel:
|
|
23
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
24
|
+
needs: [build_pure_python]
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: MartinPdeS/MPSActions/publish_pypi@master
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.10"
|
|
30
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
*.DS_store
|
|
5
|
+
*.ipynb_checkpoints*
|
|
6
|
+
*__pycache__*
|
|
7
|
+
*.so
|
|
8
|
+
*.a
|
|
9
|
+
.coverage*
|
|
10
|
+
*.pytest_cache
|
|
11
|
+
htmlcov
|
|
12
|
+
dist
|
|
13
|
+
build
|
|
14
|
+
*.egg*
|
|
15
|
+
*.whl
|
|
16
|
+
CMakeCache.txt
|
|
17
|
+
CMakeFiles
|
|
18
|
+
install_manifest.txt
|
|
19
|
+
cmake_install.cmake
|
|
20
|
+
wheelhouse
|
|
21
|
+
|
|
22
|
+
docs/source/gallery/*
|
|
23
|
+
!docs/source/gallery/index.rst
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# .readthedocs.yml
|
|
2
|
+
# Read the Docs configuration file
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
# Required
|
|
6
|
+
version: 2
|
|
7
|
+
|
|
8
|
+
submodules:
|
|
9
|
+
include: all
|
|
10
|
+
recursive: true
|
|
11
|
+
|
|
12
|
+
build:
|
|
13
|
+
os: ubuntu-22.04
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
tools:
|
|
17
|
+
python: "3.11"
|
|
18
|
+
jobs:
|
|
19
|
+
pre_install:
|
|
20
|
+
- Xvfb :99 &
|
|
21
|
+
- export DISPLAY=:99
|
|
22
|
+
- cd docs && rm -rf source/gallery
|
|
23
|
+
- sleep 3
|
|
24
|
+
|
|
25
|
+
python:
|
|
26
|
+
install:
|
|
27
|
+
- method: pip
|
|
28
|
+
path: .
|
|
29
|
+
extra_requirements:
|
|
30
|
+
- documentation
|
|
31
|
+
|
|
32
|
+
sphinx:
|
|
33
|
+
builder: html
|
|
34
|
+
configuration: docs/source/conf.py
|
|
35
|
+
fail_on_warning: false
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from .geometry import Geometry # noqa: F401
|
|
2
|
+
from .components.point import Point # noqa: F401
|
|
3
|
+
from .components.linestring import LineString # noqa: F401
|
|
4
|
+
from .components.polygon import Polygon, EmptyPolygon # noqa: F401
|
|
5
|
+
from .buffer import Circle, Square # noqa: F401
|
|
6
|
+
from .background import BackGround # noqa: F401
|
|
7
|
+
from .optical_structure import CircleOpticalStructure # noqa: F401
|
|
8
|
+
micro = 1e-6
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
from ._version import version as __version__ # noqa: F401
|
|
13
|
+
|
|
14
|
+
except ImportError:
|
|
15
|
+
__version__ = "0.0.0"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# file generated by setuptools_scm
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
TYPE_CHECKING = False
|
|
4
|
+
if TYPE_CHECKING:
|
|
5
|
+
from typing import Tuple, Union
|
|
6
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
|
+
else:
|
|
8
|
+
VERSION_TUPLE = object
|
|
9
|
+
|
|
10
|
+
version: str
|
|
11
|
+
__version__: str
|
|
12
|
+
__version_tuple__: VERSION_TUPLE
|
|
13
|
+
version_tuple: VERSION_TUPLE
|
|
14
|
+
|
|
15
|
+
__version__ = version = '1.4.11.post0'
|
|
16
|
+
__version_tuple__ = version_tuple = (1, 4, 11)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
from typing import Tuple, Optional
|
|
5
|
+
from pydantic.dataclasses import dataclass
|
|
6
|
+
from pydantic import ConfigDict
|
|
7
|
+
import numpy as np
|
|
8
|
+
|
|
9
|
+
from FiberFusing.coordinate_system import CoordinateSystem
|
|
10
|
+
from FiberFusing.helper import OverlayStructureBaseClass
|
|
11
|
+
from FiberFusing import Circle
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class NameSpace:
|
|
15
|
+
"""
|
|
16
|
+
A flexible class that allows dynamic addition of attributes via keyword arguments.
|
|
17
|
+
"""
|
|
18
|
+
def __init__(self, **kwargs):
|
|
19
|
+
"""
|
|
20
|
+
Initializes an instance with attributes specified by keyword arguments.
|
|
21
|
+
|
|
22
|
+
Parameters
|
|
23
|
+
----------
|
|
24
|
+
**kwargs : dict
|
|
25
|
+
Arbitrary keyword arguments to set as attributes.
|
|
26
|
+
"""
|
|
27
|
+
self.__dict__.update(kwargs)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@dataclass(config=ConfigDict(extra='forbid', kw_only=True))
|
|
31
|
+
class BackGround(OverlayStructureBaseClass):
|
|
32
|
+
"""
|
|
33
|
+
Represents a background structure overlayed on a mesh, characterized by a circular shape.
|
|
34
|
+
|
|
35
|
+
Attributes
|
|
36
|
+
----------
|
|
37
|
+
index : float
|
|
38
|
+
Refractive index of the background.
|
|
39
|
+
radius : float, optional
|
|
40
|
+
Radius of the circular structure, by default 1000.
|
|
41
|
+
position : Optional[Tuple[float, float]], optional
|
|
42
|
+
A tuple (x, y) specifying the position of the circle's center, by default (0, 0).
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
index: float
|
|
46
|
+
radius: float = 1000
|
|
47
|
+
position: Optional[Tuple[float, float]] = (0, 0)
|
|
48
|
+
|
|
49
|
+
def __post_init__(self):
|
|
50
|
+
"""
|
|
51
|
+
Initializes the background structure by creating a circular polygon.
|
|
52
|
+
"""
|
|
53
|
+
polygon = Circle(position=self.position, radius=self.radius, index=self.index)
|
|
54
|
+
self.structure_list = [NameSpace(index=self.index, polygon=polygon, name='background')]
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def refractive_index_list(self) -> list:
|
|
58
|
+
"""
|
|
59
|
+
Returns the list of refractive indices for the structures.
|
|
60
|
+
|
|
61
|
+
Returns
|
|
62
|
+
-------
|
|
63
|
+
list
|
|
64
|
+
A list containing the refractive index of the background.
|
|
65
|
+
"""
|
|
66
|
+
return [self.index]
|
|
67
|
+
|
|
68
|
+
def overlay_structures_on_mesh(self, mesh: np.ndarray, coordinate_system: CoordinateSystem) -> np.ndarray:
|
|
69
|
+
"""
|
|
70
|
+
Overlays all structures onto the given mesh using the specified coordinate system.
|
|
71
|
+
|
|
72
|
+
Parameters
|
|
73
|
+
----------
|
|
74
|
+
mesh : np.ndarray
|
|
75
|
+
The mesh to overlay structures onto.
|
|
76
|
+
coordinate_system : CoordinateSystem
|
|
77
|
+
The coordinate system used for overlaying.
|
|
78
|
+
|
|
79
|
+
Returns
|
|
80
|
+
-------
|
|
81
|
+
np.ndarray
|
|
82
|
+
A numpy ndarray with the structures overlayed onto the original mesh.
|
|
83
|
+
"""
|
|
84
|
+
return self._overlay_structure_on_mesh_(
|
|
85
|
+
structure_list=self.structure_list,
|
|
86
|
+
mesh=mesh,
|
|
87
|
+
coordinate_system=coordinate_system
|
|
88
|
+
)
|