Skip to content

Commit 5b43536

Browse files
committed
Merge branch 'main' into jcjaskula-aws/add_in_place_modifications
1 parent 255899a commit 5b43536

File tree

172 files changed

+9872
-3736
lines changed

Some content is hidden

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

172 files changed

+9872
-3736
lines changed

.github/workflows/check-format.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,14 @@ jobs:
1616
check-code-format:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
19+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2020
- name: Set up Python
21-
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
21+
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
2222
with:
23-
python-version: '3.x'
23+
python-version: '3.9'
2424
- name: Install dependencies
2525
run: |
26-
pip install --upgrade pip
27-
pip install -e .[test]
26+
pip install tox
2827
- name: Run code format checks
2928
run: |
30-
black --check .
31-
flake8 --enable-extensions=BCS src
29+
tox -e linters_check

.github/workflows/code-freeze.yml

Lines changed: 49 additions & 0 deletions
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

.github/workflows/dependent-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, macos-latest, windows-latest]
19-
python-version: ["3.8", "3.9", "3.10", "3.11"]
19+
python-version: ["3.9", "3.10", "3.11"]
2020
dependent:
2121
- amazon-braket-pennylane-plugin-python
2222

2323
steps:
24-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
24+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2525
- name: Set up Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
26+
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929
- name: Install dependencies

.github/workflows/publish-to-pypi.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ jobs:
1212
name: Build and publish distribution to PyPi
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
15+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1616
- name: Set up Python
17-
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
17+
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
1818
with:
1919
python-version: '3.x'
2020
- name: Install wheel
2121
run: python -m pip install --user --upgrade wheel
2222
- name: Install twine
2323
run: python -m pip install --user --upgrade twine
24+
- name: Install setuptools
25+
run: python -m pip install --user --upgrade setuptools
2426
- name: Build a binary wheel and a source tarball
2527
run: python setup.py sdist bdist_wheel
2628
- name: Publish distribution to PyPI
27-
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # release/v1
29+
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # release/v1
2830
with:
2931
password: ${{ secrets.pypi_token }}

.github/workflows/python-package.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,22 @@ jobs:
2121
strategy:
2222
matrix:
2323
os: [ubuntu-latest, macos-latest, windows-latest]
24-
python-version: ["3.8", "3.9", "3.10", "3.11"]
24+
python-version: ["3.9", "3.10", "3.11"]
2525

2626
steps:
27-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
27+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2828
- name: Set up Python ${{ matrix.python-version }}
29-
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
29+
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
3030
with:
3131
python-version: ${{ matrix.python-version }}
3232
- name: Install dependencies
3333
run: |
34-
pip install --upgrade pip
35-
pip install -e .[test]
34+
pip install tox
3635
- name: Run unit tests
3736
run: |
3837
tox -e unit-tests
3938
- name: Upload coverage report to Codecov
40-
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
39+
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0
40+
with:
41+
token: ${{ secrets.CODECOV_TOKEN }}
4142
if: ${{ strategy.job-index }} == 0

.github/workflows/twine-check.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ jobs:
1414
name: Check long description
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
17+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1818
- name: Set up Python
19-
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
19+
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
2020
with:
2121
python-version: '3.x'
2222
- name: Install wheel
2323
run: python -m pip install --user --upgrade wheel
2424
- name: Install twine
2525
run: python -m pip install --user --upgrade twine
26+
- name: Install setuptools
27+
run: python -m pip install --user --upgrade setuptools
2628
- name: Build a binary wheel and a source tarball
2729
run: python setup.py sdist bdist_wheel
2830
- name: Check that long description will render correctly on PyPI.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ __pycache__/
2828
/build
2929
/venv
3030
/dist
31+
/model.tar.gz

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ formats:
1717
build:
1818
os: ubuntu-22.04
1919
tools:
20-
python: "3.8"
20+
python: "3.9"
2121

2222
# Optionally set the version of Python and requirements required to build your docs
2323
python:

0 commit comments

Comments
 (0)