Skip to content

Commit b25b825

Browse files
authored
Merge pull request #5 from pyscf/master
Merge pyscf/pyscf to HPQC-LABS/pyscf
2 parents fc9995c + 8420273 commit b25b825

File tree

888 files changed

+99668
-17605
lines changed

Some content is hidden

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

888 files changed

+99668
-17605
lines changed

.flake8

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ ignore =
1212
# Imports:
1313
E401, E402,
1414
# Other:
15-
E701, E731, E741, E275,
16-
F401, C901, W391, W503, W504
15+
E701, E713, E721, E731, E741, E275,
16+
F401, F403, C901, W391, W503, W504
1717

18-
exclude = test, .git, __pycache__, build, dist, __init__.py .eggs, *.egg
18+
exclude = test, .git, __pycache__, build, dist, __init__.py, .eggs, *.egg
1919
max-line-length = 120
2020

2121
per-file-ignores =

.github/workflows/ci.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
os: [ubuntu-20.04]
29-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
29+
python-version: ["3.8", "3.12"]
3030
steps:
3131
- uses: actions/checkout@v3
3232
- name: Set up Python ${{ matrix.python-version }}
@@ -36,17 +36,18 @@ jobs:
3636
- name: Install and Test
3737
run: ./.github/workflows/run_ci.sh
3838
- name: Upload to codecov
39+
if: matrix.python-version == '3.8'
3940
uses: codecov/[email protected]
4041
with:
4142
token: ${{secrets.CODECOV_TOKEN}}
4243

4344
linux-build-aarch64:
4445
runs-on: ${{ matrix.os }}
4546
strategy:
46-
fail-fast: false
47+
fail-fast: true
4748
matrix:
4849
os: [ubuntu-20.04]
49-
pyver: [cp37-cp37m, cp38-cp38, cp39-cp39]
50+
pyver: [cp39-cp39]
5051
env:
5152
img: quay.io/pypa/manylinux2014_aarch64
5253
steps:
@@ -58,7 +59,7 @@ jobs:
5859
run: |
5960
docker run --rm -v ${{ github.workspace }}:/src/pyscf:rw --workdir=/src/pyscf ${{ env.img }} \
6061
bash -exc '/opt/python/${{ matrix.pyver }}/bin/pip install --upgrade pip setuptools && \
61-
/opt/python/${{ matrix.pyver }}/bin/pip install "numpy!=1.16,!=1.17" "scipy!=1.5" h5py pytest pytest-cov pytest-timer pyberny geometric && \
62+
/opt/python/${{ matrix.pyver }}/bin/pip install "numpy!=1.16,!=1.17" "scipy!=1.5" h5py==3.10 pytest pytest-cov pytest-timer pyberny geometric && \
6263
yum install -y epel-release && \
6364
yum-config-manager --enable epel && \
6465
yum install -y openblas-devel gcc cmake curl && \
@@ -71,14 +72,14 @@ jobs:
7172
echo 'pbc_tools_pbc_fft_engine = "NUMPY"' > .pyscf_conf.py && \
7273
echo "dftd3_DFTD3PATH = './pyscf/lib/deps/lib'" >> .pyscf_conf.py && \
7374
echo "scf_hf_SCF_mute_chkfile = True" >> .pyscf_conf.py && \
74-
ulimit -s 20000 && /opt/python/${{ matrix.pyver }}/bin/pytest pyscf/ --ignore=pyscf/adc --ignore=pyscf/pbc/df --ignore=pyscf/pbc/cc -s -c setup.cfg --cov-report xml --cov-report term --cov-config .coveragerc --cov pyscf'
75+
ulimit -s 20000 && /opt/python/${{ matrix.pyver }}/bin/pytest pyscf/ --ignore=pyscf/adc --ignore=pyscf/pbc/df --ignore=pyscf/pbc/cc -s -c pytest.ini pyscf'
7576
7677
macos-build:
7778
runs-on: macos-latest
7879
strategy:
79-
fail-fast: false
80+
fail-fast: true
8081
matrix:
81-
python-version: ["3.7"]
82+
python-version: ["3.10"]
8283
steps:
8384
- uses: actions/checkout@v3
8485
- name: Set up Python ${{ matrix.python-version }}

.github/workflows/ci_conda.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI_conda
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-conda-linux:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Setup conda
14+
uses: s-weigand/setup-conda@v1
15+
with:
16+
update-conda: true
17+
conda-channels: conda-forge
18+
- run: conda --version
19+
- run: which python
20+
- name: Build conda package
21+
run: |
22+
export CMAKE_BUILD_PARALLEL_LEVEL=4
23+
conda install -y conda-build
24+
conda config --set anaconda_upload False
25+
conda build --output-folder . conda

.github/workflows/ci_linux/build_pyscf.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
set -e
44

55
cd ./pyscf/lib
6-
curl -L "https://github.com/pyscf/pyscf-build-deps/blob/master/pyscf-2.3-deps.tar.gz?raw=true" | tar xzf -
6+
curl -L "https://github.com/pyscf/pyscf-build-deps/blob/master/pyscf-2.4a-deps.tar.gz?raw=true" | tar xzf -
77
mkdir build; cd build
8-
cmake -DBUILD_LIBXC=OFF -DBUILD_XCFUN=OFF -DBUILD_LIBCINT=OFF ..
8+
cmake -DBUILD_LIBXC=OFF -DBUILD_XCFUN=ON -DBUILD_LIBCINT=OFF -DXCFUN_MAX_ORDER=4 ..
99
make -j4
1010
cd ..
1111
rm -Rf build
+9-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
#!/usr/bin/env bash
22
python -m pip install --upgrade pip
33
pip install "numpy!=1.16,!=1.17" "scipy!=1.5" h5py pytest pytest-cov pytest-timer
4-
pip install pyberny geometric
5-
pip install spglib
4+
pip install pyberny
5+
pip install --no-deps pyscf-dispersion
66

7-
#cppe
87
version=$(python -c 'import sys; version=sys.version_info[:2]; print("{0}.{1}".format(*version))')
9-
if [ $version != '2.7' ] && [ $version != '3.5' ]; then
8+
if [ $version != '3.12' ]; then
9+
pip install geometric
10+
pip install spglib
11+
fi
12+
13+
#cppe
14+
if [ "$RUNNER_OS" == "Linux" ] && [ $version != "3.12" ]; then
1015
pip install cppe
1116
fi
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env bash
2-
exit 0
2+
#brew reinstall gcc
+5-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env bash
22
python -m pip install --upgrade pip
3-
pip install "numpy!=1.16,!=1.17" "scipy<=1.1" h5py pytest pytest-cov pytest-timer
4-
pip install pyberny geometric
3+
pip install "numpy!=1.16,!=1.17" scipy h5py pytest pytest-cov pytest-timer
4+
pip install pyberny
55

66
#cppe
77
version=$(python -c 'import sys; version=sys.version_info[:2]; print("{0}.{1}".format(*version))')
8-
if [ $version != '2.7' ] && [ $version != '3.5' ]; then
9-
pip install cppe
8+
if [ $version != '3.12' ]; then
9+
pip install geometric
10+
pip install spglib
1011
fi

.github/workflows/lint.yml

+36-10
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,44 @@ name: Lint
33
on: [push, pull_request]
44

55
jobs:
6+
ruff:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
- name: Install ruff
12+
run: pip install ruff
13+
- name: Check style
14+
run: ruff check --config .ruff.toml pyscf
15+
- name: Check NumPy
16+
run: ruff check --select NPY --ignore NPY002 pyscf
617
flake:
7-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: 3.9
26+
- name: Install flake8
27+
run: pip install "flake8>=3.7.0"
28+
- name: Static analysis
29+
run: flake8 --config .flake8 pyscf
30+
lint-pycodestyle:
31+
name: Code style check with pycodestyle
32+
runs-on: ubuntu-latest
833
steps:
9-
- name: Setup Python
10-
uses: actions/setup-python@v2
11-
with:
12-
python-version: 3.7
13-
- uses: actions/checkout@v2
14-
- name: Install flake8
15-
run: pip install "flake8>=3.7.0"
16-
- name: Static analysis
17-
run: flake8 --config .flake8 pyscf
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Set up Python
37+
uses: actions/setup-python@v4
38+
with:
39+
python-version: 3.9
40+
- name: Install pycodestyle
41+
run: pip install pycodestyle
42+
- name: Lint using pycodestyle
43+
run: pycodestyle --select=E111,W191,W293 pyscf
1844

1945
# - name: Static analysis
2046
# uses: suo/flake8-github-action@releases/v1

0 commit comments

Comments
 (0)