Skip to content

Commit

Permalink
fix: Replace use of raw directive in README.rst (#825)
Browse files Browse the repository at this point in the history
* Remove use of raw directive in README.rst as not allowed on PyPI
   - Amends PR #819
* Resize image files for Brazil Band plots in README to be 500 px wide
   - c.f. github/markup#295
* Add twine check of dist to publishing CI tests
* Add smaller version of pyhf logo for documentation
  • Loading branch information
matthewfeickert authored Apr 21, 2020
1 parent aaf15cb commit 5fa43bc
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 46 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install pep517
- name: Install pep517 and twine
run: |
python -m pip install pep517 --user
python -m pip install twine
- name: Build a binary wheel and a source tarball
run: |
python -m pep517.build --source --binary --out-dir dist/ .
- name: Verify the distribution
run: twine check dist/*
- name: Publish distribution 📦 to Test PyPI
# every PR will trigger a push event on master, so check the push event is actually coming from master
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'scikit-hep/pyhf'
Expand Down
86 changes: 41 additions & 45 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
.. raw:: html

<p align="center">
<img src="https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/pyhf-logo.png" alt="pyhf logo" width="320"/>
</p>
.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/pyhf-logo-small.png
:alt: pyhf logo
:width: 320
:align: center

pure-python fitting/limit-setting/interval estimation HistFactory-style
=======================================================================
Expand Down Expand Up @@ -48,21 +47,21 @@ What does it support
--------------------

Implemented variations:
- |check| HistoSys
- |check| OverallSys
- |check| ShapeSys
- |check| NormFactor
- |check| Multiple Channels
- |check| Import from XML + ROOT via `uproot <https://github.com/scikit-hep/uproot>`__
- |check| ShapeFactor
- |check| StatError
- |check| Lumi Uncertainty
- HistoSys
- OverallSys
- ShapeSys
- NormFactor
- Multiple Channels
- Import from XML + ROOT via `uproot <https://github.com/scikit-hep/uproot>`__
- ShapeFactor
- StatError
- Lumi Uncertainty

Computational Backends:
- |check| NumPy
- |check| PyTorch
- |check| TensorFlow
- |check| JAX
- NumPy
- PyTorch
- TensorFlow
- JAX

Available Optimizers

Expand All @@ -80,8 +79,8 @@ Available Optimizers
Todo
----

- |uncheck| StatConfig
- |uncheck| Non-asymptotic calculators
- StatConfig
- Non-asymptotic calculators

results obtained from this package are validated against output computed
from HistFactory workspaces
Expand All @@ -93,12 +92,15 @@ A one bin example
nobs = 55, b = 50, db = 7, nom_sig = 10.
.. raw:: html
.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/manual_1bin_55_50_7.png
:alt: manual
:width: 500
:align: center

<p align="center">
<img src="https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/manual_1bin_55_50_7.png" alt="manual" width="500"/>
<img src="https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/hfh_1bin_55_50_7.png" alt="manual" width="500"/>
</p>
.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/hfh_1bin_55_50_7.png
:alt: manual
:width: 500
:align: center

A two bin example
-----------------
Expand All @@ -108,12 +110,16 @@ A two bin example
bin 1: nobs = 100, b = 100, db = 15., nom_sig = 30.
bin 2: nobs = 145, b = 150, db = 20., nom_sig = 45.
.. raw:: html
<p align="center">
<img src="https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/manual_2_bin_100.0_145.0_100.0_150.0_15.0_20.0_30.0_45.0.png" alt="manual" width="500"/>
<img src="https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/hfh_2_bin_100.0_145.0_100.0_150.0_15.0_20.0_30.0_45.0.png" alt="manual" width="500"/>
</p>
.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/manual_2_bin_100.0_145.0_100.0_150.0_15.0_20.0_30.0_45.0.png
:alt: manual
:width: 500
:align: center

.. image:: https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/_static/img/hfh_2_bin_100.0_145.0_100.0_150.0_15.0_20.0_30.0_45.0.png
:alt: manual
:width: 500
:align: center

Installation
------------
Expand Down Expand Up @@ -147,13 +153,11 @@ on `Stack Overflow <https://stackoverflow.com/questions/tagged/pyhf>`__
with the ``[pyhf]`` tag, which the ``pyhf`` dev team
`watches <https://stackoverflow.com/questions/tagged/pyhf?sort=Newest&filters=NoAcceptedAnswer&edited=true>`__.

.. raw:: html

<p align="center">
<a href="https://stackoverflow.com/questions/tagged/pyhf">
<img src="https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-logo.png" alt="Stack Overflow pyhf tag" width="50%"/>
</a>
</p>
.. image:: https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-logo.png
:alt: Stack Overflow pyhf tag
:width: 50 %
:target: https://stackoverflow.com/questions/tagged/pyhf
:align: center

If you believe you have found a bug in ``pyhf``, please report it in the
`GitHub
Expand Down Expand Up @@ -214,11 +218,3 @@ contributors <https://github.com/scikit-hep/pyhf/graphs/contributors>`__
:target: https://hub.docker.com/r/pyhf/pyhf/
.. |Docker Pulls| image:: https://img.shields.io/docker/pulls/pyhf/pyhf.svg
:target: https://hub.docker.com/r/pyhf/pyhf/

.. |check| raw:: html

<input checked="" type="checkbox" disabled="true">

.. |uncheck| raw:: html

<input type="checkbox" disabled="true">
Binary file modified docs/_static/img/hfh_1bin_55_50_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/img/pyhf-logo-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5fa43bc

Please sign in to comment.