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

More Numpy 2 Compatibility changes #2

Open
wants to merge 66 commits into
base: numpy2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
1fadf4b
Bump actions/upload-artifact from 3 to 4 (#370)
dependabot[bot] Jan 19, 2024
7b5e997
Bump actions/download-artifact from 3 to 4 (#368)
dependabot[bot] Jan 19, 2024
584d082
Bump pypa/cibuildwheel from 2.16.2 to 2.16.5 (#378)
dependabot[bot] Feb 1, 2024
a748f78
[pre-commit.ci] pre-commit autoupdate (#377)
pre-commit-ci[bot] Feb 5, 2024
080367e
Bump codecov/codecov-action from 3 to 4 (#379)
dependabot[bot] Feb 5, 2024
5732ba9
fix nested-yaml bug (#380)
jeremyleung521 Feb 16, 2024
2a39994
Dropping `oldest-supported-numpy` for python>=3.9 (#375)
jeremyleung521 Feb 16, 2024
bbd027f
[pre-commit.ci] pre-commit autoupdate (#381)
pre-commit-ci[bot] Feb 20, 2024
60539e6
[pre-commit.ci] pre-commit autoupdate (#383)
pre-commit-ci[bot] Mar 19, 2024
6c579df
guarantee that the order of _recursion_target is sorted by key, which…
jeremyleung521 Mar 25, 2024
24d45db
allow tstate files to contain empty line(s) and comments (#385)
jeremyleung521 Mar 25, 2024
0432f4e
initial fix with ruff
alexmgoldberg Jan 18, 2024
1aee1c3
true NPY201 fixes
jeremyleung521 Jan 19, 2024
8e657af
remove ruff lines
jeremyleung521 Jan 19, 2024
6013164
pin to numpy<2 (#386)
jeremyleung521 Mar 25, 2024
fe2150a
auto update sphinx version (#388)
jeremyleung521 Mar 27, 2024
562e17f
fix w_multi_west ibstates (#387)
jeremyleung521 Mar 27, 2024
f44c3cf
Improved GitHub Forms (Issues/PRs) (#390)
jeremyleung521 Mar 28, 2024
f4e7220
specify errors to be HDF5 Framework related (#389)
jeremyleung521 Mar 28, 2024
372661f
Bump pypa/cibuildwheel from 2.16.5 to 2.17.0 (#391)
dependabot[bot] Apr 1, 2024
d48640f
v2022.07 release
jeremyleung521 Apr 2, 2024
ae52414
include short description for package (#394)
jeremyleung521 Apr 2, 2024
7543537
Merge branch 'develop' of ssh://github.com/westpa/westpa into numpy2
jeremyleung521 Apr 5, 2024
f2c8f18
some changes to the cython code for numpy 2
jeremyleung521 Apr 5, 2024
21b7f1d
bump minimum version for dependencies
jeremyleung521 Apr 5, 2024
fa42c4b
[pre-commit.ci] pre-commit autoupdate (#396)
pre-commit-ci[bot] Apr 9, 2024
a9ed9e1
wrong variable in WESTDataReaderMixin, w_succ ignores -W (#395)
jeremyleung521 Apr 9, 2024
a775b04
[pre-commit.ci] pre-commit autoupdate (#397)
pre-commit-ci[bot] Apr 15, 2024
587296b
hotfix for propagator (#398)
jeremyleung521 Apr 16, 2024
21d00b3
fix so data manager can process removed dtypes like numpy.int (#399)
jeremyleung521 Apr 19, 2024
fcfd052
force x86-64 macos GitHub Action Runners (#402)
jeremyleung521 Apr 25, 2024
f6a01ec
Debug Mode Fix for w_ipa (#401)
jeremyleung521 Apr 25, 2024
f97e7df
Add support for testing and wheel-building on macos-arm64 (Apple Sili…
jeremyleung521 Apr 29, 2024
7067169
install mdtraj via conda in tests (#407)
jeremyleung521 Apr 30, 2024
3e43bdc
[pre-commit.ci] pre-commit autoupdate (#406)
pre-commit-ci[bot] Apr 30, 2024
ee87379
Mab lite with direction 86 (#403)
darianyang Apr 30, 2024
43ed1b9
allow users to specify executable config in west.data.datasets (#408)
jeremyleung521 Apr 30, 2024
607ee97
Fix Processes Work Manager Shutdown SegFault (#412)
jeremyleung521 May 10, 2024
b5cd672
time_config() method for checking max_run_wallclock (#413)
jeremyleung521 May 10, 2024
6d54f1d
Allow custom binning through haMSM restarting plugin (#382)
jeremyleung521 May 10, 2024
cfa7137
Allow bins to be autodetected with negative max values. (#414)
jeremyleung521 May 10, 2024
05f5cd6
Duplicate Priority/Function Name Callback Crash Fix (#410)
jeremyleung521 May 13, 2024
e3b3b42
ignore NaturalNameWarning (#416)
jeremyleung521 May 14, 2024
9b3d564
fix summary tables in westpa.analysis (#418)
jeremyleung521 May 22, 2024
fa2a91b
fix w_states --replace reporting (#421)
jeremyleung521 May 22, 2024
ce236bb
README update (#420)
jeremyleung521 May 22, 2024
2aa81a4
loosen bin def in odld (#423)
jeremyleung521 May 24, 2024
bb73acf
remove mdtraj.utils.six dependency in h5io (#424)
jeremyleung521 May 30, 2024
40fe71e
build python 3.12 wheels as well (#425)
jeremyleung521 May 30, 2024
566e2f9
Bump pypa/cibuildwheel from 2.17.0 to 2.18.1 (#426)
dependabot[bot] Jun 2, 2024
a3a674a
[pre-commit.ci] pre-commit autoupdate (#427)
pre-commit-ci[bot] Jun 18, 2024
d2485ed
w_truncate accepts truncate iterations > current_iteration (#428)
jeremyleung521 Jun 26, 2024
9ccdcdb
fix case when west/executable/datasets is None (#429)
jeremyleung521 Jun 26, 2024
56b414e
Test modernization (#430)
jeremyleung521 Jun 27, 2024
a5e0259
Bump pypa/cibuildwheel from 2.18.1 to 2.19.1 (#431)
dependabot[bot] Jul 1, 2024
d75dab0
changed mpl.cm.register_cmap() to mpl.colormaps.register() (#433)
gma57 Jul 2, 2024
a2d390e
clean up RTD pages (#432)
jeremyleung521 Jul 2, 2024
579af04
Fix MAB 86 Reporting (#435)
jeremyleung521 Jul 9, 2024
58f2f11
Bump pypa/cibuildwheel from 2.19.1 to 2.19.2 (#437)
dependabot[bot] Aug 2, 2024
1d38171
[pre-commit.ci] pre-commit autoupdate (#438)
pre-commit-ci[bot] Aug 8, 2024
888a760
[pre-commit.ci] pre-commit autoupdate (#439)
pre-commit-ci[bot] Aug 13, 2024
c50e8f7
Merge branch 'numpy2' of github.com:jeremyleung521/westpa into numpy2
jeremyleung521 Sep 4, 2024
d68fbbd
Merge branch 'develop' of github.com:jeremyleung521/westpa into numpy2
jeremyleung521 Sep 4, 2024
7d78590
not in h5diff.py
jeremyleung521 Sep 4, 2024
7e90af7
pin to numpy2, <3
jeremyleung521 Sep 4, 2024
bbd018a
drop python 3.8, bump to 3.12
jeremyleung521 Sep 4, 2024
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
30 changes: 18 additions & 12 deletions .github/ISSUE_TEMPLATE/bug_report_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,37 @@ assignees: ''

---

### Prerequisites

## Prerequisites
* [ ] Can you reproduce the problem in safe mode?
* [ ] Are you running the latest version?
* [ ] Are you reporting to the correct repository?
* [ ] Did you perform a cursory search?

For more information, see the `CONTRIBUTING` guide.
<!--- For more information, see the `CONTRIBUTING` guide. --->

## Describe the bug
<!--- A clear and concise description of what the bug is. --->

**Describe the bug.** A clear and concise description of what the bug is.

## To Reproduce
<!--- Steps to reproduce the behavior: --->
1. <!--- [First Step] --->
2. <!--- [Second Step] --->
3. <!--- [and so on...] --->

**To Reproduce.** Steps to reproduce the behavior:
1. [First Step]
2. [Second Step]
3. [and so on...]
## Expected behavior
<!--- A clear and concise description of what you expected to happen. -->

**Expected behavior.** A clear and concise description of what you expected to happen.

## Actual behavior
<!--- A clear and concise description of what actually happens. --->

**Actual behavior.** A clear and concise description of what actually happens.

## WESTPA version and platform
<!--- Which version you're running, on what OS, and how it was built (e.g. conda, system libraries, manually installed dependencies) --->

**WESTPA version and platform.** Which version you're running, on what OS, and how it was built (e.g. conda, system libraries, manually installed dependencies)

## Additional context
<!--- Add any other context about the problem here. If necessary config files are required to reproduce the bug, attach the files here here. --->

**Additional context.** Add any other context about the problem here. If necessary config files are required to reproduce the bug, attach the files here here.

13 changes: 9 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ assignees: ''

---

**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
## Is your feature request related to a problem? Please describe
<!--- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --->


**Describe the solution you'd like.** A clear and concise description of what you want to happen.
## Describe the solution you'd like
<!--- A clear and concise description of what you want to happen. --->


**Describe alternatives you've considered.** A clear and concise description of any alternative solutions or features you've considered.
## Describe alternatives you've considered
<!--- A clear and concise description of any alternative solutions or features you've considered. --->


**Additional context.** Add any other context or screenshots about the feature request here.
## Additional context
<!--- Add any other context or screenshots about the feature request here. --->


19 changes: 13 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
**Issue Number.** Is this pull request related to any outstanding issues? If so, list the issue number.
## Issue Number
<!--- Is this pull request related to any outstanding issues? If so, list the issue number. --->


**Describe the changes made.** A clear and concise description of what the problem is and what you did to fix it. E.g. [...] was happening and I've changed [...] to fix it.
## Describe the changes made
<!--- A clear and concise description of what the problem is and what you did to fix it. E.g. [...] was happening and I've changed [...] to fix it. -->


**Goals and Outstanding Issues.** A clear and concise list of goals (to be) accomplished.
## Goals and Outstanding Issues
<!--- A clear and concise list of goals (to be) accomplished. --->
- [ ]

**Major files changed.**
## Major files changed
<!--- Manually list files or include a diff link in the form of: https://github.com/user/westpa/compare/<initial SHA>..<final SHA> --->
- [ ]

**Status.**
## Status
<!--- Delete bullet points that are not relevant. --->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Expand All @@ -21,5 +26,7 @@
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.

**Additional context.** Add any other context or screenshots about the pull request here.
## Additional context
<!--- Add any other context or screenshots about the pull request here. --->


84 changes: 26 additions & 58 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,25 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [8, 9, 10, 11] # sub-versions of Python

os: ["ubuntu-latest", "macos-13", "macos-latest"] # macos-13 is x86_64, macos-latest is arm64
python-version: [9, 10, 11, 12] # sub-versions of Python
exclude:
- os: macos-14
python-version: 8
steps:
- uses: actions/checkout@v4

- name: "Install HDF5 with brew"
if: ${{ matrix.os == 'macos-latest' }}
run: "brew install hdf5"

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.19.2
env:
CIBW_SKIP: "pp* *-musllinux*"
CIBW_BUILD: "cp3${{ matrix.python-version }}-*"
CIBW_ARCHS_MACOS: "auto64" # x86_64 only
CIBW_ARCHS_MACOS: "auto64" # x86_64 and arm64, depending on the os
CIBW_ARCHS_LINUX: "auto64" # x86_64 only
CIBW_TEST_SKIP: "*-macosx_arm64"
CIBW_DEPENDENCY_VERSIONS: "latest"
CIBW_TEST_COMMAND: >
python -c "import westpa; print(westpa.__version__)" &&
Expand All @@ -56,52 +61,11 @@ jobs:
output-dir: wheelhouse
config-file: "{package}/pyproject.toml"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: artifact-wheels-${{ matrix.os }}-${{ matrix.python-version }}
path: ./wheelhouse/*.whl

# # Split off macos arm64 building...
# # Disabled for now... as of 2022-10-12
# # Currently creates broken arm64 wheels due to dependencies; unable to check
# # because macos_arm64 tests are not supported in macos_x86-64
# build_wheels_macos_arm64:
# name: Build py3.${{ matrix.python-version }} wheels on Apple Silicon
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [macos-latest]
# python-version: [8, 9, 10, 11] # sub-versions of Python, there is no py3.7-macosx_arm64
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Build wheels
# uses: pypa/cibuildwheel@v2.16.1
# env:
# CIBW_SKIP: "pp*"
# CIBW_BUILD: "cp3${{ matrix.python-version }}-*"
# CIBW_ARCHS_MACOS: "arm64"
# CIBW_TEST_COMMAND: >
# python -c "import westpa; print(westpa.__version__)" &&
# python -c "import westpa.core.propagators" &&
# python -c "import westpa.core.binning" &&
# python -c "import westpa.core.kinetics" &&
# python -c "import westpa.core.reweight" &&
# python -c "import westpa.work_managers" &&
# python -c "import westpa.tools" &&
# python -c "import westpa.fasthist" &&
# python -c "import westpa.mclib" &&
# echo "All done with the import tests!"
# # Currently blocked by https://github.com/westpa/westpa/issues/70
# # python -c "import westpa.trajtree"
# with:
# package-dir: .
# output-dir: wheelhouse
# config-file: "{package}/pyproject.toml"
#
# - uses: actions/upload-artifact@v3
# with:
# path: ./wheelhouse/*.whl
overwrite: true

build_sdist:
name: Build source distribution
Expand All @@ -111,7 +75,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Build sdist
run: pipx run build --sdist
Expand All @@ -131,13 +95,15 @@ jobs:
echo "All done with the import tests!"
# Currently blocked by https://github.com/westpa/westpa/issues/70
# python -c "import westpa.trajtree"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: artifact-sdist
path: dist/*.tar.gz
overwrite: true

upload_testpypi:
name: test.pypi
needs: [build_wheels, build_sdist] #, build_wheels_macos_arm64] # Skipping the apple silicon versions...
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: test.pypi
Expand All @@ -151,20 +117,21 @@ jobs:
github.repository == 'westpa/westpa' &&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
pattern: artifact-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://test.pypi.org/legacy/

upload_pypi:
name: PyPI
needs: [build_wheels, build_sdist] #, build_wheels_macos_arm64] # Skipping the apple silicon versions...
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: pypi
Expand All @@ -178,12 +145,13 @@ jobs:
github.repository == 'westpa/westpa' &&
(github.event_name == 'release' && github.event.action == 'published')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
pattern: artifact-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
# To test:
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.12
- name: Linting
run: |
pip install pre-commit
Expand All @@ -34,8 +34,8 @@ jobs:
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest", "macos-13", "macos-latest"] # macos-13 is x86-64, macos-latest is arm64
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -76,17 +76,19 @@ jobs:
pytest -v --cov=westpa --cov-report=xml --color=yes tests

- name: CodeCov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-{{ '${{ matrix.os }}' }}-py{{ '${{ matrix.python-version }}' }}
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

install-dev:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
os: ["ubuntu-latest", "macos-13", "macos-latest"] # macos-13 is x86-64, macos-latest is arm64

name: "Verify dev env"
runs-on: "${{ matrix.os }}"
Expand All @@ -95,8 +97,12 @@ jobs:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install HDF5 with brew if macos-arm64"
if: ${{ matrix.os == 'macos-latest' }}
run: "brew install hdf5"
- name: "Install in dev mode"
run: "python -m pip install -e .[dev]"
- name: "Import package"
run: "python -c 'import westpa; print(westpa.__version__)'"

6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: end-of-file-fixer
types: [python]
- id: trailing-whitespace
types: [python]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1
rev: 24.8.0
hooks:
- id: black
language_version: python3
Expand All @@ -19,7 +19,7 @@ repos:
| doc
)
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
rev: 7.1.1
hooks:
- id: flake8
exclude: >
Expand Down
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ WESTPA is developed and tested on Unix-like operating systems, including Linux a

Regardless of the chosen method of installation, before installing WESTPA, we recommend you to first install the Python 3 version provided by the latest free `Anaconda Python distribution`_. After installing Anaconda, create a new python environment for the WESTPA install with the following::

conda create -n westpa-2.0 python=3.9
conda activate westpa-2.0
conda create -n westpa python=3.11
conda activate westpa

Then, we recommend installing WESTPA through conda or pip. Execute either of the following::

Expand All @@ -94,13 +94,13 @@ See the install instructions on our `wiki`_ for more detailed information.

To install from source (**not recommended**), start by downloading the corresponding tar.gz file from the `releases page`_. After downloading the file, unpack the file and install WESTPA by executing the following::

tar xvzf westpa-main.tar.gz
tar xvzf westpa-2022.09.tar.gz
cd westpa
python -m pip install -e .

.. _`releases page`: https://github.com/westpa/westpa/releases
.. _`Anaconda Python distribution`: https://www.anaconda.com/products/individual
.. _`wiki`: https://github.com/westpa/westpa/wiki/WESTPA-Quick-Install
.. _`Anaconda Python distribution`: https://www.anaconda.com/download
.. _`wiki`: https://github.com/westpa/westpa/wiki/Installing-WESTPA

---------------
Getting started
Expand Down
Loading