This PR adds a script to automatically execute notebooks in CI.
To keep PRs small and focussed, this only adds the scripts to test
notebooks, it doesn't actually fix those notebooks or add anything to
CI.
<details>
<summary>Example: Success</summary>
![Screenshot 2023-12-04 at 14 22
15](https://github.com/Qiskit/documentation/assets/36071638/2c6f698d-f990-456c-b20d-241db4d0007c)
</details>
<details>
<summary>Example: Failure</summary>
![Screenshot 2023-12-04 at 14 23
17](https://github.com/Qiskit/documentation/assets/36071638/4983fcae-6d32-4c26-bdb3-4d6035d0a2fa)
</details>
<details>
<summary>Why <code>tox</code>?</summary>
An important feature is to be able to run a single notebook in the
virtual environment. With `tox`, we can use commands like this:
```sh
tox -- path/to/notebook
```
Whereas with `nox`, this is the simplest I could get it:
```sh
nox --session 'test(path="path/to/notebook")'
```
Note this also doesn't autocomplete the path.
The main reason for choosing `nox` seems to be more flexible
configuration, but we only need simple configuration in this repo so
this isn't a problem.
</details>
***
Part of #166
---------
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Closes https://github.com/Qiskit/documentation/issues/9.
Once this lands, we will update the closed source repository to start
consuming this repository and remove the API pipeline from there.
Note that these API docs are not identical to the closed source
versions! This uses qiskit-ibm-provider 0.7 rather than 0.6.3, and
qiskit-ibm-runtime 0.12.2 rather than 0.11.3.
We skip spellcheck issues and the metadata check for certain files
(https://github.com/Qiskit/documentation/issues/66) to facilitate
landing this. They were already issues in closed source.
In the closed source repository that consumes Qiskit/docs, we have this
same check for valid file metadata. It is useful to run it here too so
that we fail more eagerly.
Like the internal code, this uses TypeScript. It makes the code more
readable and better aligned with the internal code.
---------
Co-authored-by: Axel Hernández Ferrera <axelhzf@gmail.com>
Closes https://github.com/Qiskit/docs/issues/5.
This sets up some initial infrastructure for the repository, like CI and
the folder structure from @axelhzf's proof of concept of how to open
source documentation content.
Follow up PRs will build on this infrastructure as part of
https://github.com/Qiskit/docs/milestone/1.
## Synchronizing cSpell config with closed source
This PR copies the closed source config for cSpell.
It's a bummer that this config is duplicated. I considered if we should
automate synchronizing the config file, which would need to be the
closed source repo pulling in the closed source file, since the open
source repo cannot access the closed source repo. But I think it's not
worth the complexity to automate this, at least for now.
The closed source repository will open up a PR to use a new version of
this qiskit/docs repository. That PR will run its own spellcheck. So if
there is new content with typos, the spellcheck will fail, which is a
signal that we need to update the closed source cSpell config.
If this ends up not being sustainable, then I recommend we figure out
how to automate syncing. But for now, keep it simple.
---------
Co-authored-by: Axel Hernández Ferrera <axelhzf@gmail.com>
Co-authored-by: Eric Harvey <eric@harvey.io>