Skip to content

Commit

Permalink
this is the one
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <nstarkman@protonmail.com>
  • Loading branch information
nstarman committed Sep 22, 2022
1 parent 592f693 commit fe176ac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,11 @@ jobs:
python: 3.9
toxenv: py39-test-alldeps
toxargs: -v --develop
toxposargs: --open-files

- name: Python 3.8 with oldest supported version of all dependencies
os: ubuntu-18.04
python: 3.8
toxenv: py38-test-oldestdeps-alldeps-cov-clocale
toxposargs: --remote-data=github

- name: Python 3.9 with all optional dependencies (Windows)
os: windows-latest
Expand Down
6 changes: 5 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Overload NumPy
Quick Worked Example
--------------------

.. testsetup::

>>> from __future__ import annotations

First, some imports:

>>> from dataclasses import dataclass
Expand All @@ -23,7 +27,7 @@ The overloads apply to an array wrapping class. Let's define one:
... class Vector1D(NDFunctionMixin):
... '''A simple array wrapper.'''
... x: np.ndarray
... NP_FUNC_OVERLOADS: 'ClassVar[NumPyOverloader]' = VEC_FUNCS
... NP_FUNC_OVERLOADS: ClassVar[NumPyOverloader] = VEC_FUNCS

Now ``numpy`` functions can be overloaded and registered for ``Vector1D``.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@


[tool.pytest.ini_options]
testpaths = ["src/overload_numpy", "docs"]
testpaths = ["tests", "src/overload_numpy", "docs"]
astropy_header = "True"
doctest_plus = "enabled"
text_file_format = "rst"
Expand Down

0 comments on commit fe176ac

Please sign in to comment.