Skip to content

Commit d5b2739

Browse files
committed
Merge branch 'main' into feature/latex
2 parents 5a44377 + 5b8b59b commit d5b2739

File tree

339 files changed

+30171
-8276
lines changed

Some content is hidden

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

339 files changed

+30171
-8276
lines changed

.github/test_events/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# GitHub Test Events
2+
3+
This folder contains mock GitHub webhook events. They can be used as input to [nektos/act](https://github.com/nektos/act) to simulate what will happen for that event. This is useful for testing CI changes locally.
4+
5+
For example, to simulate what will happen in GitHub actions run when a Python pre-release is published, you can run:
6+
7+
```sh
8+
act release -n -e .github/test_events/prerelease_python.json
9+
```
10+
11+
These payloads are adapted from GitHub's examples in [Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows).
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"action": "published",
3+
"release": {
4+
"url": "https://api.github.com/repos/octocat/Hello-World/releases/1",
5+
"html_url": "https://github.com/octocat/Hello-World/releases/v1.0.0",
6+
"assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets",
7+
"upload_url": "https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}",
8+
"tarball_url": "https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0",
9+
"zipball_url": "https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0",
10+
"discussion_url": "https://github.com/octocat/Hello-World/discussions/90",
11+
"id": 1,
12+
"node_id": "MDc6UmVsZWFzZTE=",
13+
"tag_name": "quil-py/v1.0.0",
14+
"target_commitish": "master",
15+
"name": "v1.0.0",
16+
"body": "Description of the release",
17+
"draft": false,
18+
"prerelease": true,
19+
"created_at": "2013-02-27T19:35:32Z",
20+
"published_at": "2013-02-27T19:35:32Z",
21+
"author": {
22+
"login": "octocat",
23+
"id": 1,
24+
"node_id": "MDQ6VXNlcjE=",
25+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
26+
"gravatar_id": "",
27+
"url": "https://api.github.com/users/octocat",
28+
"html_url": "https://github.com/octocat",
29+
"followers_url": "https://api.github.com/users/octocat/followers",
30+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
31+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
32+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
33+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
34+
"organizations_url": "https://api.github.com/users/octocat/orgs",
35+
"repos_url": "https://api.github.com/users/octocat/repos",
36+
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
37+
"received_events_url": "https://api.github.com/users/octocat/received_events",
38+
"type": "User",
39+
"site_admin": false
40+
},
41+
"assets": [
42+
{
43+
"url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1",
44+
"browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip",
45+
"id": 1,
46+
"node_id": "MDEyOlJlbGVhc2VBc3NldDE=",
47+
"name": "example.zip",
48+
"label": "short description",
49+
"state": "uploaded",
50+
"content_type": "application/zip",
51+
"size": 1024,
52+
"download_count": 42,
53+
"created_at": "2013-02-27T19:35:32Z",
54+
"updated_at": "2013-02-27T19:35:32Z",
55+
"uploader": {
56+
"login": "octocat",
57+
"id": 1,
58+
"node_id": "MDQ6VXNlcjE=",
59+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
60+
"gravatar_id": "",
61+
"url": "https://api.github.com/users/octocat",
62+
"html_url": "https://github.com/octocat",
63+
"followers_url": "https://api.github.com/users/octocat/followers",
64+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
65+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
66+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
67+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
68+
"organizations_url": "https://api.github.com/users/octocat/orgs",
69+
"repos_url": "https://api.github.com/users/octocat/repos",
70+
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
71+
"received_events_url": "https://api.github.com/users/octocat/received_events",
72+
"type": "User",
73+
"site_admin": false
74+
}
75+
}
76+
]
77+
}
78+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"action": "published",
3+
"release": {
4+
"url": "https://api.github.com/repos/octocat/Hello-World/releases/1",
5+
"html_url": "https://github.com/octocat/Hello-World/releases/v1.0.0",
6+
"assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets",
7+
"upload_url": "https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}",
8+
"tarball_url": "https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0",
9+
"zipball_url": "https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0",
10+
"discussion_url": "https://github.com/octocat/Hello-World/discussions/90",
11+
"id": 1,
12+
"node_id": "MDc6UmVsZWFzZTE=",
13+
"tag_name": "quil-py/v1.0.0",
14+
"target_commitish": "master",
15+
"name": "v1.0.0",
16+
"body": "Description of the release",
17+
"draft": false,
18+
"prerelease": false,
19+
"created_at": "2013-02-27T19:35:32Z",
20+
"published_at": "2013-02-27T19:35:32Z",
21+
"author": {
22+
"login": "octocat",
23+
"id": 1,
24+
"node_id": "MDQ6VXNlcjE=",
25+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
26+
"gravatar_id": "",
27+
"url": "https://api.github.com/users/octocat",
28+
"html_url": "https://github.com/octocat",
29+
"followers_url": "https://api.github.com/users/octocat/followers",
30+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
31+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
32+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
33+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
34+
"organizations_url": "https://api.github.com/users/octocat/orgs",
35+
"repos_url": "https://api.github.com/users/octocat/repos",
36+
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
37+
"received_events_url": "https://api.github.com/users/octocat/received_events",
38+
"type": "User",
39+
"site_admin": false
40+
},
41+
"assets": [
42+
{
43+
"url": "https://api.github.com/repos/octocat/Hello-World/releases/assets/1",
44+
"browser_download_url": "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip",
45+
"id": 1,
46+
"node_id": "MDEyOlJlbGVhc2VBc3NldDE=",
47+
"name": "example.zip",
48+
"label": "short description",
49+
"state": "uploaded",
50+
"content_type": "application/zip",
51+
"size": 1024,
52+
"download_count": 42,
53+
"created_at": "2013-02-27T19:35:32Z",
54+
"updated_at": "2013-02-27T19:35:32Z",
55+
"uploader": {
56+
"login": "octocat",
57+
"id": 1,
58+
"node_id": "MDQ6VXNlcjE=",
59+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
60+
"gravatar_id": "",
61+
"url": "https://api.github.com/users/octocat",
62+
"html_url": "https://github.com/octocat",
63+
"followers_url": "https://api.github.com/users/octocat/followers",
64+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
65+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
66+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
67+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
68+
"organizations_url": "https://api.github.com/users/octocat/orgs",
69+
"repos_url": "https://api.github.com/users/octocat/repos",
70+
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
71+
"received_events_url": "https://api.github.com/users/octocat/received_events",
72+
"type": "User",
73+
"site_admin": false
74+
}
75+
}
76+
]
77+
}
78+
}

.github/workflows/bench.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ jobs:
1616
- stable
1717

1818
steps:
19+
# Some of the snapshots have long file paths, so we need to enable long file paths on Windows where the limit is 260 by default
20+
- name: Allow Long File Paths
21+
if: matrix.os == 'windows-latest'
22+
run: |
23+
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f
24+
# https://github.com/actions/checkout/issues/1285#issuecomment-2042579471
25+
git config --system core.longpaths true
1926
- name: Checkout sources
2027
uses: actions/checkout@v2
2128
with:
@@ -41,12 +48,12 @@ jobs:
4148
uses: actions-rs/cargo@v1
4249
with:
4350
command: bench
44-
args: --bench parser -- --warm-up-time=2 --measurement-time=3 --sample-size=500 --color=always
51+
args: --bench parser --bench simplification -- --warm-up-time=2 --measurement-time=3 --sample-size=500 --color=always
4552

4653
- name: Archive benchmark results
4754
if: ${{ github.ref == 'refs/heads/main'}}
4855
uses: actions/upload-artifact@v3
4956
with:
5057
name: benchmarks-${{ matrix.os }}
5158
path: target/criterion
52-
59+

.github/workflows/msrv.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,23 @@ jobs:
5353
command: test
5454
args: --all-features
5555

56+
check-py:
57+
name: Check quil-py
58+
runs-on: ubuntu-latest
59+
strategy:
60+
matrix:
61+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
62+
steps:
63+
- uses: actions-rs/toolchain@v1
64+
with:
65+
toolchain: stable
66+
override: true
67+
- uses: davidB/rust-cargo-make@v1
68+
- uses: actions/checkout@v1
69+
- uses: snok/install-poetry@v1
70+
- name: Run quil-py tests, lints, and formatting checks.
71+
run: cargo make --cwd quil-py
72+
5673
fmt:
5774
name: Rustfmt
5875
runs-on: ubuntu-latest
@@ -103,7 +120,7 @@ jobs:
103120
uses: actions-rs/cargo@v1
104121
with:
105122
command: clippy
106-
args: -- -D warnings
123+
args: --all-targets --all-features -- -D warnings
107124

108125
deny:
109126
name: Deny

.github/workflows/prepare-release.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/publish-docs.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Publish quil-py documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types:
9+
- opened
10+
- reopened
11+
- synchronize
12+
- closed
13+
14+
jobs:
15+
publish-docs:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.11'
22+
- name: Install poetry
23+
uses: snok/install-poetry@v1
24+
- uses: Swatinem/rust-cache@v2
25+
- name: Install cargo-make
26+
uses: actions-rs/cargo@v1
27+
with:
28+
command: install
29+
args: --debug cargo-make
30+
- name: Build quil-py documentation
31+
uses: actions-rs/cargo@v1
32+
with:
33+
command: make
34+
args: --cwd quil-py --makefile Makefile.toml docs
35+
- name: Deploy preview
36+
if: ${{ github.event_name == 'pull_request' }}
37+
uses: rossjrw/pr-preview-action@v1
38+
with:
39+
source-dir: quil-py/build/docs
40+
preview-branch: quil-py-docs
41+
- name: Deploy docs
42+
if: ${{ github.event_name == 'push' }}
43+
uses: peaceiris/actions-gh-pages@v3
44+
with:
45+
github_token: ${{ secrets.GITHUB_TOKEN }}
46+
publish_dir: quil-py/build/docs
47+
publish_branch: quil-py-docs

0 commit comments

Comments
 (0)