Skip to content

Commit

Permalink
Merge pull request #199 from PrincetonUniversity/numpy2_fix
Browse files Browse the repository at this point in the history
Numpy2 fix
  • Loading branch information
smiet authored Jun 26, 2024
2 parents f75a424 + c7a7c39 commit 7a6282a
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/python_wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,25 @@ jobs:
name: python_wrapper build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Python3 should be pre-installed on 'ubuntu-latest'
- name: Python version info
run: |
python3 --version
pip3 --version
python --version
pip --version
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gfortran mpi-default-bin mpi-default-dev libhdf5-103 libhdf5-dev libfftw3-bin libfftw3-dev libopenblas0-openmp libopenblas-dev cmake ninja-build
pip3 install --user numpy f90nml scikit-build scipy
pip3 install --user git+https://github.com/zhucaoxiang/f90wrap
sudo apt-get install gfortran mpi-default-bin mpi-default-dev libhdf5-dev libfftw3-bin libfftw3-dev libopenblas-dev cmake ninja-build
pip install numpy f90nml scikit-build scipy meson meson-python
pip install git+https://github.com/zhucaoxiang/f90wrap@main_off
- name: Build python_wrapper
run: |
python3 setup.py bdist_wheel
pip3 install --user dist/*.whl
pip install .
- name: Test if installation is ok
run: |
python3 -c "import spec; print('success')"
python -c "import spec; print('success')"
2 changes: 1 addition & 1 deletion Utilities/pythontools/py_spec/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# import of all SPEC-related python scripts.
__version__ = "3.3.3"
__version__ = "3.3.4"

from .ci import test
from .input.spec_namelist import SPECNamelist
Expand Down
1 change: 0 additions & 1 deletion Utilities/pythontools/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
h5py
matplotlib
f90nml
numpy

# Version 1.7.0 or higher is required - otherwise scipy.integrate.simpson does not exist
scipy>=1.7.0
Expand Down
2 changes: 2 additions & 0 deletions Utilities/pythontools/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
setuptools.setup(
name="py_spec",
version=__version__,
setup_requires=["numpy>=2.0"],
install_requires=["numpy>=1.21.1"],
description="SPEC(Stepped-Pressure Equilibrium Code) python utilities",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

setup(
name="spec",
version="0.0.2",
version="0.0.3",
#license="MIT",
packages=['spec'],
package_dir={'': 'Utilities/python_wrapper'},
Expand Down
2 changes: 1 addition & 1 deletion src/global.f90
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module constants
REAL, parameter :: mu0 = 2.0E-07 * pi2 !< \f$4\pi\cdot10^{-7}\f$
REAL, parameter :: goldenmean = 1.618033988749895 !< golden mean = \f$( 1 + \sqrt 5 ) / 2\f$ ;

REAL, parameter :: version = 3.22 !< version of SPEC
REAL, parameter :: version = 3.23 !< version of SPEC

end module constants

Expand Down
4 changes: 2 additions & 2 deletions src/hesian.f90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!> \file
!> \brief Computes eigenvalues and eigenvectors of derivative matrix, \f$\nabla_{\bf \xi}{\bf F}\f$.
!> \brief Computes eigenvalues and eigenvectors of derivative matrix, \f$\nabla_{\bf xi}{\bf F}\f$.

!> \brief Computes eigenvalues and eigenvectors of derivative matrix, \f$\nabla_{\bf \xi}{\bf F}\f$.
!> \brief Computes eigenvalues and eigenvectors of derivative matrix, \f$\nabla_{\bf xi}{\bf F}\f$.
!> \ingroup grp_diagnostics
!>
!> @param[in] NGdof number of global degrees of freedom
Expand Down

0 comments on commit 7a6282a

Please sign in to comment.