Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numpy2 fix #199

Merged
merged 9 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading