uarray 0.6.0__tar.gz → 0.9.2__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.
- uarray-0.9.2/.clang-format +18 -0
- uarray-0.9.2/.gitattributes +3 -0
- uarray-0.9.2/.github/dependabot.yml +13 -0
- uarray-0.9.2/.github/workflows/build.yaml +146 -0
- uarray-0.9.2/.gitignore +30 -0
- uarray-0.9.2/CODE_OF_CONDUCT.md +3 -0
- uarray-0.9.2/CONTRIBUTING.md +42 -0
- uarray-0.9.2/PKG-INFO +88 -0
- {uarray-0.6.0 → uarray-0.9.2}/README.md +3 -1
- uarray-0.9.2/docs/_templates/autosummary/base.rst +5 -0
- uarray-0.9.2/docs/_templates/autosummary/class.rst +27 -0
- uarray-0.9.2/docs/_templates/autosummary/module.rst +29 -0
- uarray-0.9.2/docs/conf.py +210 -0
- uarray-0.9.2/docs/enduser_docs.rst +52 -0
- uarray-0.9.2/docs/generated/uarray.BackendNotImplementedError.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.Dispatchable.__init__.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.Dispatchable.rst +21 -0
- uarray-0.9.2/docs/generated/uarray.all_of_type.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.clear_backends.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.create_multimethod.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.generate_multimethod.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.get_state.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.mark_as.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.register_backend.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.reset_state.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.rst +154 -0
- uarray-0.9.2/docs/generated/uarray.set_backend.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.set_global_backend.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.set_state.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.skip_backend.rst +6 -0
- uarray-0.9.2/docs/generated/uarray.wrap_single_convertor.rst +6 -0
- uarray-0.9.2/docs/glossary.rst +64 -0
- uarray-0.9.2/docs/gsoc/2020/ideas.rst +176 -0
- uarray-0.9.2/docs/index.rst +105 -0
- uarray-0.9.2/docs/libauthor_docs.rst +89 -0
- uarray-0.9.2/docs/logo.png +0 -0
- uarray-0.9.2/docs/multimethod_docs.rst +75 -0
- uarray-0.9.2/notebooks/01_user_facing.ipynb +154 -0
- uarray-0.9.2/notebooks/02_basic_dev_tutorial.ipynb +245 -0
- uarray-0.9.2/notebooks/fruit-puzzle.jpg +0 -0
- uarray-0.9.2/pixi.lock +867 -0
- uarray-0.9.2/pyproject.toml +108 -0
- uarray-0.9.2/readthedocs.yml +18 -0
- {uarray-0.6.0 → uarray-0.9.2}/requirements/docs.txt +0 -1
- uarray-0.9.2/requirements/tests.txt +4 -0
- uarray-0.9.2/setup.cfg +4 -0
- uarray-0.9.2/setup.py +3 -0
- uarray-0.9.2/src/CMakeLists.txt +14 -0
- {uarray-0.6.0/uarray → uarray-0.9.2/src}/_uarray_dispatch.cxx +537 -187
- uarray-0.9.2/src/small_dynamic_array.h +228 -0
- {uarray-0.6.0 → uarray-0.9.2/src}/uarray/__init__.py +4 -5
- {uarray-0.6.0 → uarray-0.9.2/src}/uarray/_backend.py +340 -46
- uarray-0.9.2/src/uarray/_typing.pyi +65 -0
- uarray-0.9.2/src/uarray/_uarray.pyi +131 -0
- uarray-0.9.2/src/uarray/_version.py +16 -0
- uarray-0.9.2/src/uarray/conftest.py +11 -0
- {uarray-0.6.0 → uarray-0.9.2/src}/uarray/pytest.ini +1 -1
- uarray-0.9.2/src/uarray/tests/__init__.py +0 -0
- uarray-0.9.2/src/uarray/tests/example_helpers.py +46 -0
- uarray-0.9.2/src/uarray/tests/test_uarray.py +580 -0
- uarray-0.9.2/src/uarray.egg-info/PKG-INFO +88 -0
- uarray-0.9.2/src/uarray.egg-info/SOURCES.txt +71 -0
- uarray-0.9.2/src/uarray.egg-info/requires.txt +17 -0
- uarray-0.9.2/src/vectorcall.cxx +235 -0
- uarray-0.9.2/src/vectorcall.h +51 -0
- uarray-0.6.0/MANIFEST.in +0 -6
- uarray-0.6.0/PKG-INFO +0 -47
- uarray-0.6.0/requirements/tests.txt +0 -5
- uarray-0.6.0/setup.cfg +0 -15
- uarray-0.6.0/setup.py +0 -102
- uarray-0.6.0/uarray/_version.py +0 -21
- uarray-0.6.0/uarray/mypy.ini +0 -4
- uarray-0.6.0/uarray/tests/conftest.py +0 -19
- uarray-0.6.0/uarray/tests/test_uarray.py +0 -296
- uarray-0.6.0/uarray.egg-info/PKG-INFO +0 -47
- uarray-0.6.0/uarray.egg-info/SOURCES.txt +0 -27
- uarray-0.6.0/uarray.egg-info/not-zip-safe +0 -1
- uarray-0.6.0/uarray.egg-info/requires.txt +0 -28
- uarray-0.6.0/versioneer.py +0 -1886
- {uarray-0.6.0 → uarray-0.9.2}/LICENSE +0 -0
- {uarray-0.6.0 → uarray-0.9.2}/requirements/all.txt +0 -0
- {uarray-0.6.0 → uarray-0.9.2}/requirements/optional.txt +0 -0
- {uarray-0.6.0 → uarray-0.9.2}/requirements.txt +0 -0
- {uarray-0.6.0 → uarray-0.9.2/src}/uarray/.coveragerc +0 -0
- /uarray-0.6.0/uarray/tests/__init__.py → /uarray-0.9.2/src/uarray/py.typed +0 -0
- {uarray-0.6.0 → uarray-0.9.2/src}/uarray.egg-info/dependency_links.txt +0 -0
- {uarray-0.6.0 → uarray-0.9.2/src}/uarray.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
BasedOnStyle: LLVM
|
|
3
|
+
SpaceBeforeCtorInitializerColon: false
|
|
4
|
+
DerivePointerAlignment: false
|
|
5
|
+
PointerAlignment: Middle
|
|
6
|
+
ColumnLimit: 80
|
|
7
|
+
AlwaysBreakTemplateDeclarations: true
|
|
8
|
+
AlignAfterOpenBracket: AlwaysBreak
|
|
9
|
+
AlwaysBreakAfterReturnType: None
|
|
10
|
+
AllowAllParametersOfDeclarationOnNextLine: true
|
|
11
|
+
BinPackParameters: true
|
|
12
|
+
PenaltyReturnTypeOnItsOwnLine: 1000
|
|
13
|
+
IndentPPDirectives: AfterHash
|
|
14
|
+
MaxEmptyLinesToKeep: 2
|
|
15
|
+
|
|
16
|
+
# Macros that aren't followed by a semi-colon
|
|
17
|
+
StatementMacros:
|
|
18
|
+
- PyObject_HEAD
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Set update schedule for GitHub Actions
|
|
2
|
+
# This opens a PR when actions in workflows need an update
|
|
3
|
+
|
|
4
|
+
version: 2
|
|
5
|
+
updates:
|
|
6
|
+
- package-ecosystem: "github-actions"
|
|
7
|
+
directory: "/"
|
|
8
|
+
schedule:
|
|
9
|
+
# Check for updates to GitHub Actions every week
|
|
10
|
+
interval: "weekly"
|
|
11
|
+
commit-message:
|
|
12
|
+
prefix: "skip changelog" # So this PR will not be added to release-drafter
|
|
13
|
+
include: "scope" # List of the updated dependencies in the commit will be added
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
name: Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# Trigger the workflow on push or pull request,
|
|
5
|
+
# but only for the main branch
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
- master
|
|
10
|
+
tags:
|
|
11
|
+
- '*'
|
|
12
|
+
pull_request:
|
|
13
|
+
branches:
|
|
14
|
+
- main
|
|
15
|
+
- master
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build_wheels:
|
|
19
|
+
name: Build wheels on ${{ matrix.os }}
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
with:
|
|
28
|
+
fetch-depth: 0
|
|
29
|
+
|
|
30
|
+
- name: Build wheels
|
|
31
|
+
uses: pypa/cibuildwheel@v2.22.0
|
|
32
|
+
- uses: actions/upload-artifact@v4
|
|
33
|
+
with:
|
|
34
|
+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
|
35
|
+
path: ./wheelhouse/*.whl
|
|
36
|
+
|
|
37
|
+
make_sdist:
|
|
38
|
+
name: Make SDist
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
with:
|
|
43
|
+
fetch-depth: 0
|
|
44
|
+
|
|
45
|
+
- name: Build SDist
|
|
46
|
+
run: pipx run build --sdist
|
|
47
|
+
|
|
48
|
+
- uses: actions/upload-artifact@v4
|
|
49
|
+
with:
|
|
50
|
+
name: cibw-sdist
|
|
51
|
+
path: dist/*.tar.gz
|
|
52
|
+
|
|
53
|
+
upload_all:
|
|
54
|
+
needs: [build_wheels, make_sdist]
|
|
55
|
+
permissions:
|
|
56
|
+
id-token: write
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
if: github.ref_type == 'tag'
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/download-artifact@v4
|
|
61
|
+
with:
|
|
62
|
+
pattern: cibw-*
|
|
63
|
+
path: dist
|
|
64
|
+
merge-multiple: true
|
|
65
|
+
|
|
66
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
67
|
+
|
|
68
|
+
doc_lint_cov:
|
|
69
|
+
name: Documentation, Linting and Coverage
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
steps:
|
|
72
|
+
- uses: actions/checkout@v4
|
|
73
|
+
with:
|
|
74
|
+
fetch-depth: 0
|
|
75
|
+
- uses: actions/setup-python@v5
|
|
76
|
+
with:
|
|
77
|
+
# Update according to NEP-29
|
|
78
|
+
python-version: '3.10'
|
|
79
|
+
cache: 'pip'
|
|
80
|
+
- name: Install package
|
|
81
|
+
run: |
|
|
82
|
+
pip install -v .[all]
|
|
83
|
+
- name: Build documentation
|
|
84
|
+
run: |
|
|
85
|
+
sphinx-build -W -b html docs/ _build/html
|
|
86
|
+
- name: Upload documentation
|
|
87
|
+
uses: actions/upload-artifact@v4
|
|
88
|
+
with:
|
|
89
|
+
name: Documentation
|
|
90
|
+
path: _build/html
|
|
91
|
+
- name: Code style and tests
|
|
92
|
+
run: |
|
|
93
|
+
pytest --pyargs uarray
|
|
94
|
+
- name: mypy
|
|
95
|
+
run: |
|
|
96
|
+
mypy src/uarray
|
|
97
|
+
- name: Run clang-format style check for C/C++ code.
|
|
98
|
+
uses: jidicula/clang-format-action@v4.13.0
|
|
99
|
+
with:
|
|
100
|
+
clang-format-version: '19'
|
|
101
|
+
check-path: 'src'
|
|
102
|
+
- name: Upload coverage to Codecov
|
|
103
|
+
uses: codecov/codecov-action@v4
|
|
104
|
+
with:
|
|
105
|
+
directory: 'coverage/coverage*.xml'
|
|
106
|
+
env_vars: OS,PYTHON
|
|
107
|
+
fail_ci_if_error: false
|
|
108
|
+
verbose: true
|
|
109
|
+
|
|
110
|
+
pypy3:
|
|
111
|
+
name: Tests for PyPy3
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
steps:
|
|
114
|
+
- uses: actions/checkout@v4
|
|
115
|
+
with:
|
|
116
|
+
fetch-depth: 0
|
|
117
|
+
- uses: actions/setup-python@v5
|
|
118
|
+
with:
|
|
119
|
+
python-version: 'pypy-3.10'
|
|
120
|
+
cache: 'pip'
|
|
121
|
+
- name: Install package
|
|
122
|
+
run: |
|
|
123
|
+
pip install -v .[tests]
|
|
124
|
+
- name: Run tests
|
|
125
|
+
run: |
|
|
126
|
+
pytest --pyargs uarray
|
|
127
|
+
|
|
128
|
+
scipy_fft:
|
|
129
|
+
name: Run SciPy FFT tests
|
|
130
|
+
runs-on: ubuntu-latest
|
|
131
|
+
steps:
|
|
132
|
+
- uses: actions/checkout@v4
|
|
133
|
+
- uses: actions/setup-python@v5
|
|
134
|
+
with:
|
|
135
|
+
# Update according to NEP-29
|
|
136
|
+
python-version: '3.10'
|
|
137
|
+
cache: 'pip'
|
|
138
|
+
- name: Install package
|
|
139
|
+
run: |
|
|
140
|
+
pip install -v .[tests] pytest"<7"
|
|
141
|
+
pip install scipy==1.7.2
|
|
142
|
+
- name: SciPy tests
|
|
143
|
+
run: |
|
|
144
|
+
import scipy.fft
|
|
145
|
+
assert scipy.fft.test()
|
|
146
|
+
shell: python
|
uarray-0.9.2/.gitignore
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.vscode
|
|
2
|
+
*.code-workspace
|
|
3
|
+
.pytest_cache
|
|
4
|
+
.mypy_cache
|
|
5
|
+
.hypothesis
|
|
6
|
+
__pycache__
|
|
7
|
+
Digraph*
|
|
8
|
+
.ipynb_checkpoints
|
|
9
|
+
junit
|
|
10
|
+
test_readme.py
|
|
11
|
+
junit
|
|
12
|
+
coverage.xml
|
|
13
|
+
**/.coverage
|
|
14
|
+
dist
|
|
15
|
+
**/*.pyc
|
|
16
|
+
_build/
|
|
17
|
+
docs/_build
|
|
18
|
+
.idea/
|
|
19
|
+
pytype_output
|
|
20
|
+
htmlcov/
|
|
21
|
+
*.egg-info/
|
|
22
|
+
sandbox.py
|
|
23
|
+
*.so
|
|
24
|
+
build/
|
|
25
|
+
default.profraw
|
|
26
|
+
src/uarray/_version.py
|
|
27
|
+
*.pyd
|
|
28
|
+
# pixi environments
|
|
29
|
+
.pixi
|
|
30
|
+
*.egg-info
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Contribution to `uarray` are welcome and appreciated. Contributions can take the form of bug reports, documentation, code, and more.
|
|
4
|
+
|
|
5
|
+
## Getting the code
|
|
6
|
+
|
|
7
|
+
Make a fork of the main [uarray repository](https://github.com/Quansight-Labs/uarray) and clone the fork:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
git clone https://github.com/<your-github-username>/uarray
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
`uarray` and all development dependencies can be installed via:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
pip install -e ".[all]"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Note that uarray supports Python versions >= 3.5. If you're running `conda` and would prefer to have dependencies
|
|
22
|
+
pulled from there, use
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
conda env create -f .conda/environment.yml
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This will create an environment named `uarray` which you can use for development.
|
|
29
|
+
|
|
30
|
+
## Testing
|
|
31
|
+
|
|
32
|
+
Tests can be run from the main uarray directory as follows:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
pytest --pyargs uarray
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
To run a subset of tests:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
pytest uarray.tests.test_backend
|
|
42
|
+
```
|
uarray-0.9.2/PKG-INFO
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: uarray
|
|
3
|
+
Version: 0.9.2
|
|
4
|
+
Summary: Array interface object for Python with pluggable backends and a multiple-dispatch mechanism for defining down-stream functions
|
|
5
|
+
Maintainer-email: Hameer Abbasi <habbasi@quansight.com>
|
|
6
|
+
License: BSD 3-Clause License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2018, Quansight-Labs
|
|
9
|
+
All rights reserved.
|
|
10
|
+
|
|
11
|
+
Redistribution and use in source and binary forms, with or without
|
|
12
|
+
modification, are permitted provided that the following conditions are met:
|
|
13
|
+
|
|
14
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
15
|
+
list of conditions and the following disclaimer.
|
|
16
|
+
|
|
17
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
18
|
+
this list of conditions and the following disclaimer in the documentation
|
|
19
|
+
and/or other materials provided with the distribution.
|
|
20
|
+
|
|
21
|
+
* Neither the name of the copyright holder nor the names of its
|
|
22
|
+
contributors may be used to endorse or promote products derived from
|
|
23
|
+
this software without specific prior written permission.
|
|
24
|
+
|
|
25
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
26
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
27
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
28
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
29
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
30
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
31
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
32
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
33
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
34
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
35
|
+
|
|
36
|
+
Project-URL: Documentation, https://uarray.org/
|
|
37
|
+
Project-URL: Source, https://github.com/Quansight-Labs/uarray/
|
|
38
|
+
Project-URL: Repository, https://github.com/Quansight-Labs/uarray.git
|
|
39
|
+
Project-URL: Issue Tracker, https://github.com/Quansight-Labs/uarray/issues
|
|
40
|
+
Keywords: uarray,scipy,multiple-dispatch
|
|
41
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
42
|
+
Classifier: Operating System :: OS Independent
|
|
43
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
44
|
+
Classifier: Programming Language :: Python
|
|
45
|
+
Classifier: Programming Language :: Python :: 3
|
|
46
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
47
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
48
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
49
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
50
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
51
|
+
Classifier: Intended Audience :: Developers
|
|
52
|
+
Classifier: Intended Audience :: Science/Research
|
|
53
|
+
Classifier: Typing :: Typed
|
|
54
|
+
Requires-Python: >=3.10
|
|
55
|
+
Description-Content-Type: text/markdown
|
|
56
|
+
License-File: LICENSE
|
|
57
|
+
Provides-Extra: docs
|
|
58
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
59
|
+
Requires-Dist: sphinx_rtd_theme; extra == "docs"
|
|
60
|
+
Provides-Extra: tests
|
|
61
|
+
Requires-Dist: pytest>=3.5; extra == "tests"
|
|
62
|
+
Requires-Dist: pytest-flake8; extra == "tests"
|
|
63
|
+
Requires-Dist: pytest-cov; extra == "tests"
|
|
64
|
+
Requires-Dist: mypy>=0.930; extra == "tests"
|
|
65
|
+
Provides-Extra: optional
|
|
66
|
+
Provides-Extra: all
|
|
67
|
+
Requires-Dist: uarray[docs]; extra == "all"
|
|
68
|
+
Requires-Dist: uarray[tests]; extra == "all"
|
|
69
|
+
Requires-Dist: uarray[optional]; extra == "all"
|
|
70
|
+
|
|
71
|
+
# `uarray` - A back-end mechanism geared towards array computing
|
|
72
|
+
|
|
73
|
+
[](https://gitter.im/Plures/uarray?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
74
|
+
[](https://github.com/Quansight-Labs/uarray/actions)
|
|
75
|
+
[](https://pypi.org/project/uarray/)
|
|
76
|
+
|
|
77
|
+
<img src="docs/logo.png" style="width: 20em; text-align: center;" alt="uarray logo">
|
|
78
|
+
|
|
79
|
+
- [Documentation](https://uarray.org)
|
|
80
|
+
- [Road Map](https://github.com/orgs/Quansight-Labs/projects/1)
|
|
81
|
+
- [Future Meetings](https://calendar.google.com/calendar/embed?src=quansight.com_cg7sf4usbcn18gdhdb3l2c6v1g%40group.calendar.google.com&ctz=America%2FNew_York)
|
|
82
|
+
- [Meeting Notes](https://github.com/Quansight-Labs/uarray/wiki/Meeting-Notes)
|
|
83
|
+
- [References](https://github.com/Quansight-Labs/uarray/wiki/References)
|
|
84
|
+
- [Papers](https://paperpile.com/shared/fHftX5)
|
|
85
|
+
|
|
86
|
+
## Contributing
|
|
87
|
+
|
|
88
|
+
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for more information on how to contribute to `uarray`.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# `uarray` - A back-end mechanism geared towards array computing
|
|
2
2
|
|
|
3
|
-
[](https://gitter.im/Plures/uarray?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
3
|
+
[](https://gitter.im/Plures/uarray?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
4
|
+
[](https://github.com/Quansight-Labs/uarray/actions)
|
|
5
|
+
[](https://pypi.org/project/uarray/)
|
|
4
6
|
|
|
5
7
|
<img src="docs/logo.png" style="width: 20em; text-align: center;" alt="uarray logo">
|
|
6
8
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{{ objname | escape | underline}}
|
|
2
|
+
|
|
3
|
+
.. currentmodule:: {{ module }}
|
|
4
|
+
|
|
5
|
+
.. autoclass:: {{ objname }}
|
|
6
|
+
|
|
7
|
+
{% block attributes %}
|
|
8
|
+
{% if attributes %}
|
|
9
|
+
.. rubric:: Attributes
|
|
10
|
+
.. autosummary::
|
|
11
|
+
:toctree:
|
|
12
|
+
{% for item in attributes %}
|
|
13
|
+
{{ name }}.{{ item }}
|
|
14
|
+
{% endfor %}
|
|
15
|
+
{% endif %}
|
|
16
|
+
{% endblock %}
|
|
17
|
+
|
|
18
|
+
{% block methods %}
|
|
19
|
+
{% if methods %}
|
|
20
|
+
.. rubric:: Methods
|
|
21
|
+
.. autosummary::
|
|
22
|
+
:toctree:
|
|
23
|
+
{% for item in methods %}
|
|
24
|
+
{{ name }}.{{ item }}
|
|
25
|
+
{% endfor %}
|
|
26
|
+
{% endif %}
|
|
27
|
+
{% endblock %}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{{ fullname | escape | underline }}
|
|
2
|
+
|
|
3
|
+
.. rubric:: Description
|
|
4
|
+
.. automodule:: {{ fullname }}
|
|
5
|
+
.. currentmodule:: {{ fullname }}
|
|
6
|
+
|
|
7
|
+
{% if classes %}
|
|
8
|
+
.. rubric:: Classes
|
|
9
|
+
|
|
10
|
+
.. autosummary::
|
|
11
|
+
:toctree:
|
|
12
|
+
|
|
13
|
+
{% for class in classes %}
|
|
14
|
+
{{ class }}
|
|
15
|
+
{% endfor %}
|
|
16
|
+
|
|
17
|
+
{% endif %}
|
|
18
|
+
|
|
19
|
+
{% if functions %}
|
|
20
|
+
.. rubric:: Functions
|
|
21
|
+
|
|
22
|
+
.. autosummary::
|
|
23
|
+
:toctree:
|
|
24
|
+
|
|
25
|
+
{% for function in functions %}
|
|
26
|
+
{{ function }}
|
|
27
|
+
{% endfor %}
|
|
28
|
+
|
|
29
|
+
{% endif %}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Configuration file for the Sphinx documentation builder.
|
|
4
|
+
#
|
|
5
|
+
# This file does only contain a selection of the most common options. For a
|
|
6
|
+
# full list see the documentation:
|
|
7
|
+
# http://www.sphinx-doc.org/en/master/config
|
|
8
|
+
|
|
9
|
+
# -- Path setup --------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
|
12
|
+
# add these directories to sys.path here. If the directory is relative to the
|
|
13
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
14
|
+
#
|
|
15
|
+
import os
|
|
16
|
+
import sys
|
|
17
|
+
from importlib.metadata import version
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# Mock Extension modules
|
|
21
|
+
try:
|
|
22
|
+
import uarray._uarray
|
|
23
|
+
except ImportError:
|
|
24
|
+
from unittest.mock import MagicMock
|
|
25
|
+
|
|
26
|
+
class Mock(MagicMock):
|
|
27
|
+
@classmethod
|
|
28
|
+
def __getattr__(cls, name):
|
|
29
|
+
return MagicMock()
|
|
30
|
+
|
|
31
|
+
MOCK_MODULES = ["uarray._uarray"]
|
|
32
|
+
sys.modules.update((mod, Mock()) for mod in MOCK_MODULES)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# sys.path.insert(0, os.path.abspath('.'))
|
|
36
|
+
from typing import List, Dict
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# -- Project information -----------------------------------------------------
|
|
40
|
+
|
|
41
|
+
project = "uarray"
|
|
42
|
+
copyright = "2019, Quansight-Labs"
|
|
43
|
+
author = "Quansight-Labs"
|
|
44
|
+
|
|
45
|
+
# The full version, including alpha/beta/rc tags
|
|
46
|
+
release = version("uarray")
|
|
47
|
+
# The short X.Y version
|
|
48
|
+
version = ".".join(release.split(".")[:2])
|
|
49
|
+
|
|
50
|
+
# -- General configuration ---------------------------------------------------
|
|
51
|
+
|
|
52
|
+
# If your documentation needs a minimal Sphinx version, state it here.
|
|
53
|
+
#
|
|
54
|
+
# needs_sphinx = '1.0'
|
|
55
|
+
|
|
56
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
|
57
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
58
|
+
# ones.
|
|
59
|
+
extensions: List[str] = [
|
|
60
|
+
"sphinx.ext.autodoc",
|
|
61
|
+
"sphinx.ext.viewcode",
|
|
62
|
+
"sphinx.ext.napoleon",
|
|
63
|
+
"sphinx.ext.intersphinx",
|
|
64
|
+
"sphinx.ext.autosummary",
|
|
65
|
+
"sphinx.ext.doctest",
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
# Add any paths that contain templates here, relative to this directory.
|
|
69
|
+
templates_path = ["_templates"]
|
|
70
|
+
|
|
71
|
+
# The suffix(es) of source filenames.
|
|
72
|
+
# You can specify multiple suffix as a list of string:
|
|
73
|
+
#
|
|
74
|
+
# source_suffix = ['.rst', '.md']
|
|
75
|
+
source_suffix = ".rst"
|
|
76
|
+
|
|
77
|
+
# The master toctree document.
|
|
78
|
+
master_doc = "index"
|
|
79
|
+
|
|
80
|
+
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
81
|
+
# for a list of supported languages.
|
|
82
|
+
#
|
|
83
|
+
# This is also used if you do content translation via gettext catalogs.
|
|
84
|
+
# Usually you set "language" from the command line for these cases.
|
|
85
|
+
language = 'en'
|
|
86
|
+
|
|
87
|
+
# List of patterns, relative to source directory, that match files and
|
|
88
|
+
# directories to ignore when looking for source files.
|
|
89
|
+
# This pattern also affects html_static_path and html_extra_path.
|
|
90
|
+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
91
|
+
|
|
92
|
+
# The name of the Pygments (syntax highlighting) style to use.
|
|
93
|
+
pygments_style = None
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# -- Options for HTML output -------------------------------------------------
|
|
97
|
+
|
|
98
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
99
|
+
# a list of builtin themes.
|
|
100
|
+
#
|
|
101
|
+
html_theme = "sphinx_rtd_theme"
|
|
102
|
+
html_logo = "logo.png"
|
|
103
|
+
html_favicon = "logo.png"
|
|
104
|
+
|
|
105
|
+
# Theme options are theme-specific and customize the look and feel of a theme
|
|
106
|
+
# further. For a list of options available for each theme, see the
|
|
107
|
+
# documentation.
|
|
108
|
+
#
|
|
109
|
+
# html_theme_options = {}
|
|
110
|
+
|
|
111
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
112
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
113
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
114
|
+
html_static_path = [] # type: List[str]
|
|
115
|
+
|
|
116
|
+
# Custom sidebar templates, must be a dictionary that maps document names
|
|
117
|
+
# to template names.
|
|
118
|
+
#
|
|
119
|
+
# The default sidebars (for documents that don't match any pattern) are
|
|
120
|
+
# defined by theme itself. Builtin themes are using these templates by
|
|
121
|
+
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
|
|
122
|
+
# 'searchbox.html']``.
|
|
123
|
+
#
|
|
124
|
+
# html_sidebars = {}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
# -- Options for HTMLHelp output ---------------------------------------------
|
|
128
|
+
|
|
129
|
+
# Output file base name for HTML help builder.
|
|
130
|
+
htmlhelp_basename = "uarraydoc"
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
# -- Options for LaTeX output ------------------------------------------------
|
|
134
|
+
|
|
135
|
+
latex_elements = {
|
|
136
|
+
# The paper size ('letterpaper' or 'a4paper').
|
|
137
|
+
#
|
|
138
|
+
# 'papersize': 'letterpaper',
|
|
139
|
+
# The font size ('10pt', '11pt' or '12pt').
|
|
140
|
+
#
|
|
141
|
+
# 'pointsize': '10pt',
|
|
142
|
+
# Additional stuff for the LaTeX preamble.
|
|
143
|
+
#
|
|
144
|
+
# 'preamble': '',
|
|
145
|
+
# Latex figure (float) alignment
|
|
146
|
+
#
|
|
147
|
+
# 'figure_align': 'htbp',
|
|
148
|
+
} # type: Dict[str, str]
|
|
149
|
+
|
|
150
|
+
# Grouping the document tree into LaTeX files. List of tuples
|
|
151
|
+
# (source start file, target name, title,
|
|
152
|
+
# author, documentclass [howto, manual, or own class]).
|
|
153
|
+
latex_documents = [
|
|
154
|
+
(master_doc, "uarray.tex", "uarray Documentation", "Quansight-Labs", "manual")
|
|
155
|
+
]
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
# -- Options for manual page output ------------------------------------------
|
|
159
|
+
|
|
160
|
+
# One entry per manual page. List of tuples
|
|
161
|
+
# (source start file, name, description, authors, manual section).
|
|
162
|
+
man_pages = [(master_doc, "uarray", "uarray Documentation", [author], 1)]
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
# -- Options for Texinfo output ----------------------------------------------
|
|
166
|
+
|
|
167
|
+
# Grouping the document tree into Texinfo files. List of tuples
|
|
168
|
+
# (source start file, target name, title, author,
|
|
169
|
+
# dir menu entry, description, category)
|
|
170
|
+
texinfo_documents = [
|
|
171
|
+
(
|
|
172
|
+
master_doc,
|
|
173
|
+
"uarray",
|
|
174
|
+
"uarray Documentation",
|
|
175
|
+
author,
|
|
176
|
+
"uarray",
|
|
177
|
+
"One line description of project.",
|
|
178
|
+
"Miscellaneous",
|
|
179
|
+
)
|
|
180
|
+
]
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
# -- Options for Epub output -------------------------------------------------
|
|
184
|
+
|
|
185
|
+
# Bibliographic Dublin Core info.
|
|
186
|
+
epub_title = project
|
|
187
|
+
|
|
188
|
+
# The unique identifier of the text. This can be a ISBN number
|
|
189
|
+
# or the project homepage.
|
|
190
|
+
#
|
|
191
|
+
# epub_identifier = ''
|
|
192
|
+
|
|
193
|
+
# A unique identification for the text.
|
|
194
|
+
#
|
|
195
|
+
# epub_uid = ''
|
|
196
|
+
|
|
197
|
+
# A list of files that should not be packed into the epub file.
|
|
198
|
+
epub_exclude_files = ["search.html"]
|
|
199
|
+
|
|
200
|
+
autosummary_generate = True
|
|
201
|
+
autoclass_content = "both"
|
|
202
|
+
|
|
203
|
+
intersphinx_mapping = {
|
|
204
|
+
"python": ("https://docs.python.org/3/", None),
|
|
205
|
+
"unumpy": ("https://unumpy.uarray.org/en/latest/", None),
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
doctest_global_setup = """
|
|
209
|
+
import uarray as ua
|
|
210
|
+
"""
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.. currentmodule:: uarray
|
|
2
|
+
|
|
3
|
+
.. _userdocs:
|
|
4
|
+
|
|
5
|
+
End-user quickstart
|
|
6
|
+
===================
|
|
7
|
+
|
|
8
|
+
Ideally, the only thing an end-user should have to do is set the backend
|
|
9
|
+
and its options. Given a backend, you (as the end-user) can decide to
|
|
10
|
+
do one of two things:
|
|
11
|
+
|
|
12
|
+
* Set the backend permanently (use the :obj:`set_global_backend` function).
|
|
13
|
+
* Set the backend temporarily (use the :obj:`set_backend` context manager).
|
|
14
|
+
|
|
15
|
+
.. note::
|
|
16
|
+
API authors may want to wrap these methods and provide their own methods.
|
|
17
|
+
|
|
18
|
+
Also of a note may be the :obj:`BackendNotImplementedError`, which is raised
|
|
19
|
+
when none of the selected backends have an implementation for a multimethod.
|
|
20
|
+
|
|
21
|
+
Setting the backend temporarily
|
|
22
|
+
-------------------------------
|
|
23
|
+
|
|
24
|
+
To set the backend temporarily, use the :obj:`set_backend` context manager.
|
|
25
|
+
|
|
26
|
+
.. code:: python3
|
|
27
|
+
|
|
28
|
+
import uarray as ua
|
|
29
|
+
|
|
30
|
+
with ua.set_backend(mybackend):
|
|
31
|
+
# Use multimethods (or code dependent on them) here.
|
|
32
|
+
|
|
33
|
+
Setting the backend permanently
|
|
34
|
+
-------------------------------
|
|
35
|
+
|
|
36
|
+
To set the backend permanently, use the :obj:`set_global_backend`
|
|
37
|
+
method. It is a recommendation that the global backend should not
|
|
38
|
+
depend on any other backend, as it is not guaranteed that another
|
|
39
|
+
backend will be available.
|
|
40
|
+
|
|
41
|
+
You can also register backends other than the global backend for permanent
|
|
42
|
+
use, but the global backend will be tried first outside of a :obj:`set_backend`
|
|
43
|
+
context. This can be done via :obj:`register_backend`.
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
.. code:: python3
|
|
47
|
+
|
|
48
|
+
import uarray as ua
|
|
49
|
+
|
|
50
|
+
ua.set_global_backend(mybackend)
|
|
51
|
+
|
|
52
|
+
# Use relevant multimethods here.
|