Skip to content

Commit e093dbe

Browse files
xehusundy1994
andauthored
Yuxuan/dependency issue (#275)
* remove en_core_web_sm from dependencies, update 'import_nltk.py' to 'download_resources.py' that automatically download resources if not found * update test workflow * fix test workflow * update documentation * build docs --------- Co-authored-by: sundy1994 <[email protected]>
1 parent 76def0b commit e093dbe

File tree

17 files changed

+97
-62
lines changed

17 files changed

+97
-62
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ examples/vector_data/*
5252
examples/output/*
5353
node_modules/
5454

55+
# testing
56+
/output
57+
/vector_data
58+
test.py

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ To use our tool, please ensure that you have Python >= 3.10 installed and a work
2323
pip install team_comm_tools
2424
```
2525

26-
You will also need to ensure that Spacy and NLTK are installed in addition to the required dependencies. The Spacy model should download `en_core_web_sm` automatically upon install. If you get an error that en_core_web_sm is not found, you should run the following in your terminal:
26+
This command will automatically install our package and all required dependencies.
2727

28-
```sh
29-
spacy download en_core_web_sm
30-
```
28+
## Troubleshooting
3129

32-
Additionally, we require several NLTK dependencies. If you don't have them in your environment, run this one-liner in your terminal:
30+
In the event that some dependency installations fail (for example, you may get an error that `en_core_web_sm` from Spacy is not found, or that there is a missing NLTK resource), please run this simple one-line command in your terminal, which will force the installation of Spacy and NLTK dependencies:
3331

3432
```sh
35-
import_nltk
33+
download_resources
3634
```
3735

36+
If you encounter a further issue in which the 'wordnet' package from NLTK is not found, it may be related to a known bug in NLTK in which the wordnet package does not unzip automatically. If this is the case, please follow the instructions to manually unzip it, documented in [this thread](https://github.com/nltk/nltk/issues/3028).
37+
3838
## Import Recommendations: Virtual Environment and Pip
3939

4040
**We strongly recommend using a virtual environment in Python to run the package.** We have several specific dependency requirements. One important one is that we are currently only compatible with numpy < 2.0.0 because [numpy 2.0.0 and above](https://numpy.org/devdocs/release/2.0.0-notes.html#changes) made significant changes that are not compatible with other dependencies of our package. As those dependencies are updated, we will support later versions of numpy.
3.5 KB
Binary file not shown.
1.16 KB
Binary file not shown.

docs/build/doctrees/index.doctree

1.17 KB
Binary file not shown.

docs/build/html/_sources/examples.rst.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,22 @@ Getting Started
1010

1111
To use our tool, please ensure that you have Python >= 3.10 installed and a working version of `pip <https://pypi.org/project/pip/>`_, which is Python's package installer. Then, in your local environment, run the following:
1212

13-
.. code-block::
13+
.. code-block:: sh
1414
1515
pip install team_comm_tools
1616
17-
You will also need to ensure that Spacy and NLTK are installed in addition to the required dependencies. The Spacy model should download ``en_core_web_sm`` automatically upon install. If you get an error that en_core_web_sm is not found, you should run the following in your terminal:
17+
This command will automatically install our package and all required dependencies.
1818

19-
.. code-block::
19+
Troubleshooting
20+
++++++++++++++++
2021

21-
spacy download en_core_web_sm
22+
In the event that some dependency installations fail (for example, you may get an error that ``en_core_web_sm`` from Spacy is not found, or that there is a missing NLTK resource), please run this simple one-line command in your terminal, which will force the installation of Spacy and NLTK dependencies:
2223

23-
Additionally, we require several NLTK dependencies. If you don't have them in your environment, run this one-liner in your terminal:
24+
.. code-block:: sh
2425
25-
.. code-block::
26+
download_resources
2627
27-
import_nltk
28+
If you encounter a further issue in which the 'wordnet' package from NLTK is not found, it may be related to a known bug in NLTK in which the wordnet package does not unzip automatically. If this is the case, please follow the instructions to manually unzip it, documented in `this thread <https://github.com/nltk/nltk/issues/3028>`_.
2829

2930
Import Recommendations: Virtual Environment and Pip
3031
+++++++++++++++++++++++++++++++++++++++++++++++++++++

docs/build/html/_sources/index.rst.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,22 @@ Getting Started
1212

1313
To use our tool, please ensure that you have Python >= 3.10 installed and a working version of `pip <https://pypi.org/project/pip/>`_, which is Python's package installer. Then, in your local environment, run the following:
1414

15-
.. code-block::
15+
.. code-block:: sh
1616
1717
pip install team_comm_tools
1818
19-
You will also need to ensure that Spacy and NLTK are installed in addition to the required dependencies. The Spacy model should download ``en_core_web_sm`` automatically upon install. If you get an error that en_core_web_sm is not found, you should run the following in your terminal:
19+
This command will automatically install our package and all required dependencies.
2020

21-
.. code-block::
21+
Troubleshooting
22+
++++++++++++++++
2223

23-
spacy download en_core_web_sm
24+
In the event that some dependency installations fail (for example, you may get an error that ``en_core_web_sm`` from Spacy is not found, or that there is a missing NLTK resource), please run this simple one-line command in your terminal, which will force the installation of Spacy and NLTK dependencies:
2425

25-
Additionally, we require several NLTK dependencies. If you don't have them in your environment, run this one-liner in your terminal:
26+
.. code-block:: sh
2627
27-
.. code-block::
28+
download_resources
2829
29-
import_nltk
30+
If you encounter a further issue in which the 'wordnet' package from NLTK is not found, it may be related to a known bug in NLTK in which the wordnet package does not unzip automatically. If this is the case, please follow the instructions to manually unzip it, documented in `this thread <https://github.com/nltk/nltk/issues/3028>`_.
3031

3132
Import Recommendations: Virtual Environment and Pip
3233
+++++++++++++++++++++++++++++++++++++++++++++++++++++

docs/build/html/examples.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<li class="toctree-l1"><a class="reference internal" href="features_conceptual/index.html">Features: Conceptual Documentation</a></li>
5353
<li class="toctree-l1 current"><a class="current reference internal" href="#">Examples</a><ul>
5454
<li class="toctree-l2"><a class="reference internal" href="#getting-started">Getting Started</a><ul>
55+
<li class="toctree-l3"><a class="reference internal" href="#troubleshooting">Troubleshooting</a></li>
5556
<li class="toctree-l3"><a class="reference internal" href="#import-recommendations-virtual-environment-and-pip">Import Recommendations: Virtual Environment and Pip</a></li>
5657
</ul>
5758
</li>
@@ -100,17 +101,18 @@
100101
<section id="getting-started">
101102
<h2>Getting Started<a class="headerlink" href="#getting-started" title="Link to this heading"></a></h2>
102103
<p>To use our tool, please ensure that you have Python &gt;= 3.10 installed and a working version of <a class="reference external" href="https://pypi.org/project/pip/">pip</a>, which is Python’s package installer. Then, in your local environment, run the following:</p>
103-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">team_comm_tools</span>
104+
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>team_comm_tools
104105
</pre></div>
105106
</div>
106-
<p>You will also need to ensure that Spacy and NLTK are installed in addition to the required dependencies. The Spacy model should download <code class="docutils literal notranslate"><span class="pre">en_core_web_sm</span></code> automatically upon install. If you get an error that en_core_web_sm is not found, you should run the following in your terminal:</p>
107-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">spacy</span> <span class="n">download</span> <span class="n">en_core_web_sm</span>
108-
</pre></div>
109-
</div>
110-
<p>Additionally, we require several NLTK dependencies. If you don’t have them in your environment, run this one-liner in your terminal:</p>
111-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">import_nltk</span>
107+
<p>This command will automatically install our package and all required dependencies.</p>
108+
<section id="troubleshooting">
109+
<h3>Troubleshooting<a class="headerlink" href="#troubleshooting" title="Link to this heading"></a></h3>
110+
<p>In the event that some dependency installations fail (for example, you may get an error that <code class="docutils literal notranslate"><span class="pre">en_core_web_sm</span></code> from Spacy is not found, or that there is a missing NLTK resource), please run this simple one-line command in your terminal, which will force the installation of Spacy and NLTK dependencies:</p>
111+
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>download_resources
112112
</pre></div>
113113
</div>
114+
<p>If you encounter a further issue in which the ‘wordnet’ package from NLTK is not found, it may be related to a known bug in NLTK in which the wordnet package does not unzip automatically. If this is the case, please follow the instructions to manually unzip it, documented in <a class="reference external" href="https://github.com/nltk/nltk/issues/3028">this thread</a>.</p>
115+
</section>
114116
<section id="import-recommendations-virtual-environment-and-pip">
115117
<h3>Import Recommendations: Virtual Environment and Pip<a class="headerlink" href="#import-recommendations-virtual-environment-and-pip" title="Link to this heading"></a></h3>
116118
<p><strong>We strongly recommend using a virtual environment in Python to run the package.</strong> We have several specific dependency requirements. One important one is that we are currently only compatible with numpy &lt; 2.0.0 because <a class="reference external" href="https://numpy.org/devdocs/release/2.0.0-notes.html#changes">numpy 2.0.0 and above</a> made significant changes that are not compatible with other dependencies of our package. As those dependencies are updated, we will support later versions of numpy.</p>

docs/build/html/index.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,18 @@ <h1>The Team Communication Toolkit<a class="headerlink" href="#the-team-communic
8383
<section id="getting-started">
8484
<h2>Getting Started<a class="headerlink" href="#getting-started" title="Link to this heading"></a></h2>
8585
<p>To use our tool, please ensure that you have Python &gt;= 3.10 installed and a working version of <a class="reference external" href="https://pypi.org/project/pip/">pip</a>, which is Python’s package installer. Then, in your local environment, run the following:</p>
86-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">team_comm_tools</span>
86+
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>pip<span class="w"> </span>install<span class="w"> </span>team_comm_tools
8787
</pre></div>
8888
</div>
89-
<p>You will also need to ensure that Spacy and NLTK are installed in addition to the required dependencies. The Spacy model should download <code class="docutils literal notranslate"><span class="pre">en_core_web_sm</span></code> automatically upon install. If you get an error that en_core_web_sm is not found, you should run the following in your terminal:</p>
90-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">spacy</span> <span class="n">download</span> <span class="n">en_core_web_sm</span>
91-
</pre></div>
92-
</div>
93-
<p>Additionally, we require several NLTK dependencies. If you don’t have them in your environment, run this one-liner in your terminal:</p>
94-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">import_nltk</span>
89+
<p>This command will automatically install our package and all required dependencies.</p>
90+
<section id="troubleshooting">
91+
<h3>Troubleshooting<a class="headerlink" href="#troubleshooting" title="Link to this heading"></a></h3>
92+
<p>In the event that some dependency installations fail (for example, you may get an error that <code class="docutils literal notranslate"><span class="pre">en_core_web_sm</span></code> from Spacy is not found, or that there is a missing NLTK resource), please run this simple one-line command in your terminal, which will force the installation of Spacy and NLTK dependencies:</p>
93+
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>download_resources
9594
</pre></div>
9695
</div>
96+
<p>If you encounter a further issue in which the ‘wordnet’ package from NLTK is not found, it may be related to a known bug in NLTK in which the wordnet package does not unzip automatically. If this is the case, please follow the instructions to manually unzip it, documented in <a class="reference external" href="https://github.com/nltk/nltk/issues/3028">this thread</a>.</p>
97+
</section>
9798
<section id="import-recommendations-virtual-environment-and-pip">
9899
<h3>Import Recommendations: Virtual Environment and Pip<a class="headerlink" href="#import-recommendations-virtual-environment-and-pip" title="Link to this heading"></a></h3>
99100
<p><strong>We strongly recommend using a virtual environment in Python to run the package.</strong> We have several specific dependency requirements. One important one is that we are currently only compatible with numpy &lt; 2.0.0 because <a class="reference external" href="https://numpy.org/devdocs/release/2.0.0-notes.html#changes">numpy 2.0.0 and above</a> made significant changes that are not compatible with other dependencies of our package. As those dependencies are updated, we will support later versions of numpy.</p>

docs/build/html/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)