Skip to content

Commit

Permalink
Merge pull request #1 from f0uriest/rc/classes
Browse files Browse the repository at this point in the history
Add convenience classes, fix API doc formatting
  • Loading branch information
f0uriest authored Oct 20, 2023
2 parents a5b702e + 205f09a commit 8f6b603
Show file tree
Hide file tree
Showing 11 changed files with 506 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Unit tests
on:
push:
branches:
- master
- main
- dev
pull_request:
branches:
- master
- main
paths-ignore:
- 'docs/**'
- 'devtools/**'
Expand Down
1 change: 0 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ comment: # this is a top-level key
require_changes: false # if true: only post the comment if coverage changes
require_base: true # [true :: must have a base report to post]
require_head: true # [true :: must have a head report to post]
after_n_builds: 10
coverage:
status:
patch:
Expand Down
41 changes: 31 additions & 10 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,34 @@
API Documentation
=================

.. autosummary::
:toctree: _api/
:recursive:
:template: class.rst

interpax.interp1d
interpax.interp2d
interpax.interp3d
interpax.fft_interp1d
interpax.fft_interp2d
interp1d
********
.. autofunction:: interpax.interp1d

interp2d
********
.. autofunction:: interpax.interp2d

interp3d
********
.. autofunction:: interpax.interp3d

fft_interp1d
************
.. autofunction:: interpax.fft_interp1d

fft_interp2d
************
.. autofunction:: interpax.fft_interp2d

Interpolator1D
**************
.. autoclass:: interpax.Interpolator1D

Interpolator2D
**************
.. autoclass:: interpax.Interpolator2D

Interpolator3D
**************
.. autoclass:: interpax.Interpolator3D
12 changes: 7 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def linkcode_resolve(domain, info):

except subprocess.CalledProcessError:
print("Failed to get head") # so no head?
blob = "master"
blob = "main"

linkcode_url = r"https://github.com/f0uriest/interpax/"
linkcode_url = linkcode_url.strip("/") + f"/blob/{blob}/"
Expand Down Expand Up @@ -149,17 +149,19 @@ def linkcode_resolve(domain, info):
napoleon_numpy_docstring = True
napoleon_include_init_with_doc = False
napoleon_include_private_with_doc = False
napoleon_include_special_with_doc = False
napoleon_include_special_with_doc = True
napoleon_use_admonition_for_examples = False
napoleon_use_admonition_for_notes = False
napoleon_use_admonition_for_references = False
napoleon_use_ivar = False
napoleon_use_param = True
napoleon_use_rtype = False

autosummary_generate = True
autosummary_generate_overwrite = True

autodoc_default_options = {
"member-order": "bysource",
"special-members": "__call__",
"exclude-members": "__init__",
}
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

Expand Down
9 changes: 8 additions & 1 deletion interpax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

from . import _version
from ._fourier import fft_interp1d, fft_interp2d
from ._spline import interp1d, interp2d, interp3d
from ._spline import (
Interpolator1D,
Interpolator2D,
Interpolator3D,
interp1d,
interp2d,
interp3d,
)

__version__ = _version.get_versions()["version"]
Loading

0 comments on commit 8f6b603

Please sign in to comment.