Skip to content

Commit 87c1fb4

Browse files
committed
more lawyering
1 parent b4f02a8 commit 87c1fb4

File tree

4 files changed

+93
-1
lines changed

4 files changed

+93
-1
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2019, jupyter-lsp contributors
3+
Copyright (c) 2022, jupyter-lsp contributors
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

packages/theme-material/LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2022, jupyter-lsp contributors
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

packages/theme-vscode/LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2022, jupyter-lsp contributors
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

scripts/integrity.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
REQS = ROOT / "requirements"
4141
BINDER = ROOT / "binder"
4242
BINDER_ENV = BINDER / "environment.yml"
43+
LICENSE = ROOT / "LICENSE"
4344

4445
# docs
4546
MAIN_README = ROOT / "README.md"
@@ -64,6 +65,7 @@
6465
PY_PATH = ROOT / "python_packages"
6566
PY_SERVER_PATH = PY_PATH / "jupyter_lsp"
6667
PY_FRONT_PATH = PY_PATH / "jupyterlab_lsp"
68+
PY_PACKAGES = [PY_SERVER_PATH, PY_FRONT_PATH]
6769

6870
# py stuff
6971
PY_SERVER_NAME = "jupyter-lsp"
@@ -106,6 +108,15 @@ def the_binder_env():
106108
return yaml.safe_load(BINDER_ENV.read_text(encoding="utf-8"))
107109

108110

111+
@pytest.fixture(scope="module")
112+
def the_license_header():
113+
return [
114+
line
115+
for line in LICENSE.read_text(encoding="utf-8").splitlines()
116+
if line.startswith("Copyright")
117+
][0]
118+
119+
109120
@pytest.fixture(scope="module")
110121
def the_installation_notebook():
111122
"""executes and loads up the installation notebook"""
@@ -259,6 +270,29 @@ def test_install_requires(pkg, requirement: str, version: str, has_specifier: bo
259270
)
260271

261272

273+
@pytest.mark.parametrize(
274+
"name,path_info", [p for p in PACKAGES.items() if p[0] != META_NAME]
275+
)
276+
def test_js_license(name, path_info, the_license_header):
277+
path, info = path_info
278+
license = path / "LICENSE"
279+
assert license.exists(), f"ensure {license} exists"
280+
license_text = license.read_text(encoding="utf-8")
281+
assert the_license_header in license_text, f"add {the_license_header} in {license}"
282+
assert "LICENSE" in info["files"], f"{path}/package.json needs LICENSE in files"
283+
284+
285+
@pytest.mark.parametrize("path", PY_PACKAGES)
286+
def test_py_license(path, the_license_header):
287+
license = path / "LICENSE"
288+
assert license.exists(), f"ensure {license} exists"
289+
license_text = license.read_text(encoding="utf-8")
290+
assert the_license_header in license_text
291+
manifest = path / "MANIFEST.in"
292+
manifest_text = manifest.read_text(encoding="utf-8")
293+
assert license.name in manifest_text
294+
295+
262296
def check_integrity():
263297
"""actually run the tests"""
264298
args = ["-vv", __file__]

0 commit comments

Comments
 (0)