Skip to content

Conversation

@CSSFrancis
Copy link
Member

@CSSFrancis CSSFrancis commented Oct 9, 2024

Description of the change

Support numpy 2.0.0

Progress of the PR

  • Pass tests with numpy 2.0.0

For reviewers

  • The PR title is short, concise, and will make sense 1 year later.
  • New functions are imported in corresponding __init__.py.
  • New features, API changes, and deprecations are mentioned in the
    unreleased section in CHANGELOG.rst.
  • Contributor(s) are listed correctly in credits in diffsims/release_info.py and
    in .zenodo.json.

@CSSFrancis CSSFrancis requested a review from hakonanes October 9, 2024 14:51
@CSSFrancis
Copy link
Member Author

CSSFrancis commented Oct 9, 2024

@hakonanes If you want to review/merge this I can start the process of making a numpy 2.0.0 patch release.

@CSSFrancis CSSFrancis mentioned this pull request Oct 9, 2024
@CSSFrancis CSSFrancis requested a review from pc494 October 9, 2024 16:28

from diffsims.utils._deprecated import deprecated, deprecated_argument

if np.__version__ >= "2.0.0":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of repeating this three places, I suggest to add a private diffsims.constants module like we've done in orix: https://github.com/pyxem/orix/blob/develop/orix/constants.py. We can then import this warning from diffsims.constants import VisibleDeprecationWarning.

Copy link
Member

@hakonanes hakonanes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor suggestions. Not required for merging.

@hakonanes hakonanes added this to the v0.6.1 milestone Oct 9, 2024
@hakonanes hakonanes added the dev label Oct 9, 2024
@CSSFrancis CSSFrancis merged commit 6f19665 into pyxem:main Oct 11, 2024
12 checks passed
@CSSFrancis CSSFrancis deleted the numpy2 branch October 11, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants