Skip to content

anmorgul/python_highlighter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Highlighter

Sample Python application that demonstrate the possibility to find and mark text sequence in web page

Table of contents

Before you go

Before to go you should set up your local environment.

  • Fork repository by clicking the Fork button on the upper right-hand side of the repository’s page. See an example here NOTE! All actions described below MUST be applied to the !!!FORKED!!! repository!!!
  • Clone forked repository to your local system (hint).
  • Go to the project' directory
cd python_highlighter

Install

To install dependencies run:

pip install -r requirements.txt

(Optionally) install highlighter:

pip install -e .

How to run

To run highlighter app (On Windows use set instead of export):

export FLASK_APP=highlighter
flask run

then go to localhost:5000

image

Tests

The application contains tests. To run tests:

pytest -v

Code style check

Code must satisfy PEP008 code style requirements

pylint -r y **/*.py

TODO

NOTE Before to start your work you must should perform all steps described in Before you go section.

CAUTION All actions described below MUST be applied to the !!!FORKED!!! repository!!!

Next, perform steps below:

  • Create dev branch. You can do it either via Pycharm' menu (see the Pycharm how to for details) or via terminal like this:
git checkout master
git pull
git checkout -b dev
  • Add an implementation to methods in the __init__.py module that covers the demands
    • markup_text
    • highlight_text
  • Add tests to the implemented methods in the tests/test_highlighter.py module. You can find examples of tests on Flask testing howto page.
  • Run tests
  • Run code check
  • Commit and push your local changes to the remote git repository. You can do it either via Pycharm view (Ctrl + K) or via terminal
git commit -a -m 'type your commit message here'
git push origin dev
  • Create MR (merge request). See how to do it here
  • Add @onidzelskyi as a collaborator with write access rights.
  • Send the link to the MR to your reviewer

About

Python highlighter app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 77.6%
  • HTML 22.4%