Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI. #816

Merged
merged 3 commits into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,40 @@ on: [pull_request]
jobs:
format:
name: Format check
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v1
with:
python-version: '3.6'
python-version: '3.8'
architecture: 'x64'
- name: Install yapf
run: cat dev_tools/conf/pip-list-dev-tools.txt | grep yapf | xargs pip install
- name: Format
run: check/format-incremental
mypy:
name: Type check
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6'
python-version: '3.8'
architecture: 'x64'
- name: Install mypy
run: cat dev_tools/conf/pip-list-dev-tools.txt | grep mypy | xargs pip install
- name: Type check
run: check/mypy
lint:
name: Lint check
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6'
python-version: '3.8'
architecture: 'x64'
- name: Install pylint
run: cat dev_tools/conf/pip-list-dev-tools.txt | grep "pylint\|astroid" | grep -v "#" | xargs pip install
Expand Down Expand Up @@ -71,9 +73,11 @@ jobs:
shell: bash
coverage:
name: Coverage check
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v1
with:
python-version: '3.8'
Expand All @@ -85,4 +89,4 @@ jobs:
pip install -r dev_tools/conf/pip-list-dev-tools.txt
git config --global user.name ${GITHUB_ACTOR}
- name: Coverage check
run: check/pytest-and-incremental-coverage --actually-quiet
run: check/pytest-and-incremental-coverage
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ networkx
numpy>=1.11.0
pubchempy
requests>=2.18
scipy>=1.1.0
scipy>=1.1.0,<1.10.0
sympy
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ class DiagonalCoulombHamiltonian:
"""

def __init__(self, one_body, two_body, constant=0.):
if two_body.dtype != numpy.float:
if two_body.dtype != numpy.float64:
raise ValueError('Two-body tensor has invalid dtype. Expected {} '
'but was {}'.format(numpy.float, two_body.dtype))
'but was {}'.format(numpy.float64, two_body.dtype))
if not numpy.allclose(two_body, two_body.T):
raise ValueError('Two-body tensor must be symmetric.')
if not numpy.allclose(one_body, one_body.T.conj()):
Expand Down