enforce 50 <= description length <= 160 (#890)

Fixes #327
This commit is contained in:
Kevin J. Sung 2024-02-26 17:36:55 -05:00 committed by GitHub
parent 129f1073de
commit ec42361ea5
26 changed files with 34 additions and 29 deletions

View File

@ -1,6 +1,6 @@
---
title: Qiskit 1.0 feature migration guide
description: Adapt to feature changes with Qiskit 1.0
description: Description of feature changes introduced in Qiskit 1.0 and how to update your code to work with them.
---
# Qiskit 1.0 feature changes

View File

@ -1,6 +1,6 @@
---
title: Qiskit 1.0 migration guide
description: Update your project to use Qiskit 1.0
description: How to update your project so that it works with Qiskit 1.0.
---
# Qiskit 1.0 migration guide

View File

@ -1,6 +1,6 @@
---
title: qiskit.algorithms migration guide
description: Use the new interface for `qiskit.algorithms`
description: How to update your code to use the new interface for `qiskit.algorithms`.
---
# Algorithms migration guide

View File

@ -1,6 +1,6 @@
---
title: qiskit.opflow migration guide
description: Stop using the deprecated `qiskit.opflow` module
description: How to update your code to stop using the deprecated `qiskit.opflow` module.
---
# Opflow migration guide

View File

@ -458,7 +458,7 @@
}
],
"metadata": {
"description": "How to create and manipulate circuits in Qiskit",
"description": "How to construct and visualize quantum circuits in Qiskit.",
"kernelspec": {
"display_name": "Python 3",
"language": "python",

View File

@ -1,6 +1,6 @@
---
title: OpenQASM 2 and Qiskit
description: Convert code between OpenQASM 2 and Qiskit
description: How to convert code between OpenQASM 2 and Qiskit.
---

View File

@ -1,6 +1,6 @@
---
title: OpenQASM 3 and Qiskit
description: Convert code between OpenQASM 3 and Qiskit
description: How to convert code between OpenQASM 3 and Qiskit.
---

View File

@ -1,6 +1,6 @@
---
title: OpenQASM 3 feature table
description: A list of the OpenQASM 3 language features
description: A table of the language features included in OpenQASM 3.
---

View File

@ -1,6 +1,6 @@
---
title: Configure error mitigation
description: Configure error mitigation with Qiskit Runtime
description: How to configure error mitigation with Qiskit Runtime.
---
# Configure error mitigation for Qiskit Runtime

View File

@ -1,6 +1,6 @@
---
title: Configure runtime compilation
description: How to use runtime compilation techniques
description: How to configure runtime compilation in Qiskit Runtime.
---

View File

@ -1,6 +1,6 @@
---
title: Primitives examples
description: Practical examples of primitive usage
description: Practical examples of using primitives in Qiskit Runtime.
---

View File

@ -1,6 +1,6 @@
---
title: Get started with primitives
description: Use Qiskit Runtime Estimator and Sampler
description: How to use the Estimator and Sampler primitives in Qiskit Runtime.
---

View File

@ -1,6 +1,6 @@
---
title: Run workloads remotely with Quantum Serverless
description: Run workloads remotely with Quantum Serverless
description: How to run quantum computing workloads remotely using Quantum Serverless.
---
# Run workloads remotely with Quantum Serverless

View File

@ -1,6 +1,6 @@
---
title: Run jobs in a batch
description: How to run jobs in batch mode.
description: How to run quantum computing jobs in batch mode using Qiskit Runtime.
---

View File

@ -1,6 +1,6 @@
---
title: Run jobs in a session
description: Run a job in a session
description: How to run a quantum computing job in a Qiskit Runtime session.
---

View File

@ -1,6 +1,6 @@
---
title: Sessions
description: An overview of sessions and when to use them.
description: An overview of Qiskit Runtime sessions and when to use them.
---

View File

@ -1,6 +1,6 @@
---
title: Configure Qiskit locally
description: Configure Qiskit on your local machine
description: How to customize the configuration of a local Qiskit installation.
---
# Configure Qiskit locally

View File

@ -1,6 +1,6 @@
---
title: Introduction
description: Introduction to IBM Quantum documentation
description: Introduction to the documentation for IBM Quantum, Qiskit, and Qiskit Runtime.
in_page_toc_max_heading_level: 2

View File

@ -1,6 +1,6 @@
---
title: Transpilation defaults and configuration options
description: Default settings and configuration options
description: The default settings and configuration options for quantum circuit transpilation in Qiskit.
---
# Transpilation default settings and configuration options

View File

@ -1,6 +1,6 @@
---
title: Introduction
description: Introduction to the transpiler
description: Introduction to transpiling quantum circuits in Qiskit.
---

View File

@ -1,6 +1,6 @@
---
title: Set transpiler optimization level
description: Learn how to set the optimization level
description: How to set the optimization level for transpiling quantum circuits in Qiskit.
---
# Set the optimization level

View File

@ -468,7 +468,7 @@
],
"metadata": {
"celltoolbar": "Raw Cell Format",
"description": "Overview of transpiler stages and the PassManager",
"description": "The default stages of the quantum circuit transpilation pipeline in Qiskit.",
"kernelspec": {
"display_name": "Python 3",
"language": "python",

View File

@ -1,6 +1,6 @@
---
title: Introduction
description: Introduction to the Verify phase
description: Introduction to verifying quantum circuits in Qiskit.
---
# Introduction

View File

@ -1,6 +1,6 @@
---
title: Exact simulation with Qiskit primitives
description: Simulate with Qiskit reference primitives. How to compute an expectation value with the Estimator primitive, and how to compute circuit output probabilities with the Sampler primitive
description: How to perform exact simulation of quantum circuits using primitives in Qiskit.
---
# Exact simulation with Qiskit primitives

View File

@ -201,7 +201,7 @@
}
],
"metadata": {
"description": "Efficient simulation of stabilizer circuits with Qiskit Aer primitives",
"description": "How to efficiently simulate stabilizer circuits using Qiskit Aer primitives.",
"kernelspec": {
"display_name": "Python 3",
"language": "python",

View File

@ -54,7 +54,11 @@ const readMetadata = async (filePath: string): Promise<Record<string, any>> => {
};
const isValidMetadata = (metadata: Record<string, any>): boolean =>
metadata.title && metadata.description;
metadata.title &&
metadata.description &&
metadata.title != metadata.description &&
metadata.description.length <= 160 &&
metadata.description.length >= 50;
const main = async (): Promise<void> => {
const args = readArgs();
@ -106,7 +110,7 @@ function handleErrors(mdErrors: string[], notebookErrors: string[]): void {
---
The title should be the page title: it's used for browser tabs and the top line of search results. The description should describe the page
in <160 characters, ideally using some keywords. The description is what
in at least 50 but no more than 160 characters, ideally using some keywords. The description is what
shows up as the text in search results. See https://github.com/Qiskit/documentation/issues/131 for some tips.
Please fix these files:\n\n${mdErrors.join("\n")}
@ -116,7 +120,8 @@ function handleErrors(mdErrors: string[], notebookErrors: string[]): void {
console.error(`
Invalid Jupyter notebook metadata. Every .ipynb file needs to
set 'title' and 'description' in the file metadata. You need to
manually add this metadata.
manually add this metadata. Furthermore, the length of the description
must be at least 50 but no more than 160 characters.
For example, if using VSCode, open up the file with
the "Open With..." option and then "Text Editor".
@ -130,7 +135,7 @@ function handleErrors(mdErrors: string[], notebookErrors: string[]): void {
Finally, add new keys in the "metadata" section for "title" and "description".
The title should be the page title: it's used for browser tabs
and the top line of search results. The description should describe the page
in <160 characters, ideally using some keywords. The description is what
in at least 50 but no more than 160 characters, ideally using some keywords. The description is what
shows up as the text in search results. See
https://github.com/Qiskit/documentation/issues/131 for some tips.