-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from dynobo/refactoring
Complete rewrite
- Loading branch information
Showing
63 changed files
with
3,143 additions
and
1,848 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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: Build AppImage on Linux | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- uses: abatilo/actions-poetry@v2.1.0 | ||
with: | ||
poetry-version: 1.1.5 | ||
- name: Install system deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install \ | ||
libgirepository1.0-dev \ | ||
libcairo2-dev \ | ||
python3-gi \ | ||
gobject-introspection \ | ||
libgtk-3-dev | ||
- name: Poetry install | ||
run: poetry install | ||
- name: Pytest | ||
run: poetry run pytest | ||
- name: Coveralls | ||
run: poetry run coveralls | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} | ||
- name: Build and publish to PyPi-Test | ||
run: | | ||
poetry config repositories.pypi-test https://test.pypi.org/legacy/ | ||
poetry publish \ | ||
--build \ | ||
--repository=pypi-test \ | ||
--username __token__ \ | ||
--password ${{ secrets.PYPI_TEST_KEYHINT_TOKEN }} | ||
- name: Build AppImage | ||
run: poetry run make clean-build | ||
|
||
# Release | ||
- name: Draft release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
linux/*.AppImage | ||
body: See [CHANGELOG](https://github.com/dynobo/kehint/blob/master/CHANGELOG.md) for details. | ||
draft: true | ||
prerelease: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
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,38 @@ | ||
name: Publish | ||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
branches: | ||
- master | ||
jobs: | ||
publish: | ||
name: Publish to PyPi | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- uses: abatilo/actions-poetry@v2.1.0 | ||
with: | ||
poetry-version: 1.1.5 | ||
- name: Install system deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install \ | ||
libgirepository1.0-dev \ | ||
libcairo2-dev \ | ||
python3-gi \ | ||
gobject-introspection \ | ||
libgtk-3-dev | ||
- name: Poetry install | ||
run: poetry install | ||
- name: Pytest | ||
run: poetry run pytest | ||
- name: Build and publish to PyPi | ||
run: | | ||
poetry publish \ | ||
--build \ | ||
--username __token__ \ | ||
--password ${{ secrets.PYPI_KEYHINT_TOKEN }} |
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 |
---|---|---|
@@ -1,71 +1,36 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
test_linux: | ||
name: Test on Linux64 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
# PREPARE | ||
- name: Install Python 3.7 | ||
# Because GitHub Actions' python isn't build against tkinter! | ||
run: sudo apt-get update && sudo apt-get install python3.7 python3.7-dev python3.7-tk python3-setuptools | ||
|
||
- name: Install dependencies | ||
run: python3.7 -m pip install -r requirements-dev.txt | ||
|
||
# LINT | ||
- name: Lint with pylama | ||
run: python3.7 -m pylama | ||
|
||
# TEST | ||
- name: Test with pytest | ||
run: xvfb-run --server-args="-screen 0 1024x768x24+32" python3.7 -m pytest | ||
|
||
# test_macos: | ||
# name: Test on MacOS | ||
# runs-on: macos-latest | ||
# steps: | ||
# - uses: actions/checkout@master | ||
|
||
# # PREPARE | ||
# - name: Install normcap dependencies | ||
# run: brew install pkg-config tesseract-lang | ||
# - name: Install pipenv | ||
# run: python3.7 -m pip install --user pipenv | ||
# - name: Create virtual env | ||
# run: $HOME/Library/Python/3.7/bin/pipenv install --dev | ||
# env: | ||
# CI: true | ||
|
||
# # LINT | ||
# - name: Lint with flake8 | ||
# run: $HOME/Library/Python/3.7/bin/pipenv run flake8 . --count --show-source --statistics | ||
|
||
# # TEST | ||
# - name: Test with pytest | ||
# run: $HOME/Library/Python/3.7/bin/pipenv run python3.7 -m pytest | ||
|
||
test_windows: | ||
name: Test on Windows | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
# PREPARE | ||
- name: Install dependencies | ||
run: python -m pip install -r requirements-dev.txt | ||
|
||
# LINT | ||
- name: Lint with flake8 | ||
run: python -m pylama | ||
|
||
# TEST | ||
- name: Test with pytest | ||
run: python -m pytest | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- uses: abatilo/actions-poetry@v2.1.0 | ||
with: | ||
poetry-version: 1.1.5 | ||
- name: Install system deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install \ | ||
libgirepository1.0-dev \ | ||
libcairo2-dev \ | ||
python3-gi \ | ||
gobject-introspection \ | ||
libgtk-3-dev | ||
- name: Poetry install | ||
run: poetry install | ||
- name: Pylint | ||
run: poetry run pylint ./src | ||
- name: Mypy | ||
run: poetry run mypy ./src | ||
- name: Black | ||
run: poetry run black --check ./src | ||
- name: Isort | ||
run: poetry run isort --check ./src | ||
- name: Pytest | ||
run: poetry run pytest |
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
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,49 @@ | ||
# See https://pre-commit.com/ for usage and config | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: isort | ||
name: isort | ||
stages: [commit] | ||
language: system | ||
entry: poetry run isort | ||
types: [python] | ||
|
||
- id: black | ||
name: black | ||
stages: [commit] | ||
language: system | ||
entry: poetry run black | ||
types: [python] | ||
|
||
- id: pylint | ||
name: pylint | ||
stages: [commit] | ||
language: system | ||
entry: poetry run pylint ./src | ||
types: [python] | ||
pass_filenames: false | ||
|
||
- id: mypy | ||
name: mypy | ||
stages: [commit] | ||
language: system | ||
entry: poetry run mypy | ||
types: [python] | ||
pass_filenames: false | ||
|
||
- id: pytest | ||
name: pytest | ||
stages: [commit] | ||
language: system | ||
entry: poetry run pytest | ||
types: [python] | ||
pass_filenames: false | ||
|
||
# - id: pytest-cov | ||
# name: pytest | ||
# stages: [push] | ||
# language: system | ||
# entry: pipenv run pytest --cov --cov-fail-under=1 | ||
# types: [python] | ||
# pass_filenames: false |
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,19 @@ | ||
# Changelog | ||
|
||
## v0.2.0 (2021-04-03) | ||
|
||
**Changes:** | ||
- Complete rewrite | ||
- Drop support for Windows (for now) | ||
- Use GTK+ framework | ||
|
||
## v0.1.3 (2020-10-18) | ||
|
||
**Changes:** | ||
- Switch to TKinter | ||
- Speed improvements | ||
|
||
## v0.1.0 (2020-05-15) | ||
|
||
**Changes:** | ||
- Initial version |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.