Skip to content

Commit f769257

Browse files
authored
Make various very small edits and tiny updates (#958)
1 parent f2fe20a commit f769257

File tree

9 files changed

+40
-37
lines changed

9 files changed

+40
-37
lines changed

.editorconfig

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,13 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Summary: define basic code editor style parameters for this project.
16-
17-
# Many IDEs & editors read .editorconfig files, either natively or via plugins.
18-
# We mostly follow Google's style guides (https://google.github.io/styleguide/)
19-
# with only a few deviations for line length and indentation in some files.
20-
2115
root = true
2216

23-
# IMPORTANT: some of the other config files (.markdownlintrc, .jsonlintrc.yaml,
24-
# pyproject.toml, etc.) also have settings for indent and line length. When
25-
# making changes to this file, make sure to update the other files to match.
17+
# We mostly follow Google style guides (https://google.github.io/styleguide/)
18+
# with only a few deviations for line length and indentation in some files.
2619

20+
# IMPORTANT: some of the other config files (.clang-format, etc.) also have
21+
# the same settings and need to be updated if changes are made to this file.
2722
[*]
2823
charset = utf-8
2924
indent_style = space
@@ -32,12 +27,15 @@ spelling_language = en-US
3227
trim_trailing_whitespace = true
3328
max_line_length = 80
3429

35-
[{BUILD,*.BUILD,*.bzl,*.bazel,.bazelrc}]
30+
[{BUILD,*.BUILD,*.bzl,*.bazel,.bazelrc,WORKSPACE}]
3631
indent_size = 4
3732

3833
[{CMakeLists.txt,*.cmake}]
3934
indent_size = 4
4035

36+
[Dockerfile]
37+
indent_size = 4
38+
4139
[{Makefile,makefile,*.mk}]
4240
indent_style = tab
4341
indent_size = 4
@@ -59,5 +57,5 @@ indent_size = 4
5957
[*.toml]
6058
indent_size = 2
6159

62-
[{*.yaml,*.yml}]
60+
[{*.yaml,*.yml,*.cff}]
6361
indent_size = 2

.gemini/styleguide.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ separate subsections for Python, C++, and other file types below.
2828

2929
* Tests must be independent and must not rely on the state of other tests.
3030
Setup and teardown functions should be used to create a clean environment
31-
for each test run.
31+
for each test run. External dependencies (e.g., databases, network
32+
services, file system) must be mocked to ensure the test is isolated to the
33+
unit under test.
3234

3335
* Make sure to cover edge cases: write tests for invalid inputs, null values,
3436
empty arrays, zero values, and off-by-one errors.
@@ -39,8 +41,8 @@ separate subsections for Python, C++, and other file types below.
3941

4042
### Overall code format conventions
4143

42-
This project generally follows Google coding conventions, with a few changes.
43-
The following Google style guides are the starting points:
44+
Quantum AI projects generally follows Google coding conventions, with a few
45+
changes. The following Google style guides are the starting points:
4446

4547
* [Google C++ Style Guide](
4648
https://google.github.io/styleguide/cppguide.html)
@@ -54,12 +56,13 @@ The following Google style guides are the starting points:
5456
* [Google Shell Style Guide](
5557
https://google.github.io/styleguide/shellguide.html)
5658

57-
To learn the conventions for line length, indentation, and other style
58-
characteristics, please inspect the following configuration files (if present at
59-
the top level of this project repository):
59+
To learn this project's conventions for line length, indentation, and other
60+
details of coding style, please inspect the following configuration files (if
61+
present at the top level of this project repository):
6062

61-
* [`.editorconfig`](../.editorconfig) for basic code editor configuration for
62-
indentation and line length.
63+
* [`.editorconfig`](../.editorconfig) for basic code editor configuration
64+
(e.g., indentation and line length) specified using the
65+
[EditorConfig](https://editorconfig.org/) format.
6366

6467
* [`.clang-format`](../.clang-format) for C++ code and also protobuf (Protocol
6568
Buffers) data structure definitions.
@@ -160,7 +163,7 @@ naming, we can reduce cognitive load on human users and developers.
160163

161164
### Docstrings and documentation
162165

163-
This project uses [Google style doc strings](
166+
For Python code, this project uses [Google style doc strings](
164167
http://google.github.io/styleguide/pyguide.html#381-docstrings) with a Markdown
165168
flavor and support for LaTeX. Docstrings use tripe double quotes, and the first
166169
line should be a concise one-line summary of the function or object.

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
# yamllint disable rule:line-length
1616

17-
name: Continuous integration
17+
name: CI
1818
run-name: >-
19-
Run CI checks for ${{github.event_name}} on ${{github.ref_name}}
20-
by @${{github.actor}}
19+
Run continuous integration checks for ${{github.event_name}} on
20+
${{github.ref_name}} by @${{github.actor}}
2121
2222
on:
2323
push:

.hadolint.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Summary: configure the Dockerfile linter "hadolint" for this project.
16-
# Info about options can be found at https://github.com/hadolint/hadolint/.
17-
# Rule/error numbers are described at https://github.com/hadolint/hadolint/wiki
15+
# See https://github.com/hadolint/hadolint/ for info about config options.
16+
# IMPORTANT: if you change values here, update .editorconfig to match.
1817

1918
format: tty
2019
no-color: false
2120
no-fail: false
2221
failure-threshold: error
22+
23+
# Rule/error numbers are described at https://github.com/hadolint/hadolint/wiki
2324
ignored:
2425
# Multiple consecutive RUN stmts are usually deliberate. Don't flag that.
2526
- DL3059

.jsonlintrc.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Summary: configure https://github.com/prantlf/jsonlint for this project.
15+
# The variant of `jsonlint` we use is (https://github.com/prantlf/jsonlint).
16+
# IMPORTANT: if you change values here, update .editorconfig to match.
1617

1718
comments: false
1819
compact: true

.markdownlintrc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
// Summary: configure markdownlint for this project.
17-
//
18-
// Note: there are multiple programs programs named "markdownlint". We use
19-
// https://github.com/igorshubovych/markdownlint-cli/, which is the one you
20-
// get with "brew install markdownlint" on MacOS.
21-
//
16+
// IMPORTANT: if you change values here, update .editorconfig to match.
17+
2218
// These settings try to stay close to the Google Markdown Style as
2319
// described at https://google.github.io/styleguide/docguide/style.html
2420
// with very few differences.
21+
22+
// Note: there are multiple programs programs named "markdownlint". We use
23+
// https://github.com/igorshubovych/markdownlint-cli/, which is the one you
24+
// get with "brew install markdownlint" on MacOS.
2525
//
2626
// For a list of possible configuration options, see the following page:
2727
// https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md

.yamlfmt.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Summary: configure yamlfmt for this project.
16-
# See https://github.com/google/yamlfmt for info about options.
15+
# See https://github.com/google/yamlfmt/ for info about configuration options.
16+
# IMPORTANT: if you change values here, update .editorconfig to match.
1717

1818
# Read .gitignore for paths to exclude.
1919
gitignore_excludes: true

.yamllint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Summary: configure yamllint for this project.
1615
# See https://yamllint.readthedocs.io/ for info about configuration options.
16+
# IMPORTANT: if you change values here, update .editorconfig to match.
1717

1818
rules:
1919
line-length:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def build_extension(self, ext):
149149
url="https://github.com/quantumlib/qsim",
150150
author="The qsim/qsimh Developers",
151151
author_email="[email protected]",
152-
maintainer="Google Quantum AI open-source maintainers",
152+
maintainer="Google Quantum AI",
153153
maintainer_email="[email protected]",
154154
python_requires=">=3.10.0",
155155
install_requires=requirements,

0 commit comments

Comments
 (0)