Skip to content

Latest commit

 

History

History
83 lines (57 loc) · 2.61 KB

CONTRIBUTING.md

File metadata and controls

83 lines (57 loc) · 2.61 KB

🚧 Contributing

Travis Build Python Documentation Status wheel MIT license

How To

Need help? Reach out on gitter

Prequisites

  1. Install deps
pip install .
python -m nltk.downloader punkt

Code

  1. Fork the repo
  2. Make a change
  3. Create and/or update tests
  4. Run tests and ensure they pass
python -m unittest discover -v
  1. Submit a PR

Tips: Implmementing a new scorer

All scorers follow a very similar implementation pattern: The following use ARI as an example

  • each scorer lives in the scorers directory
  • each scorer has a constructor that takes statistics and is registered here.
  • each scorer implements a method score and returns a Result. See ARI for an example
  • each scorer provides a test(s) in test/test_readability

Docs

Prequisites:

  1. Install Sphinx
pip install -U sphinx m2r

Modify Documentation

  1. Fork the repo

  2. Navigate to docs

  3. Make a change

  4. Rebuild docs

    make html
    open build/html/index.html # open index.html for review in browser

Publish docs

Contributors should ignore the steps below.

  1. Login to https://readthedocs.org/
  2. Run build

Package

Contributors should ignore the steps below.

Prerequisites:

pip install twine

publish

rm -rf build dist py_readability_metrics.egg-info && python setup.py sdist bdist_wheel
twine upload dist/*