Skip to content

Commit 3a747b6

Browse files
authored
docs: initial documentation infrastructure (#12)
1 parent 5a0091e commit 3a747b6

File tree

10 files changed

+173
-17
lines changed

10 files changed

+173
-17
lines changed

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,44 @@
11
# cuda-histogram
22

3+
<!-- SPHINX-START -->
4+
35
[![Actions Status][actions-badge]][actions-link]
46
[![Documentation Status][rtd-badge]][rtd-link]
7+
[![pre-commit.ci status][pre-commit-badge]][pre-commit-link]
8+
[![codecov percentage][codecov-badge]][codecov-link]
9+
[![GitHub Discussion][github-discussions-badge]][github-discussions-link]
510

6-
[![PyPI version][pypi-version]][pypi-link]
7-
[![Conda-Forge][conda-badge]][conda-link]
811
[![PyPI platforms][pypi-platforms]][pypi-link]
12+
[![PyPI version][pypi-version]][pypi-link]
13+
[![Conda latest release][conda-version]][conda-link]
14+
[![LICENSE][license-badge]][license-link] [![Scikit-HEP][sk-badge]][sk-link]
915

10-
[![GitHub Discussion][github-discussions-badge]][github-discussions-link]
16+
`cuda-histogram` is a histogram filling, transformation, and plotting package
17+
for GPUs. The package follows [UHI](https://uhi.readthedocs.io) and keeps its
18+
API similar to [boost-histogram](https://github.com/scikit-hep/boost-histogram)
19+
and [hist](https://github.com/scikit-hep/hist).
1120

12-
<!-- SPHINX-START -->
21+
The package is under active development at the moment.
1322

1423
<!-- prettier-ignore-start -->
1524
[actions-badge]: https://github.com/Saransh-cpp/cuda-histogram/workflows/CI/badge.svg
1625
[actions-link]: https://github.com/Saransh-cpp/cuda-histogram/actions
17-
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/cuda-histogram
18-
[conda-link]: https://github.com/conda-forge/cuda-histogram-feedstock
26+
[codecov-badge]: https://codecov.io/gh/Saransh-cpp/cuda-histogram/branch/main/graph/badge.svg?token=YBv60ueORQ
27+
[codecov-link]: https://codecov.io/gh/Saransh-cpp/cuda-histogram
28+
[conda-version]: https://img.shields.io/conda/vn/Saransh-cpp/cuda-histogram.svg
29+
[conda-link]: https://github.com/Saransh-cpp/cuda-histogram
1930
[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
2031
[github-discussions-link]: https://github.com/Saransh-cpp/cuda-histogram/discussions
32+
[license-badge]: https://img.shields.io/badge/License-BSD_3--Clause-blue.svg
33+
[license-link]: https://opensource.org/licenses/BSD-3-Clause
34+
[pre-commit-badge]: https://results.pre-commit.ci/badge/github/Saransh-cpp/cuda-histogram/main.svg
35+
[pre-commit-link]: https://results.pre-commit.ci/repo/github/Saransh-cpp/cuda-histogram
2136
[pypi-link]: https://pypi.org/project/cuda-histogram/
2237
[pypi-platforms]: https://img.shields.io/pypi/pyversions/cuda-histogram
2338
[pypi-version]: https://img.shields.io/pypi/v/cuda-histogram
2439
[rtd-badge]: https://readthedocs.org/projects/cuda-histogram/badge/?version=latest
2540
[rtd-link]: https://cuda-histogram.readthedocs.io/en/latest/?badge=latest
41+
[sk-badge]: https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg
42+
[sk-link]: https://scikit-hep.org/
2643

2744
<!-- prettier-ignore-end -->

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cuda_histogram.hist_tools module
2+
================================
3+
4+
.. automodule:: cuda_histogram.hist_tools
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
:private-members:

docs/api/cuda_histogram.plot.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cuda_histogram.plot module
2+
==========================
3+
4+
.. automodule:: cuda_histogram.plot
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
:private-members:

docs/api/cuda_histogram.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cuda_histogram package
2+
======================
3+
4+
Submodules
5+
----------
6+
7+
.. toctree::
8+
:maxdepth: 3
9+
10+
cuda_histogram.hist_tools
11+
cuda_histogram.plot

docs/api/modules.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cuda-histogram
2+
==============
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
cuda_histogram

docs/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CHANGELOG
2+
3+
## Version 0.0.1
4+
5+
- Initial release - a working prototype

docs/index.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# cuda-histogram
1+
# Overview
22

33
```{toctree}
44
:maxdepth: 2
@@ -10,6 +10,56 @@
1010
:start-after: <!-- SPHINX-START -->
1111
```
1212

13+
## Installation
14+
15+
cuda-histogram is available on [PyPI](https://pypi.org/project/cuda-histogram/)
16+
as well as on [conda](https://anaconda.org/conda-forge/cuda-histogram). The
17+
library can be installed using `pip` -
18+
19+
```{code-block}
20+
21+
pip install cuda-histogram
22+
23+
```
24+
25+
or using `conda` -
26+
27+
```{code-block}
28+
29+
conda install -c conda-forge cuda-histogram
30+
31+
```
32+
33+
## Changes in cuda-histogram's API
34+
35+
The `changelog` file describes the changes in `cuda-histogram`'s API and usage
36+
introduced in every new version.
37+
38+
```{toctree}
39+
:maxdepth: 3
40+
41+
changelog
42+
```
43+
44+
## Getting help
45+
46+
- `cuda-histogram`'s code is hosted on
47+
[GitHub](https://github.com/Saransh-cpp/cuda-histogram).
48+
- If something is not working the way it should, or if you want to request a new
49+
feature, create a new
50+
[issue](https://github.com/Saransh-cpp/cuda-histogram/issues) on GitHub.
51+
- To discuss something related to `cuda-histogram`, use the
52+
[discussions](https://github.com/Saransh-cpp/cuda-histogram/discussions/) tab
53+
on GitHub.
54+
55+
## API reference
56+
57+
```{toctree}
58+
:maxdepth: 4
59+
60+
api/modules.rst
61+
```
62+
1363
## Indices and tables
1464

1565
- {ref}`genindex`

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=.
11+
set BUILDDIR=_build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

src/cuda_histogram/__init__.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
"""Histogramming tools
2-
3-
`cuda-histogram` is a histogram filling, transformation, and plotting sub-package, utilizing
4-
numpy arrays for storage and matplotlib plotting routines for visualization.
5-
6-
Features found in this package are similar to those found in
7-
packages such as `histbook <https://github.com/scikit-hep/histbook>`__ (deprecated),
8-
`boost-histogram <https://github.com/scikit-hep/boost-histogram>`__ (in development),
9-
`physt <https://github.com/scikit-hep/boost-histogram>`__, and built-in numpy
10-
`histogram <https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html>`__ utilities.
1+
"""
2+
`cuda-histogram` is a histogram filling, transformation, and plotting package for GPUs.
113
4+
The package follows `UHI <https://uhi.readthedocs.io>`__ and keeps its API similar to
5+
`boost-histogram <https://github.com/scikit-hep/boost-histogram>`__
6+
`and hist <https://github.com/scikit-hep/hist>`__.
127
"""
138

149
from __future__ import annotations

0 commit comments

Comments
 (0)