Skip to content

Commit 46de74b

Browse files
authored
Merge pull request #78 from TrueLearnAI/chore
chore: maintenance
2 parents c5c86b5 + 0f20c08 commit 46de74b

File tree

5 files changed

+44
-49
lines changed

5 files changed

+44
-49
lines changed

LICENSE

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -19,41 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22-
23-
---
24-
25-
Some of TrueLearn's functionality is derived from externally maintained libraries,
26-
including:
27-
28-
- scikit-learn, licensed as follows:
29-
"""
30-
BSD 3-Clause License
31-
32-
Copyright (c) 2007-2022 The scikit-learn developers.
33-
All rights reserved.
34-
35-
Redistribution and use in source and binary forms, with or without
36-
modification, are permitted provided that the following conditions are met:
37-
38-
* Redistributions of source code must retain the above copyright notice, this
39-
list of conditions and the following disclaimer.
40-
41-
* Redistributions in binary form must reproduce the above copyright notice,
42-
this list of conditions and the following disclaimer in the documentation
43-
and/or other materials provided with the distribution.
44-
45-
* Neither the name of the copyright holder nor the names of its
46-
contributors may be used to endorse or promote products derived from
47-
this software without specific prior written permission.
48-
49-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
50-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
51-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
52-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
53-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
55-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
56-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
57-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
58-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
59-
"""

LICENSE-3RD-PARTY

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

pyproject.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,21 @@ dependencies = [
5151
'typing-extensions>=4.4.0',
5252
'trueskill>=0.4.5',
5353
'scikit-learn>=1.0.2',
54-
'orjson>=3.8.6',
5554
'mpmath>=1.2.1',
56-
'plotly>=5.14.1',
5755
'matplotlib>=3.5.3',
5856
'circlify>=0.15.0',
59-
"wordcloud>=1.8.2.2; python_version < '3.11'",
57+
58+
# We lock these dependencies because our usage
59+
# might be broken by their updates. We want to
60+
# manually update these dependencies.
61+
'plotly==5.14.1',
62+
"wordcloud==1.9.2",
6063

6164
# This is a temporary fix for kaleido hanging on image generation on Windows
6265
# See: https://github.com/plotly/Kaleido/issues/110
6366
# and: https://github.com/plotly/Kaleido/issues/134
6467
"kaleido==0.1.0.post1; sys_platform == 'win32'",
65-
"kaleido>=0.2.1; sys_platform != 'win32'",
68+
"kaleido==0.2.1; sys_platform != 'win32'",
6669
]
6770
[project.urls]
6871
Homepage = "https://truelearnai.github.io/"

truelearn/preprocessing/_wikifier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Optional, Union, Dict, List, Iterable, cast
22
from urllib import parse, request
33

4-
import orjson
4+
import json
55

66
from truelearn.errors import TrueLearnValueError, WikifierError
77

@@ -131,7 +131,7 @@ def __make_wikifier_request(
131131

132132
# nosec because we know `url` is a valid https url
133133
with request.urlopen(url) as r: # nosec
134-
resp = orjson.loads(r.read().decode("utf-8"))
134+
resp = json.loads(r.read().decode("utf-8"))
135135
if "error" in resp:
136136
raise WikifierError(f"error in response : {resp['error']}")
137137
if "status" in resp:

truelearn/tests/test_utils_visualisations.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import pathlib
55
import types
66
import os
7-
import sys
87
from typing import Dict, Optional, Callable
98

109
import pytest
@@ -496,10 +495,6 @@ def test_top_n(self, resources):
496495
return plotter
497496

498497

499-
@pytest.mark.skipif(
500-
sys.version_info >= (3, 11),
501-
reason="WordPlotter only supports Python version < 3.11",
502-
)
503498
class TestWordPlotter:
504499
# no way to test this in a cross-platform way
505500
# because wordcloud renders the same font differently on different operating systems

0 commit comments

Comments
 (0)