-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into correct_ndof
- Loading branch information
Showing
17 changed files
with
303 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[flake8] | ||
max-complexity = 18 | ||
max-line-length = 88 | ||
exclude = docs/conf.py | ||
count = True | ||
statistics = True | ||
import-order-style = google | ||
application-import-names = cabinetry, utils | ||
# ignore whitespace before ':' | ||
extend-ignore = E203 | ||
# ignore print statements in example | ||
per-file-ignores = | ||
example.py: T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
cff-version: 1.2.0 | ||
message: "Please cite the following works when using this software." | ||
type: software | ||
authors: | ||
- family-names: "Held" | ||
given-names: "Alexander" | ||
orcid: "https://orcid.org/0000-0002-8924-5885" | ||
affiliation: "University of Wisconsin-Madison" | ||
title: "cabinetry: v0.6.0" | ||
version: 0.6.0 | ||
doi: 10.5281/zenodo.4742752 | ||
repository-code: "https://github.com/scikit-hep/cabinetry/releases/tag/v0.6.0" | ||
url: "https://cabinetry.readthedocs.io/" | ||
keywords: | ||
- python | ||
- fitting | ||
- physics | ||
- profile likelihood | ||
license: "BSD-3-Clause" | ||
abstract: | | ||
Statistical models in [HistFactory](https://cds.cern.ch/record/1456844) | ||
format can be built by `cabinetry` from instructions in a declarative | ||
configuration. | ||
`cabinetry` makes heavy use of [`pyhf`](https://pyhf.readthedocs.io/) for | ||
statistical inference, and provides additional utilities to help study and | ||
disseminate fit results. | ||
This includes commonly used visualizations. | ||
Due to its modular approach, analyzers are free to use all of `cabinetry`'s | ||
functionality or only some pieces. | ||
`cabinetry` can be used for inference and visualization with any | ||
`pyhf`-compatible model, whether it was built with `cabinetry` or not. | ||
references: | ||
- type: article | ||
authors: | ||
- family-names: "Held" | ||
given-names: "Alexander" | ||
orcid: "https://orcid.org/0000-0002-8924-5885" | ||
affiliation: "New York University" | ||
- family-names: "Cranmer" | ||
given-names: "Kyle" | ||
orcid: "https://orcid.org/0000-0002-5769-7094" | ||
affiliation: "New York University" | ||
title: "Building and steering binned template fits with cabinetry" | ||
doi: 10.1051/epjconf/202125103067 | ||
url: "https://doi.org/10.1051/epjconf/202125103067" | ||
year: 2021 | ||
publisher: | ||
name: "EDP Sciences" | ||
volume: 251 | ||
pages: 03067 | ||
journal: EPJ Web of Web of Conferences |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,115 @@ | ||
[build-system] | ||
requires = ["setuptools>=42"] | ||
build-backend = "setuptools.build_meta" | ||
requires = [ | ||
"hatchling>=1.13.0", | ||
] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "cabinetry" | ||
version = "0.6.0" | ||
description = "design and steer profile likelihood fits" | ||
readme = "README.md" | ||
license = { text = "BSD-3-Clause" } # SPDX short identifier | ||
requires-python = ">=3.8" | ||
authors = [ | ||
{ name = "Alexander Held", email = "[email protected]" }, | ||
] | ||
maintainers = [ {name = "The Scikit-HEP admins", email = "[email protected]"} ] | ||
keywords = [ | ||
"fitting", | ||
"physics", | ||
"profile likelihood", | ||
] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
] | ||
dependencies = [ | ||
"pyhf[minuit]~=0.7.0", # model.config.suggested_fixed / .par_names API changes, set_poi(None) | ||
"boost_histogram>=1.0.0", # subclassing with family, 1.02 for stdev scaling fix (currently not needed) | ||
"hist>=2.5.0", # hist.intervals.poisson_interval | ||
"tabulate>=0.8.1", # multiline text | ||
"matplotlib>=3.5.0", # layout kwarg for subplots | ||
# below are direct dependencies of cabinetry, which are also included via pyhf[iminuit] | ||
"numpy", | ||
"pyyaml", | ||
"iminuit", | ||
"jsonschema", | ||
"click", | ||
"scipy", | ||
"packaging", # for version parsing | ||
] | ||
|
||
[project.scripts] | ||
cabinetry = "cabinetry.cli:cabinetry" | ||
|
||
[project.urls] | ||
Documentation = "https://cabinetry.readthedocs.io/" | ||
Homepage = "https://github.com/scikit-hep/cabinetry" | ||
"Issue Tracker" = "https://github.com/scikit-hep/cabinetry/issues" | ||
"Releases" = "https://github.com/scikit-hep/cabinetry/releases" | ||
"Source Code" = "https://github.com/scikit-hep/cabinetry" | ||
|
||
[project.optional-dependencies] | ||
contrib = ["uproot>=4.1.5"] # file writing bug-fixes | ||
pyhf_backends = ["pyhf[backends]"] | ||
|
||
# Developer extras | ||
test = [ | ||
"cabinetry[contrib]", | ||
"pytest", | ||
"pytest-cov>=2.6.1", # no_cover support | ||
"pydocstyle", | ||
"check-manifest", | ||
"flake8", | ||
"flake8-bugbear", | ||
"flake8-import-order", | ||
"flake8-print", | ||
"mypy", | ||
"types-tabulate", | ||
"types-PyYAML", | ||
"typeguard>=4.0.0", # cabinetry#391 | ||
"black", | ||
] | ||
docs = [ | ||
"sphinx!=5.2.0.post0", # broken due to version parsing in RTD theme | ||
"sphinx-click", | ||
"sphinx-copybutton", | ||
"sphinx-jsonschema", | ||
"sphinx-rtd-theme>=1.2", # Sphinx 7 compatibility | ||
] | ||
develop = [ | ||
"cabinetry[test,docs]", | ||
"pre-commit", | ||
"twine", | ||
] | ||
complete = [ | ||
"cabinetry[develop]", | ||
"cabinetry[pyhf_backends]", | ||
] | ||
|
||
[tool.hatch.build.targets.sdist] | ||
# hatchling always includes: | ||
# pyproject.toml, .gitignore, any README, any LICENSE, AUTHORS | ||
only-include = [ | ||
"/src", | ||
"/tests", | ||
"/utils", | ||
] | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["src/cabinetry"] | ||
|
||
[tool.black] | ||
target-version = ['py38'] | ||
|
@@ -13,6 +122,19 @@ exclude = ''' | |
)/ | ||
''' | ||
|
||
[tool.pytest.ini_options] | ||
# running typeguard can result in lower coverage https://github.com/agronholm/typeguard/issues/356 | ||
addopts = "--cov=cabinetry --cov-report html --cov-report term-missing --cov-branch -rsx --typeguard-packages=cabinetry" | ||
|
||
[tool.pytype] | ||
inputs = "src/cabinetry" | ||
|
||
[tool.pydocstyle] | ||
# configuration duplicated in pre-commit config | ||
match = "(?!setup|example).*\\.py" | ||
match_dir = "^(?!(tests|utils|docs)).*" | ||
convention = "google" | ||
|
||
[tool.mypy] | ||
files = "src/cabinetry" | ||
pretty = true | ||
|
Oops, something went wrong.