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

Remove the deprecated reciprocal lattice point class #213

Conversation

hakonanes
Copy link
Member

@hakonanes hakonanes commented May 9, 2024

Description of the change

Removes the deprecated diffsims.crystallography.ReciprocalLatticePoint class, which was deprecated in June 2022. Closes #189.

Three methods in the public API for generating sets of {hkl} were not deprecated. These have improved replacements in the "new" ReciprocalLatticeVector class:

  • get_hkl() -> from_highest_hkl()
  • get_highest_hkl() -> from_min_dspacing()
  • get_equivalent_hkl() -> symmetrise()

These functions should be deprecated and the user "new" methods. This can be done with the deprecation tools from #199, which should be merged before this PR.

Progress of the PR

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.

@hakonanes hakonanes added the deprecation Deprecated functionality label May 9, 2024
@hakonanes hakonanes added this to the v0.6.0 milestone May 9, 2024
@hakonanes hakonanes mentioned this pull request May 9, 2024
7 tasks
@hakonanes hakonanes requested a review from CSSFrancis May 9, 2024 13:54
Copy link
Member

@CSSFrancis CSSFrancis left a comment

Choose a reason for hiding this comment

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

@hakonanes Looks good. Some comments on adding extra infromation a couple of places while we are changing this code.

It might be worth adding information about the manifest and manifix to the developer guide if you think it is worth it but that can wait.

MANIFEST.in Outdated
@@ -1,3 +1,5 @@
# https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html
Copy link
Member

@CSSFrancis CSSFrancis May 9, 2024

Choose a reason for hiding this comment

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

Add a comment something along the lines of:

# For more information on managing files in pacakge 

Copy link
Member Author

Choose a reason for hiding this comment

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

The links now have a description.

diffsims/crystallography/get_hkl.py Show resolved Hide resolved
Comment on lines 26 to 30
"""Return the highest Miller indices hkl of the plane with a direct
space interplanar spacing greater than but closest to a lower
threshold.

Parameters
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"""Return the highest Miller indices hkl of the plane with a direct
space interplanar spacing greater than but closest to a lower
threshold.
Parameters
"""Return the highest Miller indices hkl of the plane with a direct
space interplanar spacing(d-spacing) greater than but closest to the ``min_dspacing``.
Parameters

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I've added "(d-spacing)" and referred to the variable name (in italics instead of code-style, as used by NumPy).

@CSSFrancis CSSFrancis mentioned this pull request May 9, 2024
16 tasks
@hakonanes hakonanes force-pushed the 189-remove-reciprocal-lattice-point-class branch 3 times, most recently from 20de09d to 8268bdc Compare May 9, 2024 15:53
@hakonanes hakonanes force-pushed the 189-remove-reciprocal-lattice-point-class branch from ac91c00 to d7b63b9 Compare May 9, 2024 16:03
@hakonanes
Copy link
Member Author

I thought I'd resolved merge conflicts locally, but alas. I believe the issue relates to a small change you made in the reciprocal_lattice_point.py file, @CSSFrancis (6a7ac0b), which I here delete. I'll make a new branch and PR.

@hakonanes
Copy link
Member Author

I take that back, I don't really know what exactly caused the conflict (the addition of the deprecation decorators were e.g. taken as changes in this PR rather than coming from the main branch).

@hakonanes hakonanes deleted the 189-remove-reciprocal-lattice-point-class branch May 9, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Deprecated functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecations to be removed in version 0.6
2 participants