hep-fig 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. hep_fig-0.5.0/.gitignore +9 -0
  2. hep_fig-0.5.0/.gitlab-ci.yml +59 -0
  3. hep_fig-0.5.0/Cargo.lock +1087 -0
  4. hep_fig-0.5.0/Cargo.toml +45 -0
  5. hep_fig-0.5.0/LICENSE +21 -0
  6. hep_fig-0.5.0/NOTICE +80 -0
  7. hep_fig-0.5.0/PKG-INFO +415 -0
  8. hep_fig-0.5.0/README.md +377 -0
  9. hep_fig-0.5.0/assets/fonts/GUST-FONT-LICENSE.txt +30 -0
  10. hep_fig-0.5.0/assets/fonts/LICENSE_LIBERATION +102 -0
  11. hep_fig-0.5.0/assets/fonts/LPPL-1.3c.txt +416 -0
  12. hep_fig-0.5.0/assets/fonts/LiberationSans-Regular.ttf +0 -0
  13. hep_fig-0.5.0/assets/fonts/texgyreheros-bold.otf +0 -0
  14. hep_fig-0.5.0/assets/fonts/texgyreheros-bolditalic.otf +0 -0
  15. hep_fig-0.5.0/assets/fonts/texgyreheros-italic.otf +0 -0
  16. hep_fig-0.5.0/assets/fonts/texgyreheros-regular.otf +0 -0
  17. hep_fig-0.5.0/assets/fonts/texgyretermes-regular.otf +0 -0
  18. hep_fig-0.5.0/assets/metrics/Helvetica-Bold.afm +2827 -0
  19. hep_fig-0.5.0/assets/metrics/Helvetica-Oblique.afm +3051 -0
  20. hep_fig-0.5.0/assets/metrics/Helvetica.afm +3051 -0
  21. hep_fig-0.5.0/assets/metrics/Symbol.afm +213 -0
  22. hep_fig-0.5.0/assets/metrics/Times-Roman.afm +2419 -0
  23. hep_fig-0.5.0/assets/metrics/readme.txt +15 -0
  24. hep_fig-0.5.0/assets/metrics/rootfonts.txt +736 -0
  25. hep_fig-0.5.0/docs/cleanroom/bins_and_brackets.md +857 -0
  26. hep_fig-0.5.0/docs/cleanroom/limits_contours.md +236 -0
  27. hep_fig-0.5.0/docs/cleanroom/stack_layout.md +460 -0
  28. hep_fig-0.5.0/docs/examples/inputs/brazil.json +18 -0
  29. hep_fig-0.5.0/docs/examples/inputs/cutflow_groups.toml +3 -0
  30. hep_fig-0.5.0/docs/examples/inputs/datacard.txt +11 -0
  31. hep_fig-0.5.0/docs/examples/inputs/diagnostics.json +102 -0
  32. hep_fig-0.5.0/docs/examples/inputs/eff.json +30 -0
  33. hep_fig-0.5.0/docs/examples/inputs/forest.json +17 -0
  34. hep_fig-0.5.0/docs/examples/inputs/gof.json +16 -0
  35. hep_fig-0.5.0/docs/examples/inputs/hist2d.json +55 -0
  36. hep_fig-0.5.0/docs/examples/inputs/impacts.json +116 -0
  37. hep_fig-0.5.0/docs/examples/inputs/impacts_translate.json +14 -0
  38. hep_fig-0.5.0/docs/examples/inputs/limits.json +155 -0
  39. hep_fig-0.5.0/docs/examples/inputs/massfit.json +19 -0
  40. hep_fig-0.5.0/docs/examples/inputs/matrix.json +16 -0
  41. hep_fig-0.5.0/docs/examples/inputs/nll.json +32 -0
  42. hep_fig-0.5.0/docs/examples/inputs/overlay.json +34 -0
  43. hep_fig-0.5.0/docs/examples/inputs/points_spec.json +34 -0
  44. hep_fig-0.5.0/docs/examples/inputs/processes.toml +37 -0
  45. hep_fig-0.5.0/docs/examples/inputs/roc.json +39 -0
  46. hep_fig-0.5.0/docs/examples/inputs/significance.json +8 -0
  47. hep_fig-0.5.0/docs/examples/inputs/spectrum.json +46 -0
  48. hep_fig-0.5.0/docs/examples/inputs/stack_labels.json +38 -0
  49. hep_fig-0.5.0/docs/examples/inputs/table_labels.json +24 -0
  50. hep_fig-0.5.0/docs/examples/inputs/xsec.csv +11 -0
  51. hep_fig-0.5.0/docs/examples/inputs/yields.json +42 -0
  52. hep_fig-0.5.0/docs/examples/inputs/zscore.root +0 -0
  53. hep_fig-0.5.0/docs/figures.md +524 -0
  54. hep_fig-0.5.0/examples/render_gallery.rs +466 -0
  55. hep_fig-0.5.0/pyproject.toml +68 -0
  56. hep_fig-0.5.0/python/hep_fig/__init__.py +458 -0
  57. hep_fig-0.5.0/python/hep_fig/__main__.py +6 -0
  58. hep_fig-0.5.0/python/hep_fig/_cli.py +16 -0
  59. hep_fig-0.5.0/python/hep_fig/_native.pyi +23 -0
  60. hep_fig-0.5.0/python/hep_fig/py.typed +0 -0
  61. hep_fig-0.5.0/src/cli.rs +638 -0
  62. hep_fig-0.5.0/src/cmd/impacts.rs +117 -0
  63. hep_fig-0.5.0/src/cmd/limits.rs +75 -0
  64. hep_fig-0.5.0/src/cmd/mod.rs +108 -0
  65. hep_fig-0.5.0/src/cmd/plots.rs +130 -0
  66. hep_fig-0.5.0/src/cmd/points.rs +98 -0
  67. hep_fig-0.5.0/src/cmd/tables.rs +91 -0
  68. hep_fig-0.5.0/src/cmd/zscore.rs +107 -0
  69. hep_fig-0.5.0/src/cutflow.rs +725 -0
  70. hep_fig-0.5.0/src/groups.rs +246 -0
  71. hep_fig-0.5.0/src/impacts.rs +342 -0
  72. hep_fig-0.5.0/src/input/combine_fit.rs +71 -0
  73. hep_fig-0.5.0/src/input/fitdiag.rs +385 -0
  74. hep_fig-0.5.0/src/input/mod.rs +4 -0
  75. hep_fig-0.5.0/src/lib.rs +36 -0
  76. hep_fig-0.5.0/src/limits.rs +140 -0
  77. hep_fig-0.5.0/src/main.rs +14 -0
  78. hep_fig-0.5.0/src/plots/brazil.rs +297 -0
  79. hep_fig-0.5.0/src/plots/eff.rs +419 -0
  80. hep_fig-0.5.0/src/plots/forest.rs +391 -0
  81. hep_fig-0.5.0/src/plots/gof.rs +263 -0
  82. hep_fig-0.5.0/src/plots/hist2d.rs +315 -0
  83. hep_fig-0.5.0/src/plots/massfit.rs +508 -0
  84. hep_fig-0.5.0/src/plots/matrix.rs +278 -0
  85. hep_fig-0.5.0/src/plots/mod.rs +557 -0
  86. hep_fig-0.5.0/src/plots/nll.rs +190 -0
  87. hep_fig-0.5.0/src/plots/overlay.rs +475 -0
  88. hep_fig-0.5.0/src/plots/roc.rs +294 -0
  89. hep_fig-0.5.0/src/plots/spectrum.rs +376 -0
  90. hep_fig-0.5.0/src/plots/theme.rs +450 -0
  91. hep_fig-0.5.0/src/python.rs +161 -0
  92. hep_fig-0.5.0/src/render/axis.rs +578 -0
  93. hep_fig-0.5.0/src/render/canvas.rs +483 -0
  94. hep_fig-0.5.0/src/render/colors.rs +240 -0
  95. hep_fig-0.5.0/src/render/curve.rs +234 -0
  96. hep_fig-0.5.0/src/render/delaunay.rs +417 -0
  97. hep_fig-0.5.0/src/render/fonts.rs +450 -0
  98. hep_fig-0.5.0/src/render/graph.rs +143 -0
  99. hep_fig-0.5.0/src/render/hist.rs +256 -0
  100. hep_fig-0.5.0/src/render/latex.rs +1006 -0
  101. hep_fig-0.5.0/src/render/legend.rs +235 -0
  102. hep_fig-0.5.0/src/render/marker.rs +151 -0
  103. hep_fig-0.5.0/src/render/mod.rs +20 -0
  104. hep_fig-0.5.0/src/render/pad.rs +183 -0
  105. hep_fig-0.5.0/src/render/palette.rs +48 -0
  106. hep_fig-0.5.0/src/render/zaxis.rs +162 -0
  107. hep_fig-0.5.0/src/shapes.rs +134 -0
  108. hep_fig-0.5.0/src/significance.rs +210 -0
  109. hep_fig-0.5.0/src/stack.rs +255 -0
  110. hep_fig-0.5.0/src/stats.rs +562 -0
  111. hep_fig-0.5.0/src/styles/combine/impacts.rs +348 -0
  112. hep_fig-0.5.0/src/styles/combine/mod.rs +15 -0
  113. hep_fig-0.5.0/src/styles/ku/bins.rs +814 -0
  114. hep_fig-0.5.0/src/styles/ku/cutflow2d.rs +498 -0
  115. hep_fig-0.5.0/src/styles/ku/impacts.rs +862 -0
  116. hep_fig-0.5.0/src/styles/ku/limits.rs +674 -0
  117. hep_fig-0.5.0/src/styles/ku/mod.rs +590 -0
  118. hep_fig-0.5.0/src/styles/ku/points.rs +201 -0
  119. hep_fig-0.5.0/src/styles/ku/processes.toml +275 -0
  120. hep_fig-0.5.0/src/styles/ku/significance.rs +128 -0
  121. hep_fig-0.5.0/src/styles/ku/stack_figure/tests.rs +762 -0
  122. hep_fig-0.5.0/src/styles/ku/stack_figure.rs +623 -0
  123. hep_fig-0.5.0/src/styles/ku/xsec.rs +160 -0
  124. hep_fig-0.5.0/src/styles/ku/yield_tables.rs +557 -0
  125. hep_fig-0.5.0/src/styles/ku/zscore.rs +257 -0
  126. hep_fig-0.5.0/src/styles/mod.rs +295 -0
  127. hep_fig-0.5.0/src/zscore.rs +301 -0
  128. hep_fig-0.5.0/tests/delaunay_oracle.rs +109 -0
  129. hep_fig-0.5.0/tests/fixtures/delaunay_oracle.json +1 -0
  130. hep_fig-0.5.0/tests/python/test_hep_fig.py +175 -0
  131. hep_fig-0.5.0/tests/root_inputs.rs +223 -0
@@ -0,0 +1,9 @@
1
+ target/
2
+ dist/
3
+ .pytest_cache/
4
+ __pycache__/
5
+ *.pyc
6
+ *.egg-info/
7
+
8
+ # Local GitLab project avatar source & renders
9
+ .avatar/
@@ -0,0 +1,59 @@
1
+ # Build, test, and package hep-fig (Rust crate + Python PyO3/maturin abi3 wheel).
2
+
3
+ stages:
4
+ - test
5
+ - package
6
+ - publish
7
+
8
+ test-rust:
9
+ stage: test
10
+ image: registry.cern.ch/docker.io/library/rust:1.91
11
+ script:
12
+ - cargo test --all-targets --locked
13
+ - cargo test --doc --locked
14
+
15
+ test-python:
16
+ stage: test
17
+ image: registry.cern.ch/docker.io/library/rust:1.91
18
+ script:
19
+ - apt-get update -qq && apt-get install -y -qq --no-install-recommends python3 python3-venv python3-pip
20
+ - python3 -m venv .venv
21
+ - .venv/bin/pip install --upgrade pip "maturin>=1.7,<2.0" pytest
22
+ - .venv/bin/maturin build --locked -o target/wheels
23
+ - .venv/bin/pip install --force-reinstall target/wheels/hep_fig-*.whl
24
+ - .venv/bin/pytest -v tests/python/test_hep_fig.py
25
+ - .venv/bin/hep-fig --version
26
+ - .venv/bin/hep-fig schema
27
+
28
+ build-wheels-linux:
29
+ stage: package
30
+ image:
31
+ name: ghcr.io/pyo3/maturin:v1.15.0
32
+ entrypoint: [""]
33
+ rules:
34
+ - if: '$CI_COMMIT_TAG =~ /^v/'
35
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
36
+ when: manual
37
+ allow_failure: true
38
+ script:
39
+ - maturin build --release --locked --compatibility manylinux2014 -o dist
40
+ - maturin sdist -o dist
41
+ - ls -lh dist/
42
+ artifacts:
43
+ paths:
44
+ - dist/
45
+ expire_in: 14 days
46
+
47
+ publish-pypi:
48
+ stage: publish
49
+ image: registry.cern.ch/docker.io/library/python:3.12-slim
50
+ needs:
51
+ - job: build-wheels-linux
52
+ artifacts: true
53
+ rules:
54
+ - if: '$CI_COMMIT_TAG =~ /^v/'
55
+ when: manual
56
+ script:
57
+ - pip install --quiet twine
58
+ - twine check dist/*
59
+ - TWINE_USERNAME=__token__ TWINE_PASSWORD="${PYPI_API_TOKEN}" twine upload dist/*