Skip to content

Commit

Permalink
Merge branch 'main' into kjf/unitary-synthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaucasau committed Jun 6, 2024
2 parents 4f38c31 + d203d20 commit 5e333bf
Show file tree
Hide file tree
Showing 27,604 changed files with 573,998 additions and 422,114 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: Trouble with your code?
url: https://ibm.co/joinqiskitslack
about: Ask for debugging help on the Qiskit community Slack when you run into problems with your code.
- name: Overall impressions and feedback
url: https://ibmxm.iad1.qualtrics.com/jfe/form/SV_7Uq9FCMjZPyTsFM?Q_PopulateResponse={%22QID20%22:%223%22}
about: Let us know what you think! Provide feedback to help us improve your documentation experience.
- name: Qiskit API feedback
url: https://github.com/Qiskit/qiskit/issues/new/choose
about: Open an issue in the Qiskit repository for the docs found at https://docs.quantum.ibm.com/api/qiskit.
Expand Down
33 changes: 0 additions & 33 deletions .github/ISSUE_TEMPLATE/user-feedback.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .github/actions/set-up-notebook-testing/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inputs:
description: Whether to install extra dependencies
default: "false"
ibm-quantum-token:
required: true
default: ""
instance:
# We usually only want the same access as an open user, but occasionally we
# need higher priority to test notebooks that submit jobs in reasonable
Expand All @@ -28,7 +28,7 @@ runs:
steps:
- uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.9"
cache: "pip"

- name: Install Python packages
Expand All @@ -42,6 +42,7 @@ runs:
key: ${{ hashFiles('scripts/nb-tester/requirements.txt') }}

- name: Save IBM Quantum account
if: ${{ inputs.ibm-quantum-token != '' }}
shell: python
run: |
from qiskit_ibm_runtime import QiskitRuntimeService
Expand Down
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "scripts/nb-tester"
schedule:
interval: "daily"
39 changes: 39 additions & 0 deletions .github/workflows/deploy-tutorials.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This code is a Qiskit project.
#
# (C) Copyright IBM 2024.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

name: Deploy tutorials
on:
workflow_dispatch:
inputs:
environment:
type: environment
description: Where to upload the tutorials. Either "Learning platform (staging)" or "Learning platform (production)".
required: true
jobs:
deploy:
name: Deploy tutorials to learning platform
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install tool
run: pip install ./scripts/ibm-quantum-learning-uploader
- name: Upload tutorials
run: |
cd tutorials
sync-lessons
env:
LEARNING_API_TOKEN: ${{ secrets.LEARNING_API_TOKEN }}
LEARNING_API_ENVIRONMENT: ${{ vars.LEARNING_API_ENVIRONMENT }}
3 changes: 2 additions & 1 deletion .github/workflows/learning-uploader-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
jobs:
e2e:
name: End-to-end test
environment: "Learning platform (staging)"
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
Expand All @@ -37,7 +38,7 @@ jobs:
./e2e-test.sh
env:
LEARNING_API_TOKEN: ${{ secrets.LEARNING_API_TOKEN_STAGING }}
LEARNING_API_ENVIRONMENT: staging
LEARNING_API_ENVIRONMENT: ${{ vars.LEARNING_API_ENVIRONMENT }}

make_issue:
name: Make issue on failure
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
run: npm run check:metadata
- name: Spellcheck
run: npm run check:spelling
- name: Check Qiskit bot config
run: npm run check:qiskit-bot
- name: Internal link checker
run: npm run check:internal-links
- name: Check orphaned pages
Expand Down Expand Up @@ -57,3 +59,8 @@ jobs:
run: |
echo "${{ steps.changed-docs-files.outputs.all_changed_files }}" > changed.txt
npm run check:pages-render -- --from-file changed.txt
- name: Setup Python environment
uses: ./.github/actions/set-up-notebook-testing
- name: nb-tester tests
run: tox -e nb-tester
20 changes: 18 additions & 2 deletions .github/workflows/notebook-test-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,26 @@ jobs:
uses: ./.github/actions/set-up-notebook-testing
with:
ibm-quantum-token: ${{ secrets.IBM_QUANTUM_TEST_TOKEN }}
instance: "ibm-q-internal/deployed/default"
instance: "client-enablement/documentation/qiskit-documenta"

- name: Execute notebooks
run: tox -- --only-submit-jobs
timeout-minutes: 350
run: tox -- --write --only-submit-jobs

- name: Detect changed notebooks
id: changed-notebooks
if: "!cancelled()"
run: |
echo "CHANGED_NOTEBOOKS<<EOF" >> $GITHUB_OUTPUT
git diff --name-only >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Upload executed notebooks
if: "!cancelled()"
uses: actions/upload-artifact@v4
with:
name: Executed notebooks
path: ${{ steps.changed-notebooks.outputs.CHANGED_NOTEBOOKS }}

make_issue:
name: Make issue on failure
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/notebook-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ name: Test notebooks
on:
pull_request:
paths:
- "tutorials/**/*.ipynb"
- "docs/**/*.ipynb"
- "!docs/api/**/*"
workflow_dispatch:
Expand All @@ -24,11 +25,29 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Exit early on forks
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
shell: python
run: |
raise SystemExit(
"We can't run this test on pull requests from forks."
"\n\n"
"If you have write access to Qiskit/documentation, push to a new "
"branch there and make your pull request from that branch instead."
"\n\n"
"If you don't have write access, you must test out the notebook "
"locally using the instructions in "
"https://github.com/Qiskit/documentation#execute-notebooks."
"When this PR is approved, a maintainer will merge it to a new "
"branch in Qiskit/documentation, then make a PR from that branch "
"into main so it can pass CI."
)
- name: Get all changed files
id: all-changed-files
uses: tj-actions/changed-files@af2816c65436325c50621100d67f6e853cd1b0f1
with:
files: docs/**/*.ipynb
files: "{tutorials,docs}/**/*.ipynb"
separator: "\n"

- name: Check for notebooks that require Linux
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/weekly-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,35 @@ jobs:
- name: Install Node.js dependencies
run: npm ci
- name: Check external links
env:
GITHUB_TOKEN: ${{ github.token }}
run: >
npm run check:external-links --
'docs/**/*.{md,mdx,ipynb}'
'!docs/api/qiskit/[0-9]*/*'
make_issue:
name: Make issue on failure
needs: [external-link-checker, pages-render]
if: ${{ failure() && github.event_name == 'schedule' }}
runs-on: ubuntu-latest
steps:
- name: Post issue
uses: actions/github-script@v7
with:
script: |
const message = `Today's scheduled extended checks failed.
Please [check the logs](https://github.com/Qiskit/documentation/actions/runs/${{ github.run_id }}/).
> [!NOTE]
> This issue was created by a GitHub action.
`
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: "Extended checks failed",
body: message,
assignees: ["frankharkins", "Eric-Arellano", "arnaucasau"]
})
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.tox/
docs/.gitkeep
.envrc
.python-version
latex_error.log

.ipynb_checkpoints/
Expand All @@ -17,4 +18,5 @@ tsconfig.tsbuildinfo
/.out/
/.sphinx-artifacts/
poetry.lock
pyproject.toml

.mypy_cache/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
docs
translations
scripts/lib/api/testdata
.mypy_cache
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# 2. ❯ docker run --rm -p 3000:3000 -t qiskit-docs-preview
# 3. Open up http://localhost:3000

FROM icr.io/quantum-computing/iqp-channel-docs-dev:next13.4
FROM icr.io/quantum-computing/iqp-channel-docs-dev:open-source

COPY docs/ /home/node/app/docs
COPY translations/ /home/node/app/docs
Expand Down
Loading

0 comments on commit 5e333bf

Please sign in to comment.