diff --git a/MANIFEST.in b/MANIFEST.in index 240f9d8..614b507 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,5 @@ recursive-include pyoracc *.py recursive-include pyoracc/test/fixtures/sample_corpus *.atf recursive-include pyoracc/test/fixtures/tiny_corpus *.atf +include LICENSE.txt +include README.md \ No newline at end of file diff --git a/README.md b/README.md index b38b45a..bc0ae45 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ pyoracc [![Maintainability](https://api.codeclimate.com/v1/badges/7244ac087b45146c5e3e/maintainability)](https://codeclimate.com/github/cdli-gh/pyoracc/maintainability) [![codecov](https://codecov.io/gh/oracc/pyoracc/branch/master/graph/badge.svg)](https://codecov.io/gh/oracc/pyoracc) -Python tools for working with ORACC +Python tools for working with ORACC/C-ATF files Depends on PLY, Mako and Pytest @@ -105,6 +105,12 @@ Options: ## Internal Dev Usage +### Development Guideline + +* ORACC atf based changes will go in pyoracc/atf/oracc +* CDLI atf based changes will go in pyoracc/atf/cdli +* Common atf based changes will go in pyoracc/atf/common + ### To run on directory $ python -m pyoracc.model.corpus ./pyoracc/test/data cdli @@ -118,7 +124,11 @@ Options: Before running pytest and coverage, install [py.test](https://docs.pytest.org/en/latest/getting-started.html) and [pytest-cov](https://pypi.org/project/pytest-cov/). $ py.test --cov=pyoracc --cov-report xml --cov-report html --cov-report annotate --runslow - + +Before running pycodestyle, install [pycodestyle](https://pypi.org/project/pycodestyle/). + + $ pycodestyle + ## API Consumption ```python diff --git a/pyoracc/atf/oracc/__init__.py,cover b/pyoracc/atf/oracc/__init__.py,cover deleted file mode 100644 index e69de29..0000000 diff --git a/pyoracc/atf/oracc/atflex.py,cover b/pyoracc/atf/oracc/atflex.py,cover deleted file mode 100644 index 0a3edab..0000000 --- a/pyoracc/atf/oracc/atflex.py,cover +++ /dev/null @@ -1,7 +0,0 @@ -> from pyoracc.atf.common.atflex import AtfLexer - - -> class AtfOraccLexer(AtfLexer): - -> def __init__(self, skipinvalid, debug, log): -> super(AtfOraccLexer, self).__init__(skipinvalid, debug, log) diff --git a/setup.cfg b/setup.cfg index 0a8df87..b69db04 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,5 @@ +[metadata] +description-file = README.md +license_file = LICENSE.txt [wheel] universal = 1 \ No newline at end of file diff --git a/setup.py b/setup.py index d3b9e13..3ea7f3f 100644 --- a/setup.py +++ b/setup.py @@ -20,8 +20,20 @@ from setuptools import find_packages, setup from setuptools.command.build_py import build_py +# To use a consistent encoding +from codecs import open +from os import path + +here = path.abspath(path.dirname(__file__)) + +# Get the long description from the README file +with open(path.join(here, 'README.md'), encoding='utf-8') as f: + long_description = f.read() + dependencies = ['click', 'mako', 'ply'] +extra_dependencies = ['pytest', 'pytest-cov', 'codecov', 'pycodestyle'] + class MyBuildPy(build_py): """We subclass build_py so that we can run _generate_parsetab after @@ -41,11 +53,18 @@ def run(self): version='0.1.0', author='UCL Research IT Services', author_email='rc-softdev@ucl.ac.uk', + description='Python tools for working with ORACC/CDLI ATF files', + long_description=long_description, + long_description_content_type='text/markdown', url='https://github.com/ucl/pyoracc', download_url='https://github.com/ucl/pyoracc/archive/master.tar.gz', + license='GPLv3', packages=find_packages(exclude=["*.test", "*.test.*", "test.*", "test"]), install_requires=dependencies, - setup_requires=dependencies, + extras_require={ # Optional + 'dev': extra_dependencies, + 'test': extra_dependencies, + }, zip_safe=False, cmdclass=dict(build_py=MyBuildPy), entry_points={ @@ -58,13 +77,15 @@ def run(self): # 'Development Status :: 1 - Planning', # 'Development Status :: 2 - Pre-Alpha', # 'Development Status :: 3 - Alpha', - 'Development Status :: 4 - Beta', - # 'Development Status :: 5 - Production/Stable', + # 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', # 'Development Status :: 6 - Mature', # 'Development Status :: 7 - Inactive', 'Environment :: Console', 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', + 'Intended Audience :: Education', + 'Intended Audience :: Science/Research', + 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'Operating System :: POSIX', 'Operating System :: MacOS', 'Operating System :: Unix', @@ -73,5 +94,14 @@ def run(self): 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Topic :: Software Development :: Libraries :: Python Modules', - ] + 'Topic :: Utilities' + ], + keywords='oracc cdli atf cuneiform parser', # Optional + project_urls={ # Optional + 'Bug Reports': 'https://github.com/oracc/pyoracc/issues', + 'Donating!': 'http://oracc.museum.upenn.edu/doc/about/contributing/', + 'Help!': 'http://oracc.museum.upenn.edu/doc/help/index.html', + 'Source': 'https://github.com/oracc/pyoracc/', + }, + python_requires='>=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4' )