Skip to content

Commit

Permalink
Merge from YPlan/gibberish
Browse files Browse the repository at this point in the history
  • Loading branch information
greghaskins committed Jul 4, 2019
2 parents 3ec3986 + d92278c commit 4464756
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 19 deletions.
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Config file for automatic testing at travis-ci.org
sudo: false

language: python
python: 3.5

install:
- pip install tox

script: tox
1 change: 1 addition & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2011-2012 Gregory Haskins, http://greghaskins.com
Copyright (c) 2016 YPlan, http://github.com/YPlan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include LICENSE.txt
include README.rst
1 change: 0 additions & 1 deletion README

This file was deleted.

1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest
8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file requirements.txt requirements.in
#
py==1.4.31 # via pytest
pytest==3.0.2
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal = 1
36 changes: 18 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
import os
try:
# use setuptools if available
from setuptools import setup
kwargs = {
'entry_points': {'console_scripts':
'gibberish = gibberish:console_main',
}
}
except ImportError:
# fall back to distutils
from distutils import setup
kwargs = {}

from setuptools import setup

base_dir = os.path.dirname(os.path.abspath(__file__))

with open(os.path.join(base_dir, 'README.rst')) as fp:
long_description = fp.read()

setup(
name='Gibberish',
name='gibberish',
description="A pseudo-word generator",
version='0.3',
version='0.3.1',
author='Gregory Haskins',
author_email='[email protected]',
url='https://github.com/greghaskins/gibberish',
packages=('gibberish',),
license='MIT License',
long_description=open(os.path.join(base_dir, 'README.rst')).read(),
long_description=long_description,
install_requires=['PyYAML'],
package_data={
'gibberish': ['database/*'],
},
# include_package_data=True,
extras_require={
'dev': ['nltk']
},
**kwargs
},
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
],
entry_points={
'console_scripts': 'gibberish = gibberish:console_main',
}
)
17 changes: 17 additions & 0 deletions test_it.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import gibberish


def test_generate_word():
word = gibberish.generate_word()
assert len(word)
assert word.isalpha()


def test_generate_words():
word_list = gibberish.generate_word()

assert len(word_list)

for word in word_list:
assert len(word)
assert word.isalpha()
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[tox]
envlist = py{27,35}

[testenv]
install_command = pip install --no-deps {opts} {packages}
deps = -rrequirements.txt
commands = py.test {posargs}

0 comments on commit 4464756

Please sign in to comment.