diff --git a/docs/api.rst b/docs/api.rst index afb9eee8f74..7dc2861d895 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -440,7 +440,7 @@ run experiments. cirq.experiments.GRID_ALIGNED_PATTERN cirq.experiments.GRID_STAGGERED_PATTERN cirq.experiments.build_entangling_layers - cirq.experiments.cross_entropy_benchmarking + .. autofunction:: cirq.experiments.cross_entropy_benchmarking cirq.experiments.get_state_tomography_data cirq.experiments.rabi_oscillations cirq.experiments.random_rotations_between_grid_interaction_layers_circuit @@ -592,7 +592,7 @@ operation. cirq.testing.asyncio_pending cirq.testing.highlight_text_differences cirq.testing.nonoptimal_toffoli_circuit - cirq.testing.random_circuit + .. autofunction:: cirq.testing.random_circuit cirq.testing.random_density_matrix cirq.testing.random_orthogonal cirq.testing.random_special_orthogonal diff --git a/docs/docs_coverage_test.py b/docs/docs_coverage_test.py index 9d733c8efd2..5065d47c8e3 100644 --- a/docs/docs_coverage_test.py +++ b/docs/docs_coverage_test.py @@ -50,7 +50,8 @@ def _api_rst_fullnames_per_section() -> List[List[str]]: if section: result.append(section) section = [] - elif ' cirq.' in line or ' .. autoclass:: cirq.' in line: + elif (' cirq.' in line or ' .. autoclass:: cirq.' in line or + ' .. autofunction:: cirq.' in line): fullname = line[line.find('cirq'):].strip() if fullname in seen: # coverage: ignore @@ -62,6 +63,7 @@ def _api_rst_fullnames_per_section() -> List[List[str]]: return result + def test_public_values_equals_documented_values(): in_actual_api = _all_public() in_api_reference = {