Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Drop modifierclass and improve autosummary #1338

Merged
merged 6 commits into from
Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
:github_url: https://github.com/scikit-hep/pyhf/blob/master/{{module | replace(".", "/") }}

{{ name | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ name }}
.. autoclass:: {{ objname }}
:show-inheritance:

.. automethod:: __init__

{% block attributes %}
{% if attributes %}
.. rubric:: Attributes
.. rubric:: {{ _('Attributes') }}

{% for item in attributes %}
.. autoattribute:: {{ name }}.{{ item }}
Expand All @@ -18,13 +18,15 @@
{% endblock %}

{% block methods %}

{% if methods %}
.. rubric:: Methods
.. rubric:: {{ _('Methods') }}

{% for item in methods %}
{% if item not in inherited_members %}
{% for item in members %}
{% if item not in attributes and item not in inherited_members and not item.startswith('__') %}
.. automethod:: {{ name }}.{{ item }}
{% endif %}
{%- endfor %}

{% endif %}
{% endblock %}
44 changes: 30 additions & 14 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Top-Level

.. autosummary::
:toctree: _generated/
:nosignatures:

default_backend
default_optimizer
Expand All @@ -26,7 +27,6 @@ Probability Distribution Functions (PDFs)
.. autosummary::
:toctree: _generated/
:nosignatures:
:template: modifierclass.rst

Normal
Poisson
Expand All @@ -41,7 +41,6 @@ Making Models from PDFs
.. autosummary::
:toctree: _generated/
:nosignatures:
:template: modifierclass.rst

~pdf.Model
~pdf._ModelConfig
Expand All @@ -60,7 +59,6 @@ The computational backends that :code:`pyhf` provides interfacing for the vector
.. autosummary::
:toctree: _generated/
:nosignatures:
:template: modifierclass.rst

numpy_backend.numpy_backend
pytorch_backend.pytorch_backend
Expand All @@ -75,7 +73,6 @@ Optimizers
.. autosummary::
:toctree: _generated/
:nosignatures:
:template: modifierclass.rst

mixins.OptimizerMixin
opt_scipy.scipy_optimizer
Expand All @@ -89,7 +86,6 @@ Modifiers
.. autosummary::
:toctree: _generated/
:nosignatures:
:template: modifierclass.rst

histosys
normfactor
Expand All @@ -106,7 +102,6 @@ Interpolators
.. autosummary::
:toctree: _generated/
:nosignatures:
:template: modifierclass.rst

code0
code1
Expand All @@ -119,27 +114,47 @@ Inference

.. currentmodule:: pyhf.infer


Test Statistics
~~~~~~~~~~~~~~~

.. autosummary::
:toctree: _generated/
:template: modifierclass.rst
:nosignatures:

test_statistics.q0
test_statistics.qmu
test_statistics.qmu_tilde
test_statistics.tmu
test_statistics.tmu_tilde
mle.twice_nll
mle.fit
mle.fixed_poi_fit
hypotest
intervals.upperlimit
utils.get_test_stat
kratsg marked this conversation as resolved.
Show resolved Hide resolved

Calculators
~~~~~~~~~~~

.. autosummary::
:toctree: _generated/
:nosignatures:

calculators.generate_asimov_data
calculators.AsymptoticTestStatDistribution
calculators.EmpiricalDistribution
calculators.AsymptoticCalculator
calculators.ToyCalculator
utils.create_calculator
utils.get_test_stat

Fits and Tests
~~~~~~~~~~~~~~

.. autosummary::
:toctree: _generated/
:nosignatures:

mle.twice_nll
mle.fit
mle.fixed_poi_fit
hypotest
intervals.upperlimit

Exceptions
----------
Expand All @@ -151,7 +166,6 @@ Various exceptions, apart from standard python exceptions, that are raised from
.. autosummary::
:toctree: _generated/
:nosignatures:
:template: modifierclass.rst

InvalidMeasurement
InvalidNameReuse
Expand All @@ -176,6 +190,7 @@ Utilities

.. autosummary::
:toctree: _generated/
:nosignatures:

load_schema
validate
Expand All @@ -189,6 +204,7 @@ Contrib

.. autosummary::
:toctree: _generated/
:nosignatures:

viz.brazil
utils.download