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

[pre-commit.ci] pre-commit autoupdate #236

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/psf/black
# Version can be updated by running "pre-commit autoupdate"
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
ci:
Expand Down
2 changes: 1 addition & 1 deletion diffsims/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def add_reciprocal_lattice_vector_al(doctest_namespace):
doctest_namespace["rlv"] = rlv


@pytest.fixture(params=[("file_01")])
@pytest.fixture(params=["file_01"])
def pickle_temp_file(tmpdir, request):
name = request.param
fname = tmpdir.join(name + ".pickle")
Expand Down
3 changes: 1 addition & 2 deletions diffsims/generators/library_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with diffsims. If not, see <http://www.gnu.org/licenses/>.

"""Diffraction pattern library generator and associated tools.
"""
"""Diffraction pattern library generator and associated tools."""

import numpy as np
from tqdm import tqdm
Expand Down
2 changes: 1 addition & 1 deletion diffsims/tests/generators/test_diffraction_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from diffsims.utils.shape_factor_models import linear, binary, sin2c, atanc, lorentzian


@pytest.fixture(params=[(300)])
@pytest.fixture(params=[300])
def diffraction_calculator(request):
return DiffractionGenerator(request.param)

Expand Down
2 changes: 1 addition & 1 deletion diffsims/tests/generators/test_simulation_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
FILE1 = TEST_DATA_DIR / "old_simulation.npy"


@pytest.fixture(params=[(300)])
@pytest.fixture(params=[300])
def diffraction_calculator(request):
return SimulationGenerator(request.param)

Expand Down
96 changes: 46 additions & 50 deletions diffsims/tests/utils/test_ring_pattern_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,62 +35,58 @@ def input_parameters():
@pytest.mark.parametrize(
"known_values",
[
(
np.array(
[
124.05909278,
25.85258647,
39.09906246,
173.75469207,
79.48046629,
533.72925614,
36.23521052,
29.58603406,
21.83270633,
75.89239623,
40.04732689,
14.52041808,
35.82637996,
75.33666451,
21.21751965,
38.97731538,
19.64631964,
161.72783637,
23.6894442,
282.3126376,
]
)
np.array(
[
124.05909278,
25.85258647,
39.09906246,
173.75469207,
79.48046629,
533.72925614,
36.23521052,
29.58603406,
21.83270633,
75.89239623,
40.04732689,
14.52041808,
35.82637996,
75.33666451,
21.21751965,
38.97731538,
19.64631964,
161.72783637,
23.6894442,
282.3126376,
]
)
],
)
@pytest.mark.parametrize(
"reference_indices",
[
(
np.array(
[
[205, 158],
[197, 1],
[105, 239],
[64, 148],
[61, 84],
[136, 155],
[37, 85],
[21, 94],
[247, 31],
[171, 195],
[202, 39],
[225, 255],
[233, 128],
[56, 107],
[22, 51],
[28, 119],
[20, 45],
[164, 65],
[235, 188],
[75, 186],
]
)
np.array(
[
[205, 158],
[197, 1],
[105, 239],
[64, 148],
[61, 84],
[136, 155],
[37, 85],
[21, 94],
[247, 31],
[171, 195],
[202, 39],
[225, 255],
[233, 128],
[56, 107],
[22, 51],
[28, 119],
[20, 45],
[164, 65],
[235, 188],
[75, 186],
]
)
],
)
Expand Down
3 changes: 1 addition & 2 deletions diffsims/utils/atomic_diffraction_generator_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with diffsims. If not, see <http://www.gnu.org/licenses/>.

"""Back-end for computing diffraction patterns with a kinematic model.
"""
"""Back-end for computing diffraction patterns with a kinematic model."""

from numpy import array, pi, sin, cos, empty
from scipy.interpolate import interpn
Expand Down
Loading