Skip to content

Commit

Permalink
Merge branch 'master' into autodeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
AntiCompositeNumber committed Dec 11, 2019
2 parents e34b664 + 30f51af commit 0e4e279
Show file tree
Hide file tree
Showing 27 changed files with 1,367 additions and 542 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Python application

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install pytest
pip install coverage
coverage run -m pytest
- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.coveralls_repo_key }}
run: |
pip install coveralls
coveralls
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ __pycache__/
venv/
config.json
*.log
.coverage
29 changes: 29 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
certifi = "*"
chardet = "*"
click = "*"
idna = "*"
itsdangerous = "*"
mwparserfromhell = "*"
python-stdnum = "*"
requests = "*"
urllib3 = "*"
pywikibot = "*"
fuzzywuzzy = "*"
pytest = "*"
Flask = "*"
Jinja2 = "*"
MarkupSafe = "*"
PyMySQL = "*"
Werkzeug = "*"
python-Levenshtein = "*"

[requires]
python_version = "3.7"
269 changes: 269 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
# AntiCompositeTools
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/AntiCompositeNumber/anticompositetools/Python%20application) ![Uptime Robot status](https://img.shields.io/uptimerobot/status/m783972628-037856cb670609254a10c883?label=website%20status) [![Coverage Status](https://coveralls.io/repos/github/AntiCompositeNumber/anticompositetools/badge.svg?branch=master)](https://coveralls.io/github/AntiCompositeNumber/anticompositetools?branch=master)

A group of tools built for the English Wikipedia and other Wikimedia projects, written in Python using Flask and running on Wikimedia Toolforge.

## Hyphenator
https://tools.wmflabs.org/anticompositetools/hyphenator
Normlises the format of ISBNs using [python-stdnum](https://arthurdejong.org/python-stdnum/).

Uses:
* [requests](https://2.python-requests.org/en/master/)
* [mwparserfromhell](https://github.com/earwig/mwparserfromhell)
* [stdnum](https://github.com/arthurdejong/python-stdnum)

## CiteInspector
https://tools.wmflabs.org/anticompositetools/citeinspector
Compares existing citations in an article to data from Citoid.

Uses:
* [requests](https://2.python-requests.org/en/master/)
* [mwparserfromhell](https://github.com/earwig/mwparserfromhell)
* [fuzzywuzzy](https://github.com/seatgeek/fuzzywuzzy)
28 changes: 28 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
attrs==19.3.0
certifi==2019.11.28
chardet==3.0.4
Click==7.0
Flask==1.1.1
fuzzywuzzy==0.17.0
idna==2.8
importlib-metadata==1.2.0
itsdangerous==1.1.0
Jinja2==2.10.3
MarkupSafe==1.1.1
more-itertools==8.0.2
mwparserfromhell==0.5.4
packaging==19.2
pluggy==0.13.1
py==1.8.0
PyMySQL==0.9.3
pyparsing==2.4.5
pytest==5.3.1
python-Levenshtein==0.12.0
python-stdnum==1.12
pywikibot
requests==2.22.0
six==1.13.0
urllib3==1.25.7
wcwidth==0.1.7
Werkzeug==0.16.0
zipp==0.6.0
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[coverage:run]
branch = True
source =
src

0 comments on commit 0e4e279

Please sign in to comment.