Skip to content

Commit

Permalink
Merge branch 'main' into guomanmin-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
speller26 authored Mar 4, 2024
2 parents c118171 + fe4f9c1 commit 28527b4
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 8 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: '3.11'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .[test]
pip install tox
- name: Run code format checks
run: |
black --check .
flake8
tox -e linters_check
2 changes: 2 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
run: python -m pip install --user --upgrade wheel
- name: Install twine
run: python -m pip install --user --upgrade twine
- name: Install setuptools
run: python -m pip install --user --upgrade setuptools
- name: Build a binary wheel and a source tarball
run: python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ jobs:
run: |
tox -e unit-tests
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ strategy.job-index }} == 0
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## v1.20.4 (2024-03-04)

### Bug Fixes and Other Changes

* make the dimension a PositiveInt for typing

## v1.20.3 (2024-03-04)

### Bug Fixes and Other Changes

* add in setuptools for publishing to pypi

## v1.20.2 (2024-03-02)

### Bug Fixes and Other Changes

* add tox read only linters

## v1.20.1 (2023-10-11)

### Bug Fixes and Other Changes
Expand Down
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sphinx configuration."""

import datetime

import pkg_resources
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ testpaths = test/unit_tests
line_length = 100
multi_line_output = 3
include_trailing_comma = true
profile=black

[flake8]
ignore =
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
install_requires=[
"numpy",
"opt_einsum",
"pydantic>=1.9,<2.0",
"pydantic",
"scipy",
"sympy",
# pinned for compatibility with strawberry fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@

from decimal import Decimal

from pydantic import PositiveInt
from pydantic.main import BaseModel


class CapabilitiesConstants(BaseModel):
DIMENSIONS = 2
DIMENSIONS: PositiveInt = 2
BOUNDING_BOX_SIZE_X: Decimal
BOUNDING_BOX_SIZE_Y: Decimal
MAX_TIME: Decimal
Expand Down
2 changes: 1 addition & 1 deletion src/braket/default_simulator/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "1.20.2.dev0"
__version__ = "1.20.5.dev0"
29 changes: 29 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ commands =
{[testenv:black]commands}
{[testenv:flake8]commands}

# Read only linter env
[testenv:linters_check]
basepython = python3
skip_install = true
deps =
{[testenv:isort_check]deps}
{[testenv:black_check]deps}
{[testenv:flake8]deps}
commands =
{[testenv:isort_check]commands}
{[testenv:black_check]commands}
{[testenv:flake8]commands}

[testenv:flake8]
basepython = python3
skip_install = true
Expand All @@ -40,6 +53,14 @@ deps =
commands =
isort -rc . {posargs} --skip-glob src/braket/default_simulator/openqasm/parser/generated/*

[testenv:isort_check]
basepython = python3
skip_install = true
deps =
isort
commands =
isort . -rc {posargs} --skip-glob 'src/braket/default_simulator/openqasm/parser/generated/*'

[testenv:black]
basepython = python3
skip_install = true
Expand All @@ -48,6 +69,14 @@ deps =
commands =
black ./ {posargs}

[testenv:black_check]
basepython = python3
skip_install = true
deps =
black
commands =
black --check ./ {posargs}

[testenv:docs]
basepython = python3
deps =
Expand Down

0 comments on commit 28527b4

Please sign in to comment.