Skip to content

Commit

Permalink
v1.1.0 prep (#38)
Browse files Browse the repository at this point in the history
* add change log entry for #35

* resolve #25

* bump to v1.1.0

* fix up

* remove old codecov.yml

* explicitly list source dirs in .coveragerc

* more settings in .coveragerc

* add pypi badge
  • Loading branch information
JoshKarpel committed Nov 19, 2020
1 parent ff3fe05 commit 89acc7b
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 29 deletions.
9 changes: 9 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
[run]

source =
idesolver
tests

branch = True

[report]

exclude_lines =
pragma: no cover
pragma: unreachable
Expand All @@ -12,3 +18,6 @@ exclude_lines =
if 0:
if False:
if __name__ == .__main__.:

skip_empty = True
show_missing = True
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ idesolver
.. image:: https://readthedocs.org/projects/idesolver/badge/?version=latest
:target: https://idesolver.readthedocs.io/en/latest/?badge=latest

.. image:: https://img.shields.io/pypi/v/idesolver :alt: PyPI

.. image:: https://codecov.io/gh/JoshKarpel/idesolver/branch/master/graph/badge.svg
:target: https://codecov.io/gh/JoshKarpel/idesolver

Expand Down
20 changes: 0 additions & 20 deletions codecov.yml

This file was deleted.

4 changes: 4 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Change Log

.. currentmodule:: idesolver

v1.1.0
------
* Add support for multidimensional IDEs (PR :pr:`35` resolves :issue:`28`, thanks `nbrucy <https://github.com/nbrucy>`_!)

v1.0.5
------
* Relaxes dependency version restrictions in advance of changes to ``pip``.
Expand Down
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"sphinx.ext.githubpages",
"sphinx.ext.napoleon",
"sphinx_rtd_theme",
"sphinx_issues",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -210,3 +211,6 @@

autodoc_member_order = "bysource"
autoclass_content = "both"

# sphinx-issues config
issues_github_path = "JoshKarpel/idesolver"
29 changes: 21 additions & 8 deletions idesolver/idesolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,19 @@ class IDESolver:
Attributes
----------
x : :class:`numpy.ndarray`
The positions where the solution is calculated (i.e., where `y` is evaluated).
The positions where the solution is calculated (i.e., where :math:`y` is evaluated).
y : :class:`numpy.ndarray`
The solution :math:`y(x)`. ``None`` until :meth:`IDESolver.solve` is finished.
The solution :math:`y(x)`.
``None`` until :meth:`IDESolver.solve` is finished.
global_error : :class:`float`
The final global error estimate. ``None`` until :meth:`IDESolver.solve` is finished.
The final global error estimate.
``None`` until :meth:`IDESolver.solve` is finished.
iteration : :class:`int`
The current iteration. ``None`` until :meth:`IDESolver.solve` starts.
The current iteration.
``None`` until :meth:`IDESolver.solve` starts.
y_intermediate :
The intermediate solutions. Only exists if `store_intermediate_y` is ``True``.
The intermediate solutions.
Only exists if ``store_intermediate_y`` is ``True``.
"""

Expand Down Expand Up @@ -122,31 +126,40 @@ def __init__(
Parameters
----------
x : :class:`numpy.ndarray`
The array of :math:`x` values to find the solution :math:`y(x)` at. Generally something like ``numpy.linspace(a, b, num_pts)``.
The array of :math:`x` values to find the solution :math:`y(x)` at.
Generally something like ``numpy.linspace(a, b, num_pts)``.
y_0 : :class:`float` or :class:`complex` or :class:`numpy.ndarray`
The initial condition, :math:`y_0 = y(a)` (can be multidimensional).
c :
The function :math:`c(y, x)`.
Defaults to :math:`c(y, x) = 0`.
d :
The function :math:`d(x)`.
Defaults to :math:`d(x) = 1`.
k :
The kernel function :math:`k(x, s)`.
Defaults to :math:`k(x, s) = 1`.
f :
The function :math:`F(y)`.
Defaults to :math:`f(y) = 0`.
lower_bound :
The lower bound function :math:`\\alpha(x)`.
Defaults to the first element of ``x``.
upper_bound :
The upper bound function :math:`\\beta(x)`.
Defaults to the last element of ``x``.
global_error_tolerance : :class:`float`
The algorithm will continue until the global errors goes below this or uses more than `max_iterations` iterations. If ``None``, the algorithm continues until hitting `max_iterations`.
max_iterations : :class:`int`
The maximum number of iterations to use. If ``None``, iteration will not stop unless the `global_error_tolerance` is satisfied. Defaults to ``None``.
ode_method : :class:`str`
The ODE solution method to use. As the `method` option of :func:`scipy.integrate.solve_ivp`. Defaults to ``'RK45'``, which is good for non-stiff systems.
ode_atol : :class:`float`
The absolute tolerance for the ODE solver. As the `atol` argument of :func:`scipy.integrate.solve_ivp`.
The absolute tolerance for the ODE solver.
As the `atol` argument of :func:`scipy.integrate.solve_ivp`.
ode_rtol : :class:`float`
The relative tolerance for the ODE solver. As the `rtol` argument of :func:`scipy.integrate.solve_ivp`.
The relative tolerance for the ODE solver.
As the `rtol` argument of :func:`scipy.integrate.solve_ivp`.
int_atol : :class:`float`
The absolute tolerance for the integration routine. As the `epsabs` argument of :func:`scipy.integrate.quad`.
int_rtol : :class:`float`
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = idesolver
version = 1.0.5
version = 1.1.0
description = A general purpose iterative numeric integro-differential equation (IDE) solver
long_description = file: README.rst
long_description_content_type = text/x-rst
Expand Down Expand Up @@ -36,6 +36,7 @@ python_requires = >=3.6
[options.extras_require]
docs =
sphinx
sphinx-issues
sphinx_autodoc_typehints
sphinx_rtd_theme
tests =
Expand Down

0 comments on commit 89acc7b

Please sign in to comment.