Skip to content

Commit

Permalink
fix: rm plotting functions + make CI work for non-CUDA devices (#13)
Browse files Browse the repository at this point in the history
* Users should use the plotting libraries to plot hists on CPU

* Remove references + fix test suite

* Skip module for CUDARuntimeError

* Add a dummy test for pytest
  • Loading branch information
Saransh-cpp authored Jul 22, 2024
1 parent 3a747b6 commit 77a1b1f
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 1,462 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
[![Conda latest release][conda-version]][conda-link]
[![LICENSE][license-badge]][license-link] [![Scikit-HEP][sk-badge]][sk-link]

`cuda-histogram` is a histogram filling, transformation, and plotting package
for GPUs. The package follows [UHI](https://uhi.readthedocs.io) and keeps its
API similar to [boost-histogram](https://github.com/scikit-hep/boost-histogram)
and [hist](https://github.com/scikit-hep/hist).
`cuda-histogram` is a histogram filling package for GPUs. The package follows
[UHI](https://uhi.readthedocs.io) and keeps its API similar to
[boost-histogram](https://github.com/scikit-hep/boost-histogram) and
[hist](https://github.com/scikit-hep/hist).

The package is under active development at the moment.

Expand Down
8 changes: 0 additions & 8 deletions docs/api/cuda_histogram.plot.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/api/cuda_histogram.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ Submodules
:maxdepth: 3

cuda_histogram.hist_tools
cuda_histogram.plot
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def tests(session: nox.Session) -> None:
"""
Run the unit and regular tests.
"""
session.install(".[test,dev,plot,gpu]")
session.install(".[test,dev]")
session.run("pytest", *session.posargs)


Expand Down
9 changes: 0 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ dependencies = [
"boost-histogram",
]
[project.optional-dependencies]
plot = [
"matplotlib>=3",
"mplhep>=0.1.18",
"bokeh!=3.0.*,>=2.4.2",
]
test = [
"uproot>=5.3.0,!=5.3.3,!=5.3.4,!=5.3.5",
"coffea>=2024.6.0"
]
dev = [
"pre-commit",
"pytest>=6",
Expand Down
20 changes: 2 additions & 18 deletions src/cuda_histogram/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
`cuda-histogram` is a histogram filling, transformation, and plotting package for GPUs.
`cuda-histogram` is a histogram filling package for GPUs.
The package follows `UHI <https://uhi.readthedocs.io>`__ and keeps its API similar to
`boost-histogram <https://github.com/scikit-hep/boost-histogram>`__
Expand All @@ -9,30 +9,14 @@
from __future__ import annotations

from cuda_histogram.hist_tools import Bin, Cat, Hist, Interval, StringBin
from cuda_histogram.plot import (
clopper_pearson_interval,
normal_interval,
plot1d,
plot2d,
plotgrid,
plotratio,
poisson_interval,
)

from ._version import version as __version__

__all__ = [
__all__: list[str] = [
"Hist",
"Bin",
"Interval",
"Cat",
"StringBin",
"poisson_interval",
"clopper_pearson_interval",
"normal_interval",
"plot1d",
"plotratio",
"plot2d",
"plotgrid",
"__version__",
]
Loading

0 comments on commit 77a1b1f

Please sign in to comment.