Skip to content

Commit 80e8806

Browse files
committed
license fix
1 parent 51e05ba commit 80e8806

File tree

6 files changed

+35
-41
lines changed

6 files changed

+35
-41
lines changed

LICENSE

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
HTTomoLibGPU is dual licenced under the Apache V2 and GPL V3 licences both of
2-
which appear bellow. The following section from the apache website
3-
details the compatability of ApacheV2 with GPLV3 and explains the
1+
HTTomoLibGPU is dual licenced under the Apache V2 and GPL V3 licences both of
2+
which appear below. The following section from the apache website
3+
details the compatibility of ApacheV2 with GPLV3 and explains the
44
requirement for the dual licence.
55

66

77
From http://www.apache.org/licenses/GPL-compatibility.html
88

9-
The Free Software Foundation considers the Apache License, Version
9+
The Free Software Foundation considers the Apache License, Version
1010
2.0 to be a free software license, compatible with version 3 of the GPL.
11-
The Software Freedom Law Center provides practical advice for developers
11+
The Software Freedom Law Center provides practical advice for developers
1212
about including permissively licensed source.
1313

14-
Apache 2 software can therefore be included in GPLv3 projects, because
15-
the GPLv3 license accepts our software into GPLv3 works. However, GPLv3
16-
software cannot be included in Apache projects. The licenses are incompatible
17-
in one direction only, and it is a result of ASF's licensing philosophy and
14+
Apache 2 software can therefore be included in GPLv3 projects, because
15+
the GPLv3 license accepts our software into GPLv3 works. However, GPLv3
16+
software cannot be included in Apache projects. The licenses are incompatible
17+
in one direction only, and it is a result of ASF's licensing philosophy and
1818
the GPLv3 authors' interpretation of copyright law.
1919

20-
This licensing incompatibility applies only when some Apache project software
21-
becomes a derivative work of some GPLv3 software, because then the Apache
22-
software would have to be distributed under GPLv3. This would be incompatible
23-
with ASF's requirement that all Apache software must be distributed under the
20+
This licensing incompatibility applies only when some Apache project software
21+
becomes a derivative work of some GPLv3 software, because then the Apache
22+
software would have to be distributed under GPLv3. This would be incompatible
23+
with ASF's requirement that all Apache software must be distributed under the
2424
Apache License 2.0.
2525

26-
We avoid GPLv3 software because merely linking to it is considered by the GPLv3
27-
authors to create a derivative work. We want to honor their license. Unless GPLv3
28-
licensors relax this interpretation of their own license regarding linking, our
29-
licensing philosophies are fundamentally incompatible. This is an identical issue
26+
We avoid GPLv3 software because merely linking to it is considered by the GPLv3
27+
authors to create a derivative work. We want to honor their license. Unless GPLv3
28+
licensors relax this interpretation of their own license regarding linking, our
29+
licensing philosophies are fundamentally incompatible. This is an identical issue
3030
for both GPLv2 and GPLv3.
3131

3232

@@ -36,9 +36,9 @@ for both GPLv2 and GPLv3.
3636
HTTomoLibGPU makes use of some GPLv3 libraries in the following packages:
3737
ToMoBAR (depends on ASTRA-Toolbox)
3838

39-
If your use of the code makes use of these imports, then the software is licenced under
39+
If your use of the code makes use of these imports, then the software is licenced under
4040
GPLV3 as required by the licence. However if you do not use or redistribute the plugins
41-
containing these imports, the software may be considered licenced under the Apache V2
41+
containing these imports, the software may be considered licenced under the Apache V2
4242
licence, Specifically all of the core functionality of HTTomoLibGPU.
4343

4444
Both licences now follow.

docs/source/conf.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@
3232
for mod_name in MOCK_MODULES:
3333
sys.modules[mod_name] = mock.Mock()
3434

35+
3536
class CustomMock(mock.Mock):
3637
def __repr__(self):
3738
return "<cp.ndarray>"
3839

40+
3941
sys.modules["cupy"] = CustomMock()
4042
sys.modules["numpy"] = CustomMock()
4143

@@ -95,14 +97,6 @@ def __repr__(self):
9597
html_static_path = ["_static"]
9698
html_use_smartypants = True
9799

98-
"""
99-
html_theme_options = {
100-
"logo_only": True,
101-
"display_version": False,
102-
"githuburl": "https://github.com/DiamondLightSource/httomolibgpu",
103-
}
104-
"""
105-
106100
html_theme_options = {
107101
"show_toc_level": 1,
108102
"navbar_align": "left", # [left, content, right] For testing that the navbar items align properly

docs/source/scripts/methods_to_generate_images.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def run_methods(path_to_data: str, output_folder: str) -> int:
118118
cp.asarray(proj_raw), cp.asarray(flats), cp.asarray(darks), minus_log=True
119119
)
120120
data_normalized_np = data_normalized.get()
121-
121+
122122
max_scale_data_normalized = np.max(data_normalized_np)
123123
min_scale_data_normalized = np.min(data_normalized_np)
124124
assert max_scale_data_normalized > 1.062
@@ -168,7 +168,7 @@ def run_methods(path_to_data: str, output_folder: str) -> int:
168168
slice_numb=slice_numb,
169169
)
170170
del res_cp, res_np, proj_raw_mod
171-
171+
172172
## %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
173173
methods_name = "median_filter"
174174
print("___{}___".format(methods_name))
@@ -182,7 +182,7 @@ def run_methods(path_to_data: str, output_folder: str) -> int:
182182
axis=None,
183183
)
184184
res_np = res_cp.get()
185-
185+
186186
__save_res_to_image(
187187
res_np,
188188
output_folder,
@@ -197,9 +197,9 @@ def run_methods(path_to_data: str, output_folder: str) -> int:
197197
methods_name=methods_name + "_res",
198198
slice_numb=slice_numb,
199199
max_scale=0.05,
200-
min_scale=0,
200+
min_scale=0,
201201
)
202-
del res_cp, res_np
202+
del res_cp, res_np
203203

204204
return 0
205205

httomolibgpu/misc/corr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def median_filter(
4545
dif: float = 0.0,
4646
) -> cp.ndarray:
4747
"""
48-
Apply 3D median filter to a 3D CuPy array. For more detailed information, see :ref:`method_median_filter`.
48+
Applies 3D median filter to a 3D CuPy array. For more detailed information, see :ref:`method_median_filter`.
4949
5050
Parameters
5151
----------

httomolibgpu/misc/morph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
nvtx = cupywrapper.nvtx
2929
from typing import Literal
3030

31+
from cupyx.scipy.interpolate import interpn
32+
3133
__all__ = [
3234
"sino_360_to_180",
3335
"data_resampler",
@@ -135,8 +137,6 @@ def data_resampler(
135137
def __data_resampler(
136138
data: cp.ndarray, newshape: list, axis: int = 1, interpolation: str = "linear"
137139
) -> cp.ndarray:
138-
from cupyx.scipy.interpolate import interpn
139-
140140
if data.ndim != 3:
141141
raise ValueError("only 3D data is supported")
142142

tests/test_misc/test_morph.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
from httomolibgpu.misc.morph import sino_360_to_180, data_resampler
88

99

10-
1110
@pytest.mark.parametrize("rotation", ["left", "right"])
1211
def test_sino_360_to_180_realdata(ensure_clean_memory, sino3600, rotation):
1312
shape_new = (3601, 3, 2560)
1413
data3d = cp.zeros(shape_new, dtype=np.float32)
15-
data3d[:,0,:] = sino3600
16-
data3d[:,1,:] = sino3600
17-
data3d[:,2,:] = sino3600
14+
data3d[:, 0, :] = sino3600
15+
data3d[:, 1, :] = sino3600
16+
data3d[:, 2, :] = sino3600
1817

1918
sino_360_to_180(data3d, overlap=900, rotation=rotation)
20-
19+
2120
assert data3d.shape == shape_new
2221
assert data3d.dtype == np.float32
23-
assert data3d.flags.c_contiguous
22+
assert data3d.flags.c_contiguous
23+
2424

2525
@pytest.mark.parametrize(
2626
"overlap, rotation",

0 commit comments

Comments
 (0)