Skip to content

Commit

Permalink
Merge pull request #5 from pyscf/master
Browse files Browse the repository at this point in the history
Merge pyscf/pyscf to HPQC-LABS/pyscf
  • Loading branch information
ndattani authored Nov 22, 2024
2 parents fc9995c + 8420273 commit b25b825
Show file tree
Hide file tree
Showing 888 changed files with 99,668 additions and 17,605 deletions.
6 changes: 3 additions & 3 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ ignore =
# Imports:
E401, E402,
# Other:
E701, E731, E741, E275,
F401, C901, W391, W503, W504
E701, E713, E721, E731, E741, E275,
F401, F403, C901, W391, W503, W504

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

per-file-ignores =
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -36,17 +36,18 @@ jobs:
- name: Install and Test
run: ./.github/workflows/run_ci.sh
- name: Upload to codecov
if: matrix.python-version == '3.8'
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}

linux-build-aarch64:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
fail-fast: true
matrix:
os: [ubuntu-20.04]
pyver: [cp37-cp37m, cp38-cp38, cp39-cp39]
pyver: [cp39-cp39]
env:
img: quay.io/pypa/manylinux2014_aarch64
steps:
Expand All @@ -58,7 +59,7 @@ jobs:
run: |
docker run --rm -v ${{ github.workspace }}:/src/pyscf:rw --workdir=/src/pyscf ${{ env.img }} \
bash -exc '/opt/python/${{ matrix.pyver }}/bin/pip install --upgrade pip setuptools && \
/opt/python/${{ matrix.pyver }}/bin/pip install "numpy!=1.16,!=1.17" "scipy!=1.5" h5py pytest pytest-cov pytest-timer pyberny geometric && \
/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 && \
yum install -y epel-release && \
yum-config-manager --enable epel && \
yum install -y openblas-devel gcc cmake curl && \
Expand All @@ -71,14 +72,14 @@ jobs:
echo 'pbc_tools_pbc_fft_engine = "NUMPY"' > .pyscf_conf.py && \
echo "dftd3_DFTD3PATH = './pyscf/lib/deps/lib'" >> .pyscf_conf.py && \
echo "scf_hf_SCF_mute_chkfile = True" >> .pyscf_conf.py && \
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'
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'
macos-build:
runs-on: macos-latest
strategy:
fail-fast: false
fail-fast: true
matrix:
python-version: ["3.7"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/ci_conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI_conda

on:
workflow_dispatch:

jobs:
build-conda-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
conda-channels: conda-forge
- run: conda --version
- run: which python
- name: Build conda package
run: |
export CMAKE_BUILD_PARALLEL_LEVEL=4
conda install -y conda-build
conda config --set anaconda_upload False
conda build --output-folder . conda
4 changes: 2 additions & 2 deletions .github/workflows/ci_linux/build_pyscf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
set -e

cd ./pyscf/lib
curl -L "https://github.com/pyscf/pyscf-build-deps/blob/master/pyscf-2.3-deps.tar.gz?raw=true" | tar xzf -
curl -L "https://github.com/pyscf/pyscf-build-deps/blob/master/pyscf-2.4a-deps.tar.gz?raw=true" | tar xzf -
mkdir build; cd build
cmake -DBUILD_LIBXC=OFF -DBUILD_XCFUN=OFF -DBUILD_LIBCINT=OFF ..
cmake -DBUILD_LIBXC=OFF -DBUILD_XCFUN=ON -DBUILD_LIBCINT=OFF -DXCFUN_MAX_ORDER=4 ..
make -j4
cd ..
rm -Rf build
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/ci_linux/python_deps.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/usr/bin/env bash
python -m pip install --upgrade pip
pip install "numpy!=1.16,!=1.17" "scipy!=1.5" h5py pytest pytest-cov pytest-timer
pip install pyberny geometric
pip install spglib
pip install pyberny
pip install --no-deps pyscf-dispersion

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

#cppe
if [ "$RUNNER_OS" == "Linux" ] && [ $version != "3.12" ]; then
pip install cppe
fi
2 changes: 1 addition & 1 deletion .github/workflows/ci_macos/deps_apt.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env bash
exit 0
#brew reinstall gcc
9 changes: 5 additions & 4 deletions .github/workflows/ci_macos/python_deps.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash
python -m pip install --upgrade pip
pip install "numpy!=1.16,!=1.17" "scipy<=1.1" h5py pytest pytest-cov pytest-timer
pip install pyberny geometric
pip install "numpy!=1.16,!=1.17" scipy h5py pytest pytest-cov pytest-timer
pip install pyberny

#cppe
version=$(python -c 'import sys; version=sys.version_info[:2]; print("{0}.{1}".format(*version))')
if [ $version != '2.7' ] && [ $version != '3.5' ]; then
pip install cppe
if [ $version != '3.12' ]; then
pip install geometric
pip install spglib
fi
46 changes: 36 additions & 10 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,44 @@ name: Lint
on: [push, pull_request]

jobs:
ruff:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install ruff
run: pip install ruff
- name: Check style
run: ruff check --config .ruff.toml pyscf
- name: Check NumPy
run: ruff check --select NPY --ignore NPY002 pyscf
flake:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install flake8
run: pip install "flake8>=3.7.0"
- name: Static analysis
run: flake8 --config .flake8 pyscf
lint-pycodestyle:
name: Code style check with pycodestyle
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- uses: actions/checkout@v2
- name: Install flake8
run: pip install "flake8>=3.7.0"
- name: Static analysis
run: flake8 --config .flake8 pyscf
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install pycodestyle
run: pip install pycodestyle
- name: Lint using pycodestyle
run: pycodestyle --select=E111,W191,W293 pyscf

# - name: Static analysis
# uses: suo/flake8-github-action@releases/v1
Expand Down
Loading

0 comments on commit b25b825

Please sign in to comment.