Skip to content

Commit b5792e9

Browse files
committed
Update documentation
1 parent 9b52975 commit b5792e9

File tree

6 files changed

+55
-4
lines changed

6 files changed

+55
-4
lines changed

docs/source/api_reference.rst

+2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ API reference
88
=============
99

1010
.. toctree::
11+
:maxdepth: 2
1112

1213
pyarray
14+
pytensor

docs/source/basic_usage.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ Example 1: Use an algorithm of the C++ library on a numpy array inplace
2121
2222
double sum_of_sines(xt::pyarray<double> &m)
2323
{
24-
auto sines = xt::sin(m); // sines does not actually hold any value, which are only computed upon access
24+
auto sines = xt::sin(m);
25+
// sines does not actually hold any value, which are only computed upon access
2526
return std::accumulate(sines.begin(), sines.end(), 0.0);
2627
}
2728
2829
PYBIND11_PLUGIN(xtensor_python_test)
2930
{
3031
pybind11::module m("xtensor_python_test", "Test module for xtensor python bindings");
3132
32-
m.def("sum_of_sines", sum_of_sines, "Computes the sum of the sines of the values of the input array");
33+
m.def("sum_of_sines", sum_of_sines,
34+
"Computes the sum of the sines of the values of the input array");
3335
3436
return m.ptr();
3537
}

docs/source/cookie_cutter.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Install cookiecutter_
2828
2929
pip install cookiecutter
3030
31-
After installing cookiecutter, use the xtensor-cookiecutter_:
31+
After installing cookiecutter, use the xtensor_cookiecutter_:
3232

3333
.. code::
3434
@@ -50,5 +50,5 @@ This will produce a directory containing all the required content for a minimal
5050
project making use of xtensor with all the required boilerplate for package management,
5151
together with a few basic examples.
5252

53-
.. _xtensor-cookicutter: https://github.com/QuantStack/xtensor-cookiecutter
53+
.. _xtensor_cookicutter: https://github.com/QuantStack/xtensor-cookiecutter
5454
.. _cookiecutter: https://github.com/audreyr/cookiecutter

docs/source/index.rst

+5
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ This software is licensed under the BSD-3-Clause license. See the LICENSE file f
6363

6464
api_reference
6565

66+
.. toctree::
67+
:caption: DEVELOPER ZONE
68+
69+
releasing
70+
6671
.. _NumPy: http://www.numpy.org
6772
.. _`Buffer Protocol`: https://docs.python.org/3/c-api/buffer.html
6873
.. _xtensor: https://github.com/QuantStack/xtensor

docs/source/pytensor.rst

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. Copyright (c) 2016, Johan Mabille and Sylvain Corlay
2+
3+
Distributed under the terms of the BSD 3-Clause License.
4+
5+
The full license is in the file LICENSE, distributed with this software.
6+
7+
pytensor
8+
========
9+
10+
.. doxygenclass:: xt::pytensor
11+
:project: xtensor-python
12+
:members:

docs/source/releasing.rst

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.. Copyright (c) 2016, Johan Mabille and Sylvain Corlay
2+
3+
Distributed under the terms of the BSD 3-Clause License.
4+
5+
The full license is in the file LICENSE, distributed with this software.
6+
7+
Releasing xtensor-python
8+
========================
9+
10+
Releasing a new version
11+
-----------------------
12+
13+
From the master branch of xtensor-python
14+
15+
- Make sure that you are in sync with the master branch of the upstream remote.
16+
- In file ``xtensor_python_config.hpp``, set the macros for ``XTENSOR_PYTHON_VERSION_MAJOR``, ``XTENSOR_PYTHON_VERSION_MINOR`` and ``XTENSOR_PYTHON_VERSION_PATCH`` to the desired values.
17+
- Update the readme file w.r.t. dependencies on xtensor and pybind11.
18+
- Stage the changes (``git add``), commit the changes (``git commit``) and add a tag of the form ``Major.minor.patch``. It is important to not add any other content to the tag name.
19+
- Push the new commit and tag to the main repository. (``git push``, and ``git push --tags``)
20+
21+
Updating the conda-forge recipe
22+
-------------------------------
23+
24+
xtensor-python has been packaged for the conda package manager. Once the new tag has been pushed on GitHub, edit the conda-forge recipe for xtensor in the following fashion:
25+
26+
- Update the version number to the new Major.minor.patch.
27+
- Set the build number to 0.
28+
- Update the hash of the source tarball.
29+
- Check for the versions of the dependencies.
30+
- Optionally, rerender the conda-forge feedstock.

0 commit comments

Comments
 (0)