Skip to content

Commit 64e6aae

Browse files
amazon-autokshyatt-aws
authored andcommitted
Initial commit
0 parents  commit 64e6aae

Some content is hidden

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

54 files changed

+7392
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Bug report
3+
about: File a report to help us reproduce and fix the problem
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To reproduce**
14+
A clear, step-by-step set of instructions to reproduce the bug.
15+
16+
**Expected behavior**
17+
A clear and concise description of what you expected to happen.
18+
19+
**Screenshots or logs**
20+
If applicable, add screenshots or logs to help explain your problem.
21+
22+
**System information**
23+
A description of your system.
24+
25+
**Additional context**
26+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Ask a question
4+
url: https://forums.aws.amazon.com/tags/braket
5+
about: Use AWS Developer Forums to ask and answer questions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Documentation request
3+
about: Request improved documentation
4+
title: ''
5+
labels: 'documentation'
6+
assignees: ''
7+
8+
---
9+
10+
**What did you find confusing? Please describe.**
11+
A clear and concise description of what you found confusing. Ex. I tried to [...] but I didn't understand how to [...]
12+
13+
**Describe how documentation can be improved**
14+
A clear and concise description of where documentation was lacking and how it can be improved.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the documentation request here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest new functionality for this library
4+
title: ''
5+
labels: 'feature'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the feature you'd like**
11+
A clear and concise description of the functionality you want.
12+
13+
**How would this feature be used? Please describe.**
14+
A clear and concise description of the use case for this feature. Please provide an example, if possible.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
*Issue #, if available:*
2+
3+
*Description of changes:*
4+
5+
*Testing done:*
6+
7+
## Merge Checklist
8+
9+
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request._
10+
11+
#### General
12+
13+
- [ ] I have read the [CONTRIBUTING](https://github.com/amazon-braket/BraketSimulator.jl/blob/main/CONTRIBUTING.md) doc
14+
- [ ] I used the commit message format described in [CONTRIBUTING](https://github.com/amazon-braket/BraketSimulator.jl/blob/main/CONTRIBUTING.md#commit-your-change)
15+
- [ ] I have updated any necessary documentation, including [READMEs](https://github.com/amazon-braket/BraketSimulator.jl/blob/main/README.md) and [API docs](https://github.com/amazon-braket/BraketSimulator.jl/blob/main/CONTRIBUTING.md#documentation-guidelines) (if appropriate)
16+
17+
#### Tests
18+
19+
- [ ] I have added tests that prove my fix is effective or that my feature works (if appropriate)
20+
- [ ] I have checked that my tests are not configured for a specific region or account (if appropriate)
21+
22+
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

.github/workflows/CI.yml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags: ['*']
7+
pull_request:
8+
workflow_dispatch:
9+
concurrency:
10+
# Skip intermediate builds: always.
11+
# Cancel intermediate builds: only if it is a pull request build.
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
14+
jobs:
15+
test:
16+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
17+
runs-on: ${{ matrix.os }}
18+
timeout-minutes: 60
19+
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
20+
actions: write
21+
contents: read
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
version:
26+
- '1.9'
27+
- 'nightly'
28+
os:
29+
- ubuntu-latest
30+
- macOS-latest
31+
- windows-latest
32+
arch:
33+
- x64
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: julia-actions/setup-julia@v1
37+
with:
38+
version: ${{ matrix.version }}
39+
arch: ${{ matrix.arch }}
40+
- uses: julia-actions/cache@v1
41+
- uses: julia-actions/julia-buildpkg@v1
42+
- uses: julia-actions/julia-runtest@v1
43+
- uses: julia-actions/julia-processcoverage@v1
44+
- uses: codecov/codecov-action@v3
45+
with:
46+
token: ${{ secrets.CODECOV_TOKEN }}
47+
files: lcov.info
48+
docs:
49+
name: Documentation
50+
runs-on: ubuntu-latest
51+
permissions:
52+
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
53+
contents: write
54+
statuses: write
55+
steps:
56+
- uses: actions/checkout@v4
57+
- uses: julia-actions/setup-julia@v1
58+
with:
59+
version: '1'
60+
- uses: julia-actions/cache@v1
61+
- uses: julia-actions/julia-buildpkg@v1 # forces PkgServer refresh
62+
- name: Configure doc environment
63+
shell: julia --project=docs --color=yes {0}
64+
run: |
65+
using Pkg
66+
Pkg.develop(PackageSpec(path=pwd()))
67+
Pkg.instantiate()
68+
- uses: julia-actions/julia-buildpkg@v1
69+
- uses: julia-actions/julia-docdeploy@v1
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
- name: Run doctests
73+
shell: julia --project=docs --color=yes {0}
74+
run: |
75+
using Documenter: DocMeta, doctest
76+
using Braket, BraketSimulator
77+
DocMeta.setdocmeta!(BraketSimulator, :DocTestSetup, :(using Braket, BraketSimulator); recursive=true)
78+
doctest(BraketSimulator)

.github/workflows/Documentation.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main # update to match your development branch (master, main, dev, trunk, ...)
7+
tags: '*'
8+
9+
jobs:
10+
build:
11+
permissions:
12+
contents: write
13+
statuses: write
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: julia-actions/setup-julia@v1
18+
with:
19+
version: '1.6'
20+
- name: Install dependencies
21+
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
22+
- name: Build and deploy
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
run: julia --project=docs/ docs/make.jl

.github/workflows/TagBot.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
8+
jobs:
9+
TagBot:
10+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: JuliaRegistries/TagBot@v1
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/code-freeze.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Code Freeze
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
env:
13+
FROZEN: ${{ vars.FROZEN }}
14+
UNFROZEN_PREFIX: ${{ vars.UNFROZEN_PREFIX }}
15+
16+
jobs:
17+
check-pr-frozen-status:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Fetch PR data and check if merge allowed
21+
if: env.FROZEN == 'true'
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: |
25+
PR_DATA=$(curl -s \
26+
-H "Authorization: Bearer $GITHUB_TOKEN" \
27+
-H "Accept: application/vnd.github.v3+json" \
28+
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }})
29+
BRANCH_NAME=$(echo $PR_DATA | jq .head.ref -r)
30+
PR_TITLE=$(echo $PR_DATA | jq .title -r)
31+
32+
echo $BRANCH_NAME
33+
echo $PR_TITLE
34+
35+
# if it's not a critical fix
36+
if ! [[ "$PR_TITLE" == fix\(critical\):* ]]; then
37+
# and there's an unfrozen prefix
38+
if ! [[ -z $UNFROZEN_PREFIX ]]; then
39+
# check if the branch matches unfrozen prefix
40+
if [[ "$BRANCH_NAME" != $UNFROZEN_PREFIX* ]]; then
41+
echo "Error: You can only merge from branches that start with '$UNFROZEN_PREFIX', or PRs titled with prefix 'fix(critical): '."
42+
exit 1
43+
fi
44+
# repo is fully frozen
45+
else
46+
echo "Error: You can only merge PRs titled with prefix 'fix(critical): '."
47+
exit 1
48+
fi
49+
fi
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Semgrep Codescan
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- feature/**
8+
9+
jobs:
10+
semgrep-codescan:
11+
name: Semgrep Codescan
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
submodules: true
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.10'
20+
- name: Install Semgrep
21+
run: python3 -m pip install semgrep
22+
- name: Get rules from JuliaComputing
23+
run: git clone https://github.com/JuliaComputing/semgrep-rules-julia.git
24+
- name: Run Semgrep Julia rules
25+
run: semgrep --error --config semgrep-rules-julia/rules .

.github/workflows/stale_issue.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "Close stale issues"
2+
3+
# Controls when the action will run.
4+
# This is every day at 10am
5+
on:
6+
schedule:
7+
- cron: "0 10 * * *"
8+
9+
jobs:
10+
cleanup:
11+
runs-on: ubuntu-latest
12+
name: Stale issue job
13+
steps:
14+
- uses: aws-actions/stale-issue-cleanup@v6
15+
with:
16+
# Setting messages to an empty string will cause the automation to skip
17+
# that category
18+
ancient-issue-message: Greetings! It looks like this issue hasn’t been active in longer than three years. We encourage you to check if this is still an issue in the latest release. Because it has been longer than three years since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment to prevent automatic closure, or if the issue is already closed, please feel free to reopen it.
19+
stale-issue-message: Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.
20+
stale-pr-message: Greetings! It looks like this PR hasn’t been active in longer than a week, add a comment or an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.
21+
22+
# These labels are required
23+
stale-issue-label: closing-soon
24+
exempt-issue-label: auto-label-exempt
25+
stale-pr-label: closing-soon
26+
exempt-pr-label: pr/needs-review
27+
response-requested-label: response-requested
28+
29+
# Don't set closed-for-staleness label to skip closing very old issues
30+
# regardless of label
31+
closed-for-staleness-label: closed-for-staleness
32+
33+
# Issue timing
34+
days-before-stale: 7
35+
days-before-close: 4
36+
days-before-ancient: 1095
37+
38+
# If you don't want to mark a issue as being ancient based on a
39+
# threshold of "upvotes", you can set this here. An "upvote" is
40+
# the total number of +1, heart, hooray, and rocket reactions
41+
# on an issue.
42+
minimum-upvotes-to-exempt: 1
43+
44+
repo-token: ${{ secrets.GITHUB_TOKEN }}
45+
loglevel: DEBUG
46+
# Set dry-run to true to not perform label or close actions.
47+
dry-run: false

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
*.jl.*.cov
2+
*.jl.cov
3+
*.jl.mem
4+
lcov.info
5+
*.profraw
6+
/Manifest.toml
7+
/docs/Manifest.toml
8+
/docs/build/
9+
/.coverage
10+
.DS_Store
11+
*/.DS_Store

CODEOWNERS

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
2+
3+
# These owners will be the default owners for everything in
4+
# the repo. Unless a later match takes precedence, these accounts
5+
# will be requested for review when someone opens a pull request.
6+
* @amazon-braket/braket-maintainers

CODE_OF_CONDUCT.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Code of Conduct
2+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
3+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
4+
opensource-codeofconduct@amazon.com with any additional questions or comments.

0 commit comments

Comments
 (0)