Skip to content

Commit

Permalink
Release 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dlazesz committed Jul 13, 2020
1 parent bc4e3ff commit a604296
Show file tree
Hide file tree
Showing 22 changed files with 113 additions and 188,384 deletions.
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
language: python
dist: bionic
sudo: true
python:
- '3.6'
install:
- pip install -r requirements-dev.txt
- make install-dep-packages
script:
- make ci-test
deploy:
provider: releases
skip_cleanup: true
api_key: $GITHUB_TOKEN
file_glob: true
file: dist/*
on:
repo: dlt-rilmta/emmorphpy
branch: master
tags: true
notifications:
email: false
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include emmorphpy/hfst-wrapper.props
include emmorphpy/hu.hfstol
43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Bash is needed for time
SHELL := /bin/bash
DIR := ${CURDIR}
all:
@echo "See Makefile for possible targets!"

install-dep-packages:
sudo -E apt-get update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install `cat Aptfile`

check-hfst-lookup:
@command -v hfst-lookup >/dev/null 2>&1 || { echo >&2 'Command `hfst-lookup` could not be found!'; exit 1; }

dist/*.whl dist/*.tar.gz: check-hfst-lookup
@echo "Building package..."
python3 setup.py sdist bdist_wheel

build: dist/*.whl dist/*.tar.gz

install-user: build
@echo "Installing package to user..."
pip3 install dist/*.whl

test:
@echo "Running tests..."
time (cd /tmp && python3 -m emmorphpy --raw -i $(DIR)/tests/test_words.txt | \
diff -sy --suppress-common-lines - $(DIR)/tests/gold_output.txt 2>&1 | head -n100)

install-user-test: install-user test
@echo "The test was completed successfully!"

ci-test: install-user-test

uninstall:
@echo "Uninstalling..."
pip3 uninstall -y emmorphpy

install-user-test-uninstall: install-user-test uninstall

clean:
rm -rf dist/ build/ emmorphpy.egg-info/

clean-build: clean build
1 change: 0 additions & 1 deletion Procfile

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A wrapper and lemmatizer implemented in Python for ___emMorph__ (Humor) Hungaria
- (Included in this repository) The compiled FST (hu.hfstol): go to https://github.com/dlt-rilmta/emMorph for compilation details
- (Included in this repository) The lemmatizer config file: available at https://github.com/dlt-rilmta/hunlp-GATE/blob/master/Lang_Hungarian/resources/hfst/hfst-wrapper.props
- _hfst-lookup 0.6 (hfst 3.13.0)_ or higher: On Ubuntu 18.04 LTS or higher just `sudo apt install hfst`
- Python 3 (>=3.5, tested with 3.6)
- Python 3 (>=3.6, tested with 3.6)
- Pip to install the additional requirements in requirements.txt
- (Optional) a cloud service like [Heroku](https://heroku.com) for hosting the API

Expand Down
10 changes: 0 additions & 10 deletions emmorph.wsgi

This file was deleted.

2 changes: 1 addition & 1 deletion emmorphpy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def main():
# Init and run the module as it were in xtsv

# The relevant part of config.py
em_morph = ('emmorphpy.emmorphpy', 'EmMorphPy', 'emMorph', (),
em_morph = ('emmorphpy', 'EmMorphPy', 'emMorph', (),
{'source_fields': {'form'}, 'target_fields': ['anas']})
tools = [(em_morph, ('morph', 'emMorph'))]

Expand Down
22 changes: 0 additions & 22 deletions emmorphrest.py

This file was deleted.

7 changes: 7 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Own requirements
-r requirements.txt

# Packaging
setuptools
twine
wheel
1 change: 0 additions & 1 deletion runtime.txt

This file was deleted.

37 changes: 37 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env pyhton3
# -*- coding: utf-8, vim: expandtab:ts=4 -*-

import setuptools
from emmorphpy import __version__

with open('README.md') as fh:
long_description = fh.read()

setuptools.setup(
name='emmorphpy',
version=__version__,
author='dlazesz', # Will warn about missing e-mail
description='A wrapper, a lemmatizer and REST API implemented in Python for emMorph (Humor)'
' Hungarian morphological analyzer',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/dlt-rilmta/emmorphpy',
# license='GNU Lesser General Public License v3 (LGPLv3)', # Never really used in favour of classifiers
# platforms='any', # Never really used in favour of classifiers
packages=setuptools.find_packages(exclude=['tests']),
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
'Operating System :: POSIX :: Linux',
],
python_requires='>=3.6',
install_requires=['jprops', # TODO: List dependencies at only one file requirements.txt vs. setup.py
'xtsv>=1.0,<2.0',
],
include_package_data=True,
entry_points={
'console_scripts': [
'emmorphpy=emmorphpy.__main__:main',
]
},
)
5 changes: 0 additions & 5 deletions test.sh

This file was deleted.

Loading

0 comments on commit a604296

Please sign in to comment.