Skip to content

Commit

Permalink
Release v0.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
fishjojo committed Oct 30, 2024
1 parent f9ad9ae commit 9be2257
Show file tree
Hide file tree
Showing 9 changed files with 121 additions and 103 deletions.
185 changes: 89 additions & 96 deletions .github/workflows/publish_pyscfadlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -26,7 +26,51 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]
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/[email protected]
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/[email protected]
env:
CMAKE_OSX_ARCHITECTURES: arm64;x86_64
with:
package-dir: pyscfadlib
output-dir: pyscfadlib/wheelhouse
Expand All @@ -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/[email protected]
# 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/[email protected]
# 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

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/source/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------------
Expand Down
15 changes: 11 additions & 4 deletions pyscfad/dft/test/test_rks_hess.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion pyscfad/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.7"
__version__ = "0.1.8"
1 change: 1 addition & 0 deletions pyscfadlib/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion pyscfadlib/pyscfadlib/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.7'
__version__ = '0.1.8'
7 changes: 7 additions & 0 deletions pyscfadlib/test/test_lapack.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pytest

def test_import():
try:
from pyscfadlib import lapack as lp
except ImportError as e:
raise ImportError(e)
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

0 comments on commit 9be2257

Please sign in to comment.