Skip to content

Commit ec5c9ca

Browse files
committed
Merge documentation and benchmarks from metapackage
This cross-repository merge unifies the documentation, benchmarks and code of conduct from the metapackage into Qiskit/Terra's build. There are very non-trivial merge conflicts that have been resolved by this commit. The summary is: - `CODE_OF_CONDUCT.md`: taken directly from the metapackage's version. - `docs/conf.py`: strongly unified, albeit without the translations components that are added in a separate commit. - `docs/index.rst`: taken almost verbatim from the metapackage. All the API documentation RST files on Terra are moved to `docs/apidoc` (without the trailing 's') to match the metapackage expectation, so the URLs of built documentation will not change. - `docs/release_notes.rst`: The metapackage's version is renamed to `docs/legacy_release_notes.rst`, given a small introductory header, and made an orphan linked only from a _new_ `docs/release_notes.rst` that uses `reno`. - `docs/tutorials.rst`: Mostly these were the same already. Updated to include Qiskit/Terra's correction that it's not an orphan, and contain the metapackage's extra intro tutorial. - `docs/apidoc/terra.rst`: renamed to `docs/apidoc/index.rst` and retitled to be correctly just "API Documentation". - `requirements-dev.txt`: the version of the Sphinx theme is bumped to 1.14 to match the metapackage expectation.
2 parents 6a7d109 + a156e4d commit ec5c9ca

File tree

104 files changed

+48412
-38
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+48412
-38
lines changed

CODE_OF_CONDUCT.md

+111-6

asv.conf.json

+172
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
{
2+
// The version of the config file format. Do not change, unless
3+
// you know what you are doing.
4+
"version": 1,
5+
6+
// The name of the project being benchmarked
7+
"project": "qiskit-terra",
8+
9+
// The project's homepage
10+
"project_url": "https://qiskit.org",
11+
12+
// The URL or local path of the source code repository for the
13+
// project being benchmarked
14+
"repo": "https://github.com/Qiskit/qiskit-terra.git",
15+
16+
// The Python project's subdirectory in your repo. If missing or
17+
// the empty string, the project is assumed to be located at the root
18+
// of the repository.
19+
// "repo_subdir": "",
20+
21+
// Customizable commands for building, installing, and
22+
// uninstalling the project. See asv.conf.json documentation.
23+
//
24+
"install_command": [
25+
"return-code=any python -c \"import shutil; shutil.rmtree('{build_dir}/build')\"",
26+
"return-code=any python -c \"import shutil; shutil.rmtree('{build_dir}/qiskit_terra.egg-info')\"",
27+
"python -mpip install seaborn",
28+
"python -mpip install pygments",
29+
"python -mpip install {wheel_file}",
30+
"python -mpip install -U qiskit-experiments==0.3.0",
31+
"python -mpip install -U python-constraint"
32+
],
33+
"uninstall_command": [
34+
"return-code=any python -mpip uninstall -y {project}",
35+
"return-code=any python -mpip uninstall -y qiskit-experiments"
36+
],
37+
"build_command": [
38+
"pip install -U Cython setuptools-rust",
39+
"python setup.py build_rust --release",
40+
"PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}"
41+
],
42+
43+
// List of branches to benchmark. If not provided, defaults to "master"
44+
// (for git) or "default" (for mercurial).
45+
"branches": ["main"], // for git
46+
// "branches": ["default"], // for mercurial
47+
48+
// The DVCS being used. If not set, it will be automatically
49+
// determined from "repo" by looking at the protocol in the URL
50+
// (if remote), or by looking for special directories, such as
51+
// ".git" (if local).
52+
"dvcs": "git",
53+
54+
// The tool to use to create environments. May be "conda",
55+
// "virtualenv" or other value depending on the plugins in use.
56+
// If missing or the empty string, the tool will be automatically
57+
// determined by looking for tools on the PATH environment
58+
// variable.
59+
"environment_type": "virtualenv",
60+
61+
// timeout in seconds for installing any dependencies in environment
62+
// defaults to 10 min
63+
//"install_timeout": 600,
64+
65+
// the base URL to show a commit for the project.
66+
"show_commit_url": "http://github.com/Qiskit/qiskit-terra/commit/",
67+
68+
// The Pythons you'd like to test against. If not provided, defaults
69+
// to the current version of Python used to run `asv`.
70+
"pythons": ["3.7", "3.8", "3.9", "3.10"],
71+
72+
// The list of conda channel names to be searched for benchmark
73+
// dependency packages in the specified order
74+
// "conda_channels": ["conda-forge", "defaults"]
75+
76+
// The matrix of dependencies to test. Each key is the name of a
77+
// package (in PyPI) and the values are version numbers. An empty
78+
// list or empty string indicates to just test against the default
79+
// (latest) version. null indicates that the package is to not be
80+
// installed. If the package to be tested is only available from
81+
// PyPi, and the 'environment_type' is conda, then you can preface
82+
// the package name by 'pip+', and the package will be installed via
83+
// pip (with all the conda available packages installed first,
84+
// followed by the pip installed packages).
85+
//
86+
// "matrix": {
87+
// "numpy": ["1.6", "1.7"],
88+
// "six": ["", null], // test with and without six installed
89+
// "pip+emcee": [""], // emcee is only available for install with pip.
90+
// },
91+
92+
// Combinations of libraries/python versions can be excluded/included
93+
// from the set to test. Each entry is a dictionary containing additional
94+
// key-value pairs to include/exclude.
95+
//
96+
// An exclude entry excludes entries where all values match. The
97+
// values are regexps that should match the whole string.
98+
//
99+
// An include entry adds an environment. Only the packages listed
100+
// are installed. The 'python' key is required. The exclude rules
101+
// do not apply to includes.
102+
//
103+
// In addition to package names, the following keys are available:
104+
//
105+
// - python
106+
// Python version, as in the *pythons* variable above.
107+
// - environment_type
108+
// Environment type, as above.
109+
// - sys_platform
110+
// Platform, as in sys.platform. Possible values for the common
111+
// cases: 'linux2', 'win32', 'cygwin', 'darwin'.
112+
//
113+
// "exclude": [
114+
// {"python": "3.2", "sys_platform": "win32"}, // skip py3.2 on windows
115+
// {"environment_type": "conda", "six": null}, // don't run without six on conda
116+
// ],
117+
//
118+
// "include": [
119+
// // additional env for python2.7
120+
// {"python": "2.7", "numpy": "1.8"},
121+
// // additional env if run on windows+conda
122+
// {"platform": "win32", "environment_type": "conda", "python": "2.7", "libpython": ""},
123+
// ],
124+
125+
// The directory (relative to the current directory) that benchmarks are
126+
// stored in. If not provided, defaults to "benchmarks"
127+
"benchmark_dir": "test/benchmarks",
128+
129+
// The directory (relative to the current directory) to cache the Python
130+
// environments in. If not provided, defaults to "env"
131+
"env_dir": ".asv/env",
132+
133+
// The directory (relative to the current directory) that raw benchmark
134+
// results are stored in. If not provided, defaults to "results".
135+
"results_dir": ".asv/results",
136+
137+
// The directory (relative to the current directory) that the html tree
138+
// should be written to. If not provided, defaults to "html".
139+
// "html_dir": "html",
140+
141+
// The number of characters to retain in the commit hashes.
142+
// "hash_length": 8,
143+
144+
// `asv` will cache results of the recent builds in each
145+
// environment, making them faster to install next time. This is
146+
// the number of builds to keep, per environment.
147+
// "build_cache_size": 2,
148+
149+
// The commits after which the regression search in `asv publish`
150+
// should start looking for regressions. Dictionary whose keys are
151+
// regexps matching to benchmark names, and values corresponding to
152+
// the commit (exclusive) after which to start looking for
153+
// regressions. The default is to start from the first commit
154+
// with results. If the commit is `null`, regression detection is
155+
// skipped for the matching benchmark.
156+
//
157+
// "regressions_first_commits": {
158+
// "some_benchmark": "352cdf", // Consider regressions only after this commit
159+
// "another_benchmark": null, // Skip regression detection altogether
160+
// },
161+
162+
// The thresholds for relative change in results, after which `asv
163+
// publish` starts reporting regressions. Dictionary of the same
164+
// form as in ``regressions_first_commits``, with values
165+
// indicating the thresholds. If multiple entries match, the
166+
// maximum is taken. If no entry matches, the default is 5%.
167+
//
168+
// "regressions_thresholds": {
169+
// "some_benchmark": 0.01, // Threshold of 1%
170+
// "another_benchmark": 0.5, // Threshold of 50%
171+
// },
172+
}

docs/_static/images/ibm_qlab.png

80.7 KB

docs/_static/images/strangeworks.png

93.3 KB

docs/apidocs/terra.rst docs/apidoc/index.rst

+3-3

0 commit comments

Comments
 (0)