From 9be2257240e7cc5422fbfc986b519609eb1db200 Mon Sep 17 00:00:00 2001 From: fishjojo Date: Wed, 30 Oct 2024 15:56:19 -0700 Subject: [PATCH] Release v0.1.8 --- .github/workflows/publish_pyscfadlib.yml | 185 +++++++++++------------ CHANGELOG.md | 9 ++ doc/source/getting_started/install.rst | 2 +- pyscfad/dft/test/test_rks_hess.py | 15 +- pyscfad/version.py | 2 +- pyscfadlib/pyproject.toml | 1 + pyscfadlib/pyscfadlib/version.py | 2 +- pyscfadlib/test/test_lapack.py | 7 + setup.py | 1 + 9 files changed, 121 insertions(+), 103 deletions(-) create mode 100644 pyscfadlib/test/test_lapack.py diff --git a/.github/workflows/publish_pyscfadlib.yml b/.github/workflows/publish_pyscfadlib.yml index a583de49..f4baed87 100644 --- a/.github/workflows/publish_pyscfadlib.yml +++ b/.github/workflows/publish_pyscfadlib.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: jobs: - publish_pypi_linux_x86: + publish_pypi_linux_x86_aarch64: name: publish linux_x86 wheels to pypi runs-on: ubuntu-latest @@ -26,7 +26,51 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.21.3 env: - CIBW_ARCHS_LINUX: aarch64 + CIBW_ARCHS_LINUX: x86_64 aarch64 + with: + package-dir: pyscfadlib + output-dir: pyscfadlib/wheelhouse + config-file: "{package}/pyproject.toml" + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: pyscfadlib/wheelhouse + + build_wheel_macos_x86: + name: Build macos_x86 wheels + runs-on: macos-13 + + steps: + - uses: actions/checkout@v4 + + - name: Build wheels + uses: pypa/cibuildwheel@v2.21.3 + env: + MACOSX_DEPLOYMENT_TARGET: "10.14" + with: + package-dir: pyscfadlib + output-dir: pyscfadlib/wheelhouse + config-file: "{package}/pyproject.toml" + + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: cibw_wheels_macos_x86 + path: pyscfadlib/wheelhouse/*.whl + overwrite: true + + build_wheel_macos_arm64: + name: Build macos_arm64 wheels + runs-on: macos-14 + + steps: + - uses: actions/checkout@v4 + + - name: Build wheels + uses: pypa/cibuildwheel@v2.21.3 + env: + CMAKE_OSX_ARCHITECTURES: arm64;x86_64 with: package-dir: pyscfadlib output-dir: pyscfadlib/wheelhouse @@ -35,100 +79,49 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: cibw_wheels_linux + name: cibw_wheels_macos_arm64 path: pyscfadlib/wheelhouse/*.whl overwrite: true -# - name: Publish to PyPI -# uses: pypa/gh-action-pypi-publish@release/v1 -# with: -# packages-dir: pyscfadlib/wheelhouse - -# build_wheel_macos_x86: -# name: Build macos_x86 wheels -# runs-on: macos-13 -# -# steps: -# - uses: actions/checkout@v4 -# -# - name: Build wheels -# uses: pypa/cibuildwheel@v2.21.3 -# env: -# MACOSX_DEPLOYMENT_TARGET: "10.14" -# with: -# package-dir: pyscfadlib -# output-dir: pyscfadlib/wheelhouse -# config-file: "{package}/pyproject.toml" -# -# - name: Upload wheels -# uses: actions/upload-artifact@v4 -# with: -# name: cibw_wheels_macos_x86 -# path: pyscfadlib/wheelhouse/*.whl -# overwrite: true -# -# build_wheel_macos_arm64: -# name: Build macos_arm64 wheels -# runs-on: macos-14 -# -# steps: -# - uses: actions/checkout@v4 -# -# - name: Build wheels -# uses: pypa/cibuildwheel@v2.21.3 -# env: -# CMAKE_OSX_ARCHITECTURES: arm64;x86_64 -# with: -# package-dir: pyscfadlib -# output-dir: pyscfadlib/wheelhouse -# config-file: "{package}/pyproject.toml" -# -# - name: Upload wheels -# uses: actions/upload-artifact@v4 -# with: -# name: cibw_wheels_macos_arm64 -# path: pyscfadlib/wheelhouse/*.whl -# overwrite: true - -# publish_pypi_macos_x86: -# name: publish macos_x86 wheels to pypi -# needs: build_wheel_macos_x86 -# runs-on: ubuntu-latest -# -# environment: release -# permissions: -# id-token: write -# -# steps: -# - name: Download wheels -# uses: actions/download-artifact@v4 -# with: -# name: cibw_wheels_macos_x86 -# path: dist -# -# - run: ls -R dist -# -# - name: Publish to PyPI -# uses: pypa/gh-action-pypi-publish@release/v1 -# -# publish_pypi_macos_arm64: -# name: publish macos_arm64 wheels to pypi -# needs: build_wheel_macos_arm64 -# runs-on: ubuntu-latest -# -# environment: release -# permissions: -# id-token: write -# -# steps: -# - name: Download wheels -# uses: actions/download-artifact@v4 -# with: -# name: cibw_wheels_macos_arm64 -# path: dist -# -# - run: ls -R dist -# -# - name: Publish to PyPI -# uses: pypa/gh-action-pypi-publish@release/v1 -# + publish_pypi_macos_x86: + name: publish macos_x86 wheels to pypi + needs: build_wheel_macos_x86 + runs-on: ubuntu-latest + + environment: release + permissions: + id-token: write + + steps: + - name: Download wheels + uses: actions/download-artifact@v4 + with: + name: cibw_wheels_macos_x86 + path: dist + + - run: ls -R dist + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + + publish_pypi_macos_arm64: + name: publish macos_arm64 wheels to pypi + needs: build_wheel_macos_arm64 + runs-on: ubuntu-latest + + environment: release + permissions: + id-token: write + + steps: + - name: Download wheels + uses: actions/download-artifact@v4 + with: + name: cibw_wheels_macos_arm64 + path: dist + + - run: ls -R dist + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + diff --git a/CHANGELOG.md b/CHANGELOG.md index 8436d0f7..ac0b5013 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Change log +## pyscfad 0.1.8 (October 30, 2024) + +* Changes + * Add support to Python 3.13. + * Add `scipy.logm` ensuring real results when possible. + +* Bug fixes + * Fix `logger.flush` not catching certain formats. + ## pyscfad 0.1.7 (July 26, 2024) * Changes diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst index f5d03fb3..7c8fa516 100644 --- a/doc/source/getting_started/install.rst +++ b/doc/source/getting_started/install.rst @@ -8,7 +8,7 @@ Installation Python version support ---------------------- -Officially Python 3.9, 3.10, 3.11 and 3.12. +Officially Python 3.9, 3.10, 3.11, 3.12, and 3.13. Installing from PyPI -------------------- diff --git a/pyscfad/dft/test/test_rks_hess.py b/pyscfad/dft/test/test_rks_hess.py index a7916bd6..0ea7d495 100644 --- a/pyscfad/dft/test/test_rks_hess.py +++ b/pyscfad/dft/test/test_rks_hess.py @@ -1,6 +1,7 @@ import pytest import jax -from pyscf.lib import fp +#from pyscf.lib import fp +from pyscf.dft import rks as pyscf_rks from pyscfad import gto, dft @pytest.fixture @@ -20,14 +21,20 @@ def energy(mol, xc): def test_rks_nuc_hess_lda(get_mol): mol = get_mol hess = jax.hessian(energy)(mol, 'lda,vwn').coords.coords - assert abs(fp(hess) - -0.5301815984221748) < 1e-6 + #assert abs(fp(hess) - -0.5301815984221748) < 1e-6 + hess0 = pyscf_rks.RKS(mol, xc='lda,vwn').run().Hessian().kernel() + assert abs(hess.transpose(0,2,1,3) - hess0).max() < 1e-6 def test_rks_nuc_hess_gga(get_mol): mol = get_mol hess = jax.hessian(energy)(mol, 'pbe, pbe').coords.coords - assert abs(fp(hess) - -0.5146764054396936) < 1e-6 + #assert abs(fp(hess) - -0.5146764054396936) < 1e-6 + hess0 = pyscf_rks.RKS(mol, xc='pbe, pbe').run().Hessian().kernel() + assert abs(hess.transpose(0,2,1,3) - hess0).max() < 1e-6 def test_rks_nuc_hess_gga_hybrid(get_mol): mol = get_mol hess = jax.hessian(energy)(mol, 'b3lyp5').coords.coords - assert abs(fp(hess) - -0.5114248632559669) < 1e-6 + #assert abs(fp(hess) - -0.5114248632559669) < 1e-6 + hess0 = pyscf_rks.RKS(mol, xc='b3lyp5').run().Hessian().kernel() + assert abs(hess.transpose(0,2,1,3) - hess0).max() < 1e-6 diff --git a/pyscfad/version.py b/pyscfad/version.py index f1380eed..9cb17e79 100644 --- a/pyscfad/version.py +++ b/pyscfad/version.py @@ -1 +1 @@ -__version__ = "0.1.7" +__version__ = "0.1.8" diff --git a/pyscfadlib/pyproject.toml b/pyscfadlib/pyproject.toml index eb39d84c..454277dd 100644 --- a/pyscfadlib/pyproject.toml +++ b/pyscfadlib/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] dependencies = [ "numpy>=1.17", diff --git a/pyscfadlib/pyscfadlib/version.py b/pyscfadlib/pyscfadlib/version.py index 124e4620..c3bb2961 100644 --- a/pyscfadlib/pyscfadlib/version.py +++ b/pyscfadlib/pyscfadlib/version.py @@ -1 +1 @@ -__version__ = '0.1.7' +__version__ = '0.1.8' diff --git a/pyscfadlib/test/test_lapack.py b/pyscfadlib/test/test_lapack.py new file mode 100644 index 00000000..49f7b0b4 --- /dev/null +++ b/pyscfadlib/test/test_lapack.py @@ -0,0 +1,7 @@ +import pytest + +def test_import(): + try: + from pyscfadlib import lapack as lp + except ImportError as e: + raise ImportError(e) diff --git a/setup.py b/setup.py index 7f387a72..f7fce98d 100644 --- a/setup.py +++ b/setup.py @@ -37,6 +37,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ], zip_safe=False, )