Skip to content

Commit

Permalink
fix: minor things before release (#795)
Browse files Browse the repository at this point in the history
* ci: auto-cancel on repeated pushes

Signed-off-by: Henry Schreiner <[email protected]>

* fix: better location of warning

Signed-off-by: Henry Schreiner <[email protected]>

* style: pre-commit fixes

* docs: prepare changelog

Signed-off-by: Henry Schreiner <[email protected]>

* style: pre-commit fixes

* docs: update examples

Signed-off-by: Henry Schreiner <[email protected]>

* docs: fix examples

Signed-off-by: Henry Schreiner <[email protected]>

* chore: include Python 3.11 classifiers

Signed-off-by: Henry Schreiner <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
henryiii and pre-commit-ci[bot] authored Sep 19, 2022
1 parent 203812f commit 9927fec
Show file tree
Hide file tree
Showing 9 changed files with 210 additions and 139 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
env:
FORCE_COLOR: 3

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
clang-tidy:
name: Clang-Tidy
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repos:
rev: v2.0.0
hooks:
- id: setup-cfg-fmt
args: [--include-version-classifiers, --max-py-version=3.10]
args: [--include-version-classifiers, --max-py-version=3.11]

- repo: https://github.com/hadialqattan/pycln
rev: v2.1.1
Expand Down
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pytest-benchmark
setuptools >=42
setuptools_scm[toml] >=3.4,!=4.0.0
typing_extensions; python_version<'3.8'
uproot
15 changes: 7 additions & 8 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,21 @@

## Version 1.3

### WIP

#### Bug Fixes

* Avoid the constructor when creating new histograms from existing ones. [#759][]

[#759]: https://github.com/scikit-hep/boost-histogram/pull/759

### Version 1.3.2

#### Changes

* Added `storage_type` operator and `storage_type()` function [#781][], with pending deprecation for `_storage_type`. [#786][] [#790][]
* Better errors generated for missing or incorrect sample to mean storage. [#782][]
* Better error message when views are set with an incompatible array. [#794][]

#### Bug fixes

* Patch broken sum with fully empty (0 bin) axis. [#718][]
* Fix zero range `bh.numpy.histogram` to match `numpy.histogram` behavior. [#721][]
* Avoid triggering `__init__` when copying (better support for subclasses with custom init's). [#759][]
* IntCategory now supports numbers larger than 2^24 (now 2^53). [#792][]
* Pick a subset now supported inside a larger expression. [#793][]

#### Backend and docs

Expand All @@ -31,6 +26,7 @@
* Using pybind11 2.10 [#767][]
* Explicit `reset()` documentation. [#783][]
* Minor cleanup and further removal of a little Python 2 back-compat code.
* Warnings have better stacklevel settings.

[#718]: https://github.com/scikit-hep/boost-histogram/pull/718
[#721]: https://github.com/scikit-hep/boost-histogram/pull/721
Expand All @@ -44,6 +40,9 @@
[#786]: https://github.com/scikit-hep/boost-histogram/pull/786
[#789]: https://github.com/scikit-hep/boost-histogram/pull/789
[#790]: https://github.com/scikit-hep/boost-histogram/pull/790
[#792]: https://github.com/scikit-hep/boost-histogram/pull/792
[#793]: https://github.com/scikit-hep/boost-histogram/pull/793
[#794]: https://github.com/scikit-hep/boost-histogram/pull/794

### Version 1.3.1

Expand Down
263 changes: 174 additions & 89 deletions notebooks/BoostHistogramHandsOn.ipynb

Large diffs are not rendered by default.

52 changes: 16 additions & 36 deletions notebooks/aghast.ipynb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions notebooks/xarray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"source": [
"bh_bins = bh.axis.Regular(19, -4, 4)\n",
"bh_hist = bh.Histogram(bh_bins).fill(np.asarray(da).flatten())\n",
"plt.plot(bh_hist.axes[0].centers, bh_hist);"
"plt.plot(bh_hist.axes[0].centers, bh_hist.values());"
]
},
{
Expand Down Expand Up @@ -175,7 +175,7 @@
"\n",
" # Now compute the xarray output.\n",
" return xr.DataArray(\n",
" h,\n",
" h.values(),\n",
" name=\"_\".join(a.name for a in args) + \"_histogram\",\n",
" coords=[\n",
" (f\"{a.name}_bin\", arr.flatten(), a.attrs)\n",
Expand Down Expand Up @@ -267,7 +267,7 @@
" h.fill(*prepare_fill, weight=np.asarray(prepared_weights).flatten())\n",
"\n",
" return xr.DataArray(\n",
" h,\n",
" h.values(),\n",
" name=\"_\".join(a.name for a in args) + \"_histogram\",\n",
" coords=[\n",
" (f\"{a.name}_bin\", arr.flatten(), a.attrs)\n",
Expand Down Expand Up @@ -527,7 +527,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.9.10"
}
},
"nbformat": 4,
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Topic :: Scientific/Engineering
Expand Down
3 changes: 2 additions & 1 deletion src/boost_histogram/_internal/hist.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,8 @@ def __getitem__( # noqa: C901

if pick_set:
warnings.warn(
"List indexing selection is experimental. Removed bins are not placed in overflow."
"List indexing selection is experimental. Removed bins are not placed in overflow.",
stacklevel=2,
)
logger.debug("Slices for picking sets: %s", pick_set)
axes = [reduced.axis(i) for i in range(reduced.rank())]
Expand Down

0 comments on commit 9927fec

Please sign in to comment.