Skip to content

Commit

Permalink
various updates following merging pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
scottprahl committed May 4, 2024
2 parents 29d5ef6 + dc8eefa commit 4eed41f
Show file tree
Hide file tree
Showing 15 changed files with 147 additions and 77 deletions.
1 change: 1 addition & 0 deletions .github/scripts/update_citation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Update the CITATION.cff file for latest version."""
import json
import requests
import yaml
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
==========

0.8.1 (5/4/2024)
-------------------
* Implemented FF_node_polar_angle (@matt8s)
* Added FF_node_polar_angle() example to 9-Far-field-irradiance.ipynb (@matt8s)
* Modified _FF_polar_x to take argument kasin (@matt8s)
* Improved configuration for ruff linting tool

0.8.0 (2/13/24)
-------------------
* add functions for far-field irradiance (thanks @matt8s)
Expand Down
14 changes: 3 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,16 @@ lint:
-pylint ofiber/refraction.py
-pylint ofiber/__init__.py

doccheck:
-pydocstyle ofiber/basics.py
-pydocstyle ofiber/cylinder_step.py
-pydocstyle ofiber/dispersion.py
-pydocstyle ofiber/graded_index.py
-pydocstyle ofiber/noise.py
-pydocstyle ofiber/planar_parabolic.py
-pydocstyle ofiber/planar_step.py
-pydocstyle ofiber/refraction.py
-pydocstyle ofiber/__init__.py
ruff:
ruff check

notecheck:
make clean
pytest --verbose tests/test_all_notebooks.py

rcheck:
make lint
make doccheck
make ruff
make rstcheck
make html
check-manifest
Expand Down
26 changes: 13 additions & 13 deletions docs/9-Far-field-irradiance.ipynb

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
project = 'ofiber'
master_doc = 'index'


def get_init_property(prop):
"""Return property from __init__.py."""
here = os.path.abspath(os.path.dirname(__file__))
Expand All @@ -27,6 +28,7 @@ def get_init_property(prop):
result = re.search(regex, file.read())
return result.group(1)


release = get_init_property("__version__")
author = get_init_property("__author__")
copyright = get_init_property("__copyright__")
Expand Down
5 changes: 3 additions & 2 deletions ofiber/basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def critical_angle(n_core, n_clad):
Args:
n_core : the index of refraction of the fiber core [--]
n_core : the index of refraction of the fiber cladding [--]
n_clad : the index of refraction of the fiber cladding [--]
Returns:
angle of total internal reflection [radians]
Expand Down Expand Up @@ -119,7 +119,8 @@ def esi_Delta(Delta, q):
Calculate equivalent step index (esi) Delta for a graded-index fiber.
Args:
Delta : relative refractive index [-]
Delta : relative refractive index [-]
q : parameter for graded index fiber [-]
Returns:
equivalent relative refractive index [-]
Expand Down
Loading

0 comments on commit 4eed41f

Please sign in to comment.