Skip to content

Commit 870d632

Browse files
authored
Merge pull request #216 from hakonanes/prep-for-0.6.0-release
Prepare for 0.6rc1 release
2 parents cc8b0a7 + 5bbd6f2 commit 870d632

File tree

82 files changed

+286
-244
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+286
-244
lines changed

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Test files
2-
file_01.pickle
3-
41
# Byte-compiled / optimized / DLL files
52
__pycache__/
63
*.py[cod]

.zenodo.json

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
"orcid": "0000-0002-1213-2911",
1313
"affiliation": "Norwegian University of Science and Technology"
1414
},
15+
{
16+
"name":"Carter Francis",
17+
"orcid": "0000-0003-2564-1851",
18+
"affiliation": "University of Wisconsin Madison"
19+
},
1520
{
1621
"name":"Eric Prestat"
1722
},

CHANGELOG.rst

+10-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0>`_
77
this project tries its best to adhere to
88
`Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.
99

10-
Unreleased
11-
==========
10+
2024-05-12 - version 0.6.0
11+
==========================
1212

1313
Added
1414
-----
1515
- Explicit support for Python 3.11.
1616
- Added Pre-Commit for code formatting.
17-
- Added deprecation tools for deprecating functions, parameters, methods, and properties.
17+
- Added deprecation tools for deprecating functions, parameters, methods, and
18+
properties.
1819

1920
Changed
2021
-------
@@ -23,16 +24,19 @@ Changed
2324

2425
Deprecated
2526
----------
27+
- ``get_hkl()``, ``get_highest_hkl()``, and ``get_equivalent_hkl()`` methods in the
28+
crystallography module. Please use the following corresponding methods in the
29+
``ReciprocalLatticeVector`` class instead: ``from_highest_hkl()``,
30+
``from_min_dspacing()``, and ``symmetrise()``.
2631

2732
Removed
2833
-------
2934
- Removed support for Python 3.6 and Python 3.7, leaving 3.8 as the oldest supported
3035
version.
3136
- ``ReciprocalLatticePoint`` class; Use the ``ReciprocalLatticeVector`` class instead,
3237
which is an improved replacement.
33-
34-
Fixed
35-
-----
38+
- ``StructureLibrary.from_crystal_systems()`` class method, which previously raised a
39+
``NotImplementedError``, but now will throw an ``AttributeError`` instead.
3640

3741
2023-05-22 - version 0.5.2
3842
==========================

README.rst

+78-18
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,89 @@
1-
|build_status|_ |Coveralls|_ |docs|_ |pypi_version|_ |black|_ |doi|_
1+
diffsims is an open-source Python library for simulating diffraction.
2+
3+
The package is released under the GPL v3 license.
4+
5+
.. |pypi_version| image:: https://img.shields.io/pypi/v/diffsims.svg?style=flat
6+
:target: https://pypi.python.org/pypi/diffsims
7+
8+
.. |conda| image:: https://img.shields.io/conda/vn/conda-forge/diffsims.svg?logo=conda-forge&logoColor=white
9+
:target: https://anaconda.org/conda-forge/diffsims
210

311
.. |build_status| image:: https://github.com/pyxem/diffsims/workflows/build/badge.svg
4-
.. _build_status: https://github.com/pyxem/diffsims/actions
12+
:target: https://github.com/pyxem/diffsims/actions/workflows/build.yml
513

6-
.. |Coveralls| image:: https://coveralls.io/repos/github/pyxem/diffsims/badge.svg?branch=master
7-
.. _Coveralls: https://coveralls.io/github/pyxem/diffsims?branch=master
14+
.. |python| image:: https://img.shields.io/badge/python-3.8+-blue.svg
15+
:target: https://www.python.org/downloads/
816

9-
.. |docs| image:: https://readthedocs.org/projects/diffsims/badge/?version=latest
10-
.. _docs: https://diffsims.readthedocs.io/en/latest
17+
.. |Coveralls| image:: https://coveralls.io/repos/github/pyxem/diffsims/badge.svg?branch=main
18+
:target: https://coveralls.io/github/pyxem/diffsims?branch=main
1119

12-
.. |pypi_version| image:: https://img.shields.io/pypi/v/diffsims.svg?style=flat
13-
.. _pypi_version: https://pypi.org/project/diffsims/
20+
.. |pypi_downloads| image:: https://img.shields.io/pypi/dm/diffsims.svg?label=PyPI%20downloads
21+
:target: https://pypi.org/project/diffsims/
1422

15-
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
16-
.. _black: https://github.com/psf/black
23+
.. |conda_downloads| image:: https://img.shields.io/conda/dn/conda-forge/diffsims.svg?label=Conda%20downloads
24+
:target: https://anaconda.org/conda-forge/diffsims
1725

1826
.. |doi| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3337900.svg
19-
.. _doi: https://doi.org/10.5281/zenodo.3337900
27+
:target: https://doi.org/10.5281/zenodo.3337900
2028

21-
diffsims is an open-source Python library for simulating diffraction.
29+
.. |GPLv3| image:: https://img.shields.io/github/license/pyxem/diffsims
30+
:target: https://opensource.org/license/GPL-3.0
2231

23-
If simulations performed using diffsims form a part of published work please
24-
cite the DOI at the top of this page. You can find demos in the `diffsims-demos
25-
<https://github.com/pyxem/diffsims-demos>`_ repository. See the `documentation
26-
<https://diffsims.readthedocs.io/en/latest/>`_ for installation instructions, the API
27-
reference, the changelog and more.
32+
.. |GH-issues| image:: https://img.shields.io/badge/GitHub-Issues-green?logo=github
33+
:target: https://github.com/pyxem/diffsims/issues
34+
35+
.. |docs| image:: https://readthedocs.org/projects/diffsims/badge/?version=latest
36+
:target: https://diffsims.readthedocs.io/en/latest
37+
38+
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
39+
:target: https://github.com/psf/black
40+
41+
+----------------------+------------------------------------------------+
42+
| Deployment | |pypi_version| |conda| |
43+
+----------------------+------------------------------------------------+
44+
| Build status | |build_status| |docs| |python| |
45+
+----------------------+------------------------------------------------+
46+
| Metrics | |Coveralls| |
47+
+----------------------+------------------------------------------------+
48+
| Activity | |pypi_downloads| |conda_downloads| |
49+
+----------------------+------------------------------------------------+
50+
| Citation | |doi| |
51+
+----------------------+------------------------------------------------+
52+
| License | |GPLv3| |
53+
+----------------------+------------------------------------------------+
54+
| Community | |GH-issues| |
55+
+----------------------+------------------------------------------------+
56+
| Formatter | |black| |
57+
+----------------------+------------------------------------------------+
58+
59+
Documentation
60+
-------------
61+
62+
Refer to the `documentation <https://diffsims.readthedocs.io>`__ for detailed
63+
installation instructions, a user guide, a technical (API) reference, and the `changelog
64+
<https://diffsims.readthedocs.io/en/latest/changelog.html>`_.
65+
66+
Installation
67+
------------
68+
69+
diffsims can be installed with ``pip``::
70+
71+
pip install diffsims
2872

29-
diffsims is released under the GPL v3 license.
73+
or ``conda``::
74+
75+
conda install diffsims -c conda-forge
76+
77+
The source code is hosted in `GitHub <https://github.com/pyxem/diffsims>`_, and can also
78+
be downloaded from `PyPI <https://pypi.org/project/diffsims>`_ and
79+
`Anaconda <https://anaconda.org/conda-forge/diffsims>`_.
80+
81+
Further details are available in the
82+
`installation guide
83+
<https://diffsims.readthedocs.io/en/latest/user/installation.html>`_.
84+
85+
Citing diffsims
86+
---------------
87+
88+
If simulations performed using diffsims form a part of published work please
89+
cite the DOI at the top of this page.

diffsims/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/conftest.py

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#
@@ -17,16 +17,21 @@
1717
# along with diffsims. If not, see <http://www.gnu.org/licenses/>.
1818

1919
from diffpy.structure import Atom, Lattice, Structure
20+
import matplotlib.pyplot as plt
2021
from orix.crystal_map import Phase
2122
import pytest
2223

2324
from diffsims.crystallography import ReciprocalLatticeVector
2425
from diffsims.generators.diffraction_generator import DiffractionGenerator
2526

2627

28+
def pytest_sessionstart(session):
29+
plt.rcParams["backend"] = "agg"
30+
31+
2732
@pytest.fixture
2833
def default_structure():
29-
"""An atomic structure represented using diffpy"""
34+
"""An atomic structure represented using diffpy."""
3035
latt = Lattice(3, 3, 5, 90, 90, 120)
3136
atom = Atom(atype="Ni", xyz=[0, 0, 0], lattice=latt)
3237
hexagonal_structure = Structure(atoms=[atom], lattice=latt)
@@ -109,3 +114,10 @@ def add_reciprocal_lattice_vector_al(doctest_namespace):
109114
)
110115
rlv = ReciprocalLatticeVector(phase, hkl=[[1, 1, 1], [2, 0, 0]])
111116
doctest_namespace["rlv"] = rlv
117+
118+
119+
@pytest.fixture(params=[("file_01")])
120+
def pickle_temp_file(tmpdir, request):
121+
name = request.param
122+
fname = tmpdir.join(name + ".pickle")
123+
yield fname

diffsims/crystallography/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/crystallography/get_hkl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/crystallography/reciprocal_lattice_vector.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/generators/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/generators/diffraction_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/generators/library_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/generators/rotation_list_generators.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#
@@ -22,7 +22,6 @@
2222

2323
from orix.sampling.sample_generators import get_sample_fundamental, get_sample_local
2424
from orix.quaternion.rotation import Rotation
25-
from orix.vector.neo_euler import AxAngle
2625

2726
from diffsims.utils.sim_utils import uvtw_to_uvw
2827
from diffsims.generators.sphere_mesh_generators import (
@@ -168,7 +167,7 @@ def get_grid_around_beam_direction(beam_rotation, resolution, angular_range=(0,
168167
np.arange(start=angular_range[0], stop=angular_range[1], step=resolution)
169168
)
170169
axes = np.repeat([[0, 0, 1]], angles.shape[0], axis=0)
171-
in_plane_rotation = Rotation.from_neo_euler(AxAngle.from_axes_angles(axes, angles))
170+
in_plane_rotation = Rotation.from_axes_angles(axes, angles)
172171

173172
orix_grid = beam_rotation * in_plane_rotation
174173
rotation_list = get_list_from_orix(orix_grid, rounding=2)

diffsims/generators/sphere_mesh_generators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/generators/zap_map_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/libraries/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/libraries/diffraction_library.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/libraries/structure_library.py

+1-31
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#
@@ -81,36 +81,6 @@ def from_orientation_lists(cls, identifiers, structures, orientations):
8181
"""
8282
return cls(identifiers, structures, orientations)
8383

84-
@classmethod
85-
def from_crystal_systems(
86-
cls, identifiers, structures, systems, resolution, equal="angle"
87-
):
88-
"""
89-
Creates a structure library from crystal system derived orientation lists
90-
91-
Parameters
92-
----------
93-
identifiers : list of strings/ints
94-
A list of phase identifiers referring to different atomic structures.
95-
structures : list of diffpy.structure.Structure objects.
96-
A list of diffpy.structure.Structure objects describing the atomic
97-
structure associated with each phase in the library.
98-
systems : list
99-
A list over indentifiers of crystal systems
100-
resolution : float
101-
resolution in degrees
102-
equal : str
103-
Default is 'angle'
104-
105-
Raises
106-
------
107-
NotImplementedError:
108-
"This function has been removed in version 0.3.0, in favour of creation from orientation lists"
109-
"""
110-
raise NotImplementedError(
111-
"This function has been removed in version 0.3.0, in favour of creation from orientation lists"
112-
)
113-
11484
def get_library_size(self, to_print=False):
11585
"""
11686
Returns the the total number of orientations in the

diffsims/libraries/vector_library.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/pattern/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/pattern/detector_functions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2017-2023 The diffsims developers
2+
# Copyright 2017-2024 The diffsims developers
33
#
44
# This file is part of diffsims.
55
#

diffsims/release_info.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name = "diffsims"
2-
version = "0.6.dev0"
2+
version = "0.6rc1"
33
author = "Duncan Johnstone, Phillip Crout"
4-
copyright = "Copyright 2017-2023, The diffsims developers"
4+
copyright = "Copyright 2017-2024, The diffsims developers"
55
# Initial committer first, then listed by line additions
66
credits = [
77
"Duncan Johnstone",
88
"Phillip Crout",
99
"Håkon Wiik Ånes",
10+
"Carter Francis",
1011
"Eric Prestat",
1112
"Rob Tovey",
1213
"Simon Høgås",
@@ -25,6 +26,6 @@
2526
"Eirik Opheim",
2627
]
2728
license = "GPLv3+"
28-
maintainer = "Duncan Johnstone, Phillip Crout, Håkon Wiik Ånes"
29+
maintainer = "Duncan Johnstone, Phillip Crout, Håkon Wiik Ånes, Carter Francis"
2930
email = "pyxem.team@gmail.com"
3031
status = "Development"

0 commit comments

Comments
 (0)