forked from pielstroem/Topics
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/package' into testing
Packaging and test framework.
- Loading branch information
Showing
13 changed files
with
122 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
""" | ||
The `dariah_topics` package currently offers three modules: | ||
* `dariah_topics.preprocessing` contains preprocessing code | ||
* `dariah_topics.visualization` offers visualization stuff that depends on PyLDAvis | ||
* `dariah_topics.mallet` provides a wrapper that calls mallet | ||
""" |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-r requirements.txt | ||
nose | ||
nosexcover | ||
jupyter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1 @@ | ||
pandas>=0.19.2 | ||
regex>=2017.01.14 | ||
gensim>=0.13.2 | ||
matplotlib==1.5.3 | ||
numpy>=1.3 | ||
scipy>=0.7 | ||
werkzeug>=0.11.15 | ||
flask>=0.11.1 | ||
pyLDAvis>=2.0.0 | ||
|
||
-e git+https://github.com/thvitt/cophi-toolbox#egg=cophi_toolbox | ||
-e .[vis,demonstrator] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[nosetests] | ||
with-doctest=1 | ||
with-xunit=1 | ||
with-xcoverage=true | ||
cover-package=dariah_topics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env python3 | ||
|
||
from setuptools import setup, find_packages | ||
|
||
setup( | ||
name='dariah_topics', | ||
version='0.2.0dev0', | ||
description='DARIAH Topic Modelling', | ||
# url | ||
author="DARIAH-DE Wuerzburg Group", | ||
author_email="pielstroem@biozentrum.uni-wuerzburg.de", | ||
# license | ||
classifiers=[ | ||
'Development Status :: 3 - Alpha', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5' | ||
], | ||
# keywords | ||
packages=find_packages(exclude=['corpus_*', 'docs', 'tests']), | ||
install_requires=[ | ||
'pandas>=0.19.2', | ||
'regex>=2017.01.14', | ||
'gensim>=0.13.2', | ||
'matplotlib==1.5.3', | ||
'numpy>=1.3', | ||
'scipy>=0.7', | ||
], | ||
# pip install -e .[demonstrator,vis] | ||
extras_require={ | ||
'demonstrator': [ | ||
'werkzeug>=0.11.15', | ||
'flask>=0.11.1' | ||
], | ||
'vis': [ | ||
'pyLDAvis>=2.0.0', # to feature 'pyldavis' | ||
] | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from subprocess import check_call | ||
from nose.plugins.skip import SkipTest | ||
|
||
|
||
def jupyter_integration_test(): | ||
""" | ||
Tries to run the integration test notebook using jupyter. | ||
""" | ||
try: | ||
check_call(["jupyter-nbconvert", "--execute", | ||
"IntegrationTest_v01.ipynb"]) | ||
except FileNotFoundError as e: | ||
raise SkipTest("jupyter-nbconvert not found. Cannot run integration test. " | ||
+ str(e)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from dariah_topics import preprocessing as pre | ||
|
||
# Funktion muss irgendwie mit test heißen | ||
def test_document_list(): | ||
|
||
# die Funktion under test aufrufen | ||
|
||
doclist = pre.create_document_list('corpus_txt') | ||
|
||
# Bedingungen auf dem Ergebnis prüfen: | ||
assert len(doclist) == 17 | ||
|
||
return doclist | ||
|
||
def test_document_labels(): | ||
doclist = test_document_list() | ||
labels = pre.get_labels(doclist) | ||
assert len(list(labels)) == len(doclist) |