-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added demodata and extractor classes. initla pre commit setup
- Loading branch information
Showing
8 changed files
with
594 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ __pycache__/ | |
*.py[cod] | ||
*$py.class | ||
flash-geotext.code-workspace | ||
*.ipynb | ||
|
||
# C extensions | ||
*.so | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-json | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- repo: https://github.com/psf/black | ||
rev: 19.3b0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v1.2.3 | ||
hooks: | ||
- id: flake8 | ||
args: ["--ignore=E203,W503,E501"] | ||
- repo: https://github.com/asottile/reorder_python_imports | ||
rev: v1.4.0 | ||
hooks: | ||
- id: reorder-python-imports | ||
language_version: python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
language: python | ||
python: | ||
- "3.6" | ||
- "3.7" | ||
|
||
# command to install dependencies | ||
install: | ||
- pip install -e . | ||
|
||
# command to run tests | ||
script: pytest -v |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from flashtext import KeywordProcessor | ||
|
||
|
||
class Alphabets(object): | ||
pass | ||
|
||
|
||
class DemoData(object): | ||
cities: list = [] | ||
countries: list = [] | ||
|
||
def __init__(self): | ||
pass | ||
|
||
|
||
class Extractor(object): | ||
cities: KeywordProcessor = KeywordProcessor | ||
countries: KeywordProcessor = KeywordProcessor | ||
|
||
def __init__(self): | ||
pass |
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from flashgeotext.extractor import DemoData | ||
from flashgeotext.extractor import Extractor | ||
|
||
|
||
def test_extractor_import(): | ||
ext = Extractor() | ||
assert ext | ||
assert hasattr(ext, "cities") | ||
assert hasattr(ext, "countries") | ||
|
||
|
||
def test_demodata_content(): | ||
demodata = DemoData() | ||
|
||
assert hasattr(demodata, "cities") | ||
assert hasattr(demodata, "countries") |