Skip to content

Commit 4fc29c8

Browse files
authored
Dev (#37)
### Bug fixes + Fix exiting early when checking spaCy and model
1 parent 46b9cfa commit 4fc29c8

File tree

6 files changed

+23
-22
lines changed

6 files changed

+23
-22
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<div align="center"><h1>Changelog</h1></div>
22

3+
## [0.0.55](https://github.com/tanloong/neosca/releases/tag/0.0.55) (2 October 2023)
4+
5+
### Bug fixes
6+
7+
+ Fix exiting early when checking spaCy and model
8+
39
## [0.0.54](https://github.com/tanloong/neosca/releases/tag/0.0.54) (2 October 2023)
410

511
### Dependency Changes

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ BibTeX
461461

462462
```BibTeX
463463
@misc{tan2022neosca,
464-
title = {NeoSCA: A Fork of L2 Syntactic Complexity Analyzer, version 0.0.54},
464+
title = {NeoSCA: A Fork of L2 Syntactic Complexity Analyzer, version 0.0.55},
465465
author = {Long Tan},
466466
howpublished = {\url{https://github.com/tanloong/neosca}},
467467
year = {2022}
@@ -476,7 +476,7 @@ year = {2022}
476476
APA (7th edition)
477477
</summary>
478478

479-
<pre>Tan, L. (2022). <i>NeoSCA</i> (version 0.0.54) [Computer software]. Github. https://github.com/tanloong/neosca</pre>
479+
<pre>Tan, L. (2022). <i>NeoSCA</i> (version 0.0.55) [Computer software]. Github. https://github.com/tanloong/neosca</pre>
480480

481481
</details>
482482

@@ -486,7 +486,7 @@ APA (7th edition)
486486
MLA (9th edition)
487487
</summary>
488488

489-
<pre>Tan, Long. <i>NeoSCA</i>. version 0.0.54, GitHub, 2022, https://github.com/tanloong/neosca.</pre>
489+
<pre>Tan, Long. <i>NeoSCA</i>. version 0.0.55, GitHub, 2022, https://github.com/tanloong/neosca.</pre>
490490

491491
</details>
492492

README_zh_cn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ BibTeX
451451

452452
```BibTeX
453453
@misc{tan2022neosca,
454-
title = {NeoSCA: A Fork of L2 Syntactic Complexity Analyzer, version 0.0.54},
454+
title = {NeoSCA: A Fork of L2 Syntactic Complexity Analyzer, version 0.0.55},
455455
author = {Long Tan},
456456
howpublished = {\url{https://github.com/tanloong/neosca}},
457457
year = {2022}
@@ -466,7 +466,7 @@ year = {2022}
466466
APA (7th edition)
467467
</summary>
468468

469-
<pre>Tan, L. (2022). <i>NeoSCA</i> (version 0.0.54) [Computer software]. Github. https://github.com/tanloong/neosca</pre>
469+
<pre>Tan, L. (2022). <i>NeoSCA</i> (version 0.0.55) [Computer software]. Github. https://github.com/tanloong/neosca</pre>
470470

471471
</details>
472472

@@ -476,7 +476,7 @@ APA (7th edition)
476476
MLA (9th edition)
477477
</summary>
478478

479-
<pre>Tan, Long. <i>NeoSCA</i>. version 0.0.54, GitHub, 2022, https://github.com/tanloong/neosca.</pre>
479+
<pre>Tan, Long. <i>NeoSCA</i>. version 0.0.55, GitHub, 2022, https://github.com/tanloong/neosca.</pre>
480480

481481
</details>
482482

README_zh_tw.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ BibTeX
451451

452452
```BibTeX
453453
@misc{tan2022neosca,
454-
title = {NeoSCA: A Fork of L2 Syntactic Complexity Analyzer, version 0.0.54},
454+
title = {NeoSCA: A Fork of L2 Syntactic Complexity Analyzer, version 0.0.55},
455455
author = {Long Tan},
456456
howpublished = {\url{https://github.com/tanloong/neosca}},
457457
year = {2022}
@@ -466,7 +466,7 @@ year = {2022}
466466
APA (7th edition)
467467
</summary>
468468

469-
<pre>Tan, L. (2022). <i>NeoSCA</i> (version 0.0.54) [Computer software]. Github. https://github.com/tanloong/neosca</pre>
469+
<pre>Tan, L. (2022). <i>NeoSCA</i> (version 0.0.55) [Computer software]. Github. https://github.com/tanloong/neosca</pre>
470470

471471
</details>
472472

@@ -476,7 +476,7 @@ APA (7th edition)
476476
MLA (9th edition)
477477
</summary>
478478

479-
<pre>Tan, Long. <i>NeoSCA</i>. version 0.0.54, GitHub, 2022, https://github.com/tanloong/neosca.</pre>
479+
<pre>Tan, Long. <i>NeoSCA</i>. version 0.0.55, GitHub, 2022, https://github.com/tanloong/neosca.</pre>
480480

481481
</details>
482482

neosca/about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env python3
22
# -*- coding=utf-8 -*-
33

4-
__version__ = "0.0.54"
4+
__version__ = "0.0.55"

neosca/lca/main.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -218,26 +218,21 @@ def check_spacy_and_model(self) -> SCAProcedureResult:
218218
" install/update it for you?"
219219
)
220220
if is_install:
221-
return self.install_spacy()
221+
self.install_spacy()
222222
else:
223-
return (
224-
False,
225-
"\nYou need to manually install it using:\npip install -U spacy",
226-
)
223+
logging.info("\nYou need to manually install it using:\npip install -U spacy")
224+
227225
if ask_install_model:
228226
is_install = get_yes_or_no(
229227
f"\nRunning LCA requires spaCy's model en_core_web_sm{required_version_range},"
230228
" do you want me to install it for you?"
231229
)
232230
if is_install:
233-
return self.install_model()
231+
self.install_model()
234232
else:
235-
return (
236-
False,
237-
(
238-
"\nYou need to manually install it using:"
239-
"\npython -m spacy download en_core_web_sm"
240-
),
233+
logging.info(
234+
"\nYou need to manually install it using:"
235+
"\npython -m spacy download en_core_web_sm"
241236
)
242237

243238
return True, None

0 commit comments

Comments
 (0)