Repository: ArneTillmann/AuDoLab (language: python)

Issue:
update 
update


Discussion / hints:

Fix patch:
diff --git a/AuDoLab/__init__.py b/AuDoLab/__init__.py
index 4670d6b..42e648a 100644
--- a/AuDoLab/__init__.py
+++ b/AuDoLab/__init__.py
@@ -2,4 +2,4 @@
 
 __author__ = """Arne Tillmann"""
 __email__ = 'arne.tillmann.vellmar@gmail.com'
-__version__ = '0.0.36'
+__version__ = '0.0.40'
diff --git a/MANIFEST.in b/MANIFEST.in
index 965b2dd..33c6347 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -3,6 +3,7 @@ include CONTRIBUTING.rst
 include HISTORY.rst
 include LICENSE
 include README.rst
+include requirements.txt
 
 recursive-include tests *
 recursive-exclude * __pycache__
diff --git a/README.html b/README.html
new file mode 100644
index 0000000..a4334ab
--- /dev/null
+++ b/README.html
@@ -0,0 +1,18 @@
+<a href="https://pypi.python.org/pypi/AuDoLab" rel="nofollow"><img alt="https://img.shields.io/pypi/v/AuDoLab.svg" src="https://img.shields.io/pypi/v/AuDoLab.svg"></a>
+<a href="https://travis-ci.com/ArneTillmann/AuDoLab" rel="nofollow"><img alt="https://img.shields.io/travis/ArneTillmann/AuDoLab.svg" src="https://img.shields.io/travis/ArneTillmann/AuDoLab.svg"></a>
+<a href="https://AuDoLab.readthedocs.io/en/latest/?version=latest" rel="nofollow"><img alt="https://readthedocs.org/projects/AuDoLab/badge/?version=latest" src="https://readthedocs.org/projects/AuDoLab/badge/?version=latest"></a>
+<ul>
+<li>Free software: GNU General Public License v3</li>
+<li>Documentation: <a href="https://AuDoLab.readthedocs.io" rel="nofollow">https://AuDoLab.readthedocs.io</a>.</li>
+</ul>
+<div id="features">
+<h2>Features</h2>
+<ul>
+<li>TODO</li>
+</ul>
+</div>
+<div id="credits">
+<h2>Credits</h2>
+<p>This package was created with <a href="https://github.com/audreyr/cookiecutter" rel="nofollow">Cookiecutter</a> and the <a href="https://github.com/audreyr/cookiecutter-pypackage" rel="nofollow">audreyr/cookiecutter-pypackage</a> project template.</p>
+</div>
+
diff --git a/README.rst b/README.rst
index d2e19f2..a33085b 100644
--- a/README.rst
+++ b/README.rst
@@ -10,7 +10,8 @@ AuDoLab
 
 .. image:: https://readthedocs.org/projects/AuDoLab/badge/?version=latest
         :target: https://AuDoLab.readthedocs.io/en/latest/?version=latest
-        :alt: Documentation Status
+..
+  :alt: Documentation Status
 
  With AuDoLab you can perform Latend Direchlet Allocation on highly imbalanced datasets.
 
diff --git a/requirements_dev.txt b/requirements.txt
similarity index 84%
rename from requirements_dev.txt
rename to requirements.txt
index fe4170d..dabbbd4 100644
--- a/requirements_dev.txt
+++ b/requirements.txt
@@ -1,13 +1,12 @@
-pip==20.3.4
 bump2version==0.5.11
 wheel==0.33.6
 watchdog==0.9.0
 flake8==3.7.8
 tox==3.14.0
 coverage==4.5.4
-Sphinx==1.8.5
-twine==1.14.0
-Click==7.0
+Sphinx==3.5.4
+twine==3.4.1
+Click>=7.0
 pytest==4.6.5
 pytest-runner==5.1
 numpy==1.19.2
diff --git a/setup.cfg b/setup.cfg
index 690981c..01783ef 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 0.0.36
+current_version = 0.0.40
 commit = True
 tag = True
 
diff --git a/setup.py b/setup.py
index 1aa41db..320144d 100644
--- a/setup.py
+++ b/setup.py
@@ -10,9 +10,12 @@
 with open('HISTORY.rst') as history_file:
     history = history_file.read()
 
-requirements = ['Click>=7.0', ]
+requirements = []
+with open('requirements.txt', 'r') as fh:
+    for line in fh:
+        requirements.append(line.strip())
 
-setup_requirements = ['pytest-runner', 'numpy==1.19.2', 'pandas==1.2.3', 'webbot==0.34', 'bs4==0.0.1', 'gensim==3.8.3', 'pyldavis==2.1.2', 'scikit-learn==0.24.1', 'keras==2.3.1', 'nltk==3.5', 'lime==0.2.0.1', 'matplotlib==3.3.4']
+setup_requirements = ['pytest-runner', ]
 
 test_requirements = ['pytest>=3', ]
 
@@ -25,10 +28,6 @@
         'Intended Audience :: Developers',
         'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
         'Natural Language :: English',
-        'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.5',
-        'Programming Language :: Python :: 3.6',
-        'Programming Language :: Python :: 3.7',
         'Programming Language :: Python :: 3.8',
     ],
     description=" With AuDoLab you can perform Latend Direchlet Allocation on highly imbalanced datasets.",
@@ -48,6 +47,6 @@
     test_suite='tests',
     tests_require=test_requirements,
     url='https://github.com/ArneTillmann/AuDoLab',
-    version='0.0.36',
+    version='0.0.40',
     zip_safe=False,
 )
diff --git a/tox.ini b/tox.ini
index 1f03ba4..f364796 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,10 +15,10 @@ commands = flake8 AuDoLab tests
 setenv =
     PYTHONPATH = {toxinidir}
 deps =
-    -r{toxinidir}/requirements_dev.txt
+;    -r{toxinidir}/requirements_dev.txt
 ; If you want to make tox run the tests with the same versions, create a
 ; requirements.txt with the pinned versions and uncomment the following line:
-;     -r{toxinidir}/requirements.txt
+    -r{toxinidir}/requirements.txt
 commands =
     pip install -U pip
     pytest --basetemp={envtmpdir}


Test patch:
diff --git a/tests/load_data.py b/tests/load_data.py
index ff18601..376413e 100644
--- a/tests/load_data.py
+++ b/tests/load_data.py
@@ -7,54 +7,23 @@
 
 
 data = pd.read_csv("tests\mtsamples.csv")
-if __name__ == "__main__":
-    print(data.shape)
-    print(data.columns)
-data[data["medical_specialty"] == " Dentistry"]
 data = data.sort_values("medical_specialty")
-if __name__ == "__main__":
-    print(len(data[data["medical_specialty"] == " Dentistry"]))
 
 new_list = list(data[data["medical_specialty"] ==
                 " Dentistry"]["transcription"])
-if __name__ == "__main__":
-    print(len(new_list))
+
 
 data["dentistry"] = data["transcription"].map(
     lambda x: 1 if x in new_list else -1)
-if __name__ == "__main__":
-    print(data.shape)
-    print(data["dentistry"])
-
-len(data[data["dentistry"] == 1])
-
 data = data.drop_duplicates(
     subset="transcription"
 )  # , 'medical_specialty'], keep="first")
-if __name__ == "__main__":
-    print(data.shape)
+
+
 data = data.drop(data[data["transcription"].isna()].index)
-if __name__ == "__main__":
-    print(data.shape)
 
 data = data[["dentistry", "transcription", "medical_specialty"]]
-if __name__ == "__main__":
-    print(data["medical_specialty"].value_counts().count())
-
-try:
-    data = data.reset_index()
-except:
-    pass
-
-try:
-    data = data.drop("level_0", 1)
-except:
-    pass
-
-try:
-    data = data.drop("index", 1)
-except:
-    pass
+
 data=data[["transcription"]]
 if __name__ == "__main__":
     print(data)
diff --git a/tests/test_AuDoLab.py b/tests/test_AuDoLab.py
index f83a812..4ca2bc3 100644
--- a/tests/test_AuDoLab.py
+++ b/tests/test_AuDoLab.py
@@ -9,13 +9,12 @@
 import os
 import sys
 import numpy as np
+import pandas as pd
 sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/..")
 
-from load_data import data
-from load_papers import papers
 from AuDoLab import cli
 from AuDoLab import AuDoLab
-#
+
 
 
 
@@ -46,22 +45,22 @@ def test_command_line_interface():
     assert '--help  Show this message and exit.' in help_result.output
 
 
-audo = AuDoLab.AuDoLab()
-# papers = audo.scrape_abstracts(
-#     keywords=["dentistry", "teeth", "tooth"],
-#     in_data="all_meta",
-#     pages=12,
-#     operator="or"
-# )
-papers_processed = audo.preprocessing(papers, "text")
-data_processed = audo.preprocessing(data, "transcription")
-
-data_tfidf, papers_tfidf = audo.tf_idf(
-    data, papers,"transcription", "text")
-classifier = audo.one_class_svm(papers_tfidf, data_tfidf)
-df_data = audo.choose_classifier(data_processed, classifier, 0)
-if __name__ == '__main__':
-    # lda = audo.lda_modeling(papers_processed)
-    # audo.lda_visualize_topics()
-    lda2 = audo.lda_modeling(df_data, no_above=0.3)
-    audo.lda_visualize_topics()
+# audo = AuDoLab.AuDoLab()
+# # papers = audo.scrape_abstracts(
+# #     keywords=["dentistry", "teeth", "tooth"],
+# #     in_data="all_meta",
+# #     pages=12,
+# #     operator="or"
+# # )
+# papers_processed = audo.preprocessing(papers, "text")
+# data_processed = audo.preprocessing(data, "transcription")
+#
+# data_tfidf, papers_tfidf = audo.tf_idf(
+#     data, papers,"transcription", "text")
+# classifier = audo.one_class_svm(papers_tfidf, data_tfidf)
+# df_data = audo.choose_classifier(data_processed, classifier, 0)
+# if __name__ == '__main__':
+#     # lda = audo.lda_modeling(papers_processed)
+#     # audo.lda_visualize_topics()
+#     lda2 = audo.lda_modeling(df_data, no_above=0.3)
+#     audo.lda_visualize_topics()