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

Code style cleanup #334

Merged
merged 64 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
5e94757
added public functions to `__all__`
jo-mueller Oct 13, 2023
440b409
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 13, 2023
cf0ffc7
removed deprecated code
jo-mueller Oct 13, 2023
b42af78
Merge branch 'add-__all__-to-inits' of https://github.com/jo-mueller/…
jo-mueller Oct 13, 2023
c24d548
removed main from test
jo-mueller Oct 13, 2023
011052e
removed out-of-place comments
jo-mueller Oct 13, 2023
7ce0dfe
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 13, 2023
37de1a6
changed ambiguous variable name
jo-mueller Oct 13, 2023
b322145
used string napari type imports
jo-mueller Oct 13, 2023
72c989f
Merge branch 'add-__all__-to-inits' of https://github.com/jo-mueller/…
jo-mueller Oct 13, 2023
fada4b8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 13, 2023
aa068b4
rempoved unused import
jo-mueller Oct 13, 2023
4845c3a
shorter variable names
jo-mueller Oct 13, 2023
c2d433d
Merge branch 'add-__all__-to-inits' of https://github.com/jo-mueller/…
jo-mueller Oct 13, 2023
927e441
added LayerDataTuple alias to allowed conversions
jo-mueller Oct 13, 2023
c5b7bda
removed unused imports
jo-mueller Oct 13, 2023
1cd595c
codestyle
jo-mueller Oct 13, 2023
db4fb94
fixed code styles
jo-mueller Oct 19, 2023
5b449f3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
9224a25
updated changed function name
jo-mueller Oct 19, 2023
b844910
Merge branch 'add-__all__-to-inits' of https://github.com/jo-mueller/…
jo-mueller Oct 19, 2023
79f0ab6
fixed imports and removed unused function
jo-mueller Oct 19, 2023
1389bd9
fixed comparisons to True
jo-mueller Oct 19, 2023
f1e3bc3
removed unused variables
jo-mueller Oct 19, 2023
520bf60
line breaks
jo-mueller Oct 19, 2023
3ca8580
fixed euler number usage
jo-mueller Oct 19, 2023
5e195ab
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
6652f4e
fixed ambiguous imports
jo-mueller Oct 19, 2023
50a2b8d
Merge branch 'add-__all__-to-inits' of https://github.com/jo-mueller/…
jo-mueller Oct 19, 2023
1a6dd0a
fixed imports and unused variables
jo-mueller Oct 19, 2023
76062fe
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
1f40657
code style improvements
jo-mueller Oct 19, 2023
0ba58d6
Merge branch 'add-__all__-to-inits' of https://github.com/jo-mueller/…
jo-mueller Oct 19, 2023
7f4cfae
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
5ca53de
removed ambiguous import
jo-mueller Oct 19, 2023
2a67c89
fixed ambiguous imports
jo-mueller Oct 19, 2023
b1fbb77
Merge branch 'add-__all__-to-inits' of https://github.com/jo-mueller/…
jo-mueller Oct 19, 2023
4f33704
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
1ded416
fixed codestyle
jo-mueller Oct 19, 2023
42a6ab9
Merge branch 'add-__all__-to-inits' of https://github.com/jo-mueller/…
jo-mueller Oct 19, 2023
46bf464
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
2870d48
added missing import
jo-mueller Oct 19, 2023
ae3fb1e
fixed function arguments
jo-mueller Oct 19, 2023
9564a46
Merge branch 'add-__all__-to-inits' of https://github.com/jo-mueller/…
jo-mueller Oct 19, 2023
a2f4bda
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
7e898d4
fixed code style in tests and elsewhere
jo-mueller Oct 19, 2023
6080eb6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
3a5afbb
fixed code style
jo-mueller Oct 19, 2023
f481a5f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
db26803
used qt compatible library in docs requirements
jo-mueller Oct 19, 2023
d76b023
Merge branch 'add-__all__-to-inits' of https://github.com/jo-mueller/…
jo-mueller Oct 19, 2023
0890762
added escape for napari not found error
jo-mueller Oct 19, 2023
58b670d
configure ruff to ignore `Undefined name `napari``
jo-mueller Oct 19, 2023
9e94130
fixed line length
jo-mueller Oct 19, 2023
f2327eb
fixed code style
jo-mueller Oct 19, 2023
e792b74
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
3b82006
fixed import trick
jo-mueller Oct 19, 2023
fe07c68
Merge branch 'add-__all__-to-inits' of https://github.com/jo-mueller/…
jo-mueller Oct 19, 2023
59a0063
fixed tests
jo-mueller Oct 19, 2023
b7fd81b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
57d44c9
fix tests
jo-mueller Oct 19, 2023
6b3258c
fixed tests
jo-mueller Oct 19, 2023
2c00822
fixed tests
jo-mueller Oct 19, 2023
d858555
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 19, 2023
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 docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jupyter-book>=0.7.0b
napari
PyQt5
qtpy
napari-stress
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[tool.ruff]
ignore = ["F821"]

[tool.ruff.per-file-ignores]
"_napari_plugin.py" = ["F401"]
29 changes: 29 additions & 0 deletions src/napari_stress/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,32 @@

from . import types
from . import _vectors as vectors

__all__ = [
"__version__",
"measurements",
"approximation",
"reconstruction",
"sample_data",
"plotting",
"utils",
"stress_backend",
"rescale",
"smooth_sinc",
"smoothMLS2D",
"reconstruct_surface",
"decimate",
"extract_vertex_points",
"fit_ellipsoid_to_pointcloud_points",
"fit_ellipsoid_to_pointcloud_vectors",
"TimelapseConverter",
"frame_by_frame",
"fit_spherical_harmonics",
"lebedev_quadrature",
"create_manifold",
"get_droplet_point_cloud",
"get_droplet_point_cloud_4d",
"get_droplet_4d",
"types",
"vectors",
]
6 changes: 6 additions & 0 deletions src/napari_stress/_approximation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@
expand_points_on_ellipse,
normals_on_ellipsoid,
)

__all__ = [
"least_squares_ellipsoid",
"expand_points_on_ellipse",
"normals_on_ellipsoid",
]
4 changes: 2 additions & 2 deletions src/napari_stress/_approximation/fit_ellipsoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ def normals_on_ellipsoid(points: PointsData) -> VectorsData:
F = coefficients.flatten()[5]
G = coefficients.flatten()[6]
H = coefficients.flatten()[7]
I = coefficients.flatten()[8]
J = coefficients.flatten()[8]

xx = points[:, 0][:, None]
yy = points[:, 1][:, None]
zz = points[:, 2][:, None]

grad_F_x = 2.0 * A * xx + D * yy + E * zz + G
grad_F_y = 2.0 * B * yy + D * xx + F * zz + H
grad_F_z = 2.0 * C * zz + E * xx + F * yy + I
grad_F_z = 2.0 * C * zz + E * xx + F * yy + J

grad_F_X = np.hstack((grad_F_x, grad_F_y, grad_F_z))
Vec_Norms = np.sqrt(np.sum(np.multiply(grad_F_X, grad_F_X), axis=1)).reshape(
Expand Down
Loading
Loading