Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and test

on: [push]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# 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: Lint with pylint
run: |
pylint $(git ls-files '*.py')
- name: Test with pytest
run: |
pytest
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Usage examples
The following examples assume a `credentials.json` file in the project
directory.

1. To analyze the messages of your inbox with resepect to their sender
1. To analyze the messages of your inbox with respect to their sender
domains and to see the envisaged label structure (without actually
creating labels), call

Expand Down Expand Up @@ -98,7 +98,7 @@ directory.
inbox contains multiple messages from the domain `foobar` and a
label called `test/foobar` is existing, it will be displayed as
matching target label. Only the lowest hierarchy level will be used
for name comparision, i.e., a label called `foobar/test` will not be
for name comparison, i.e., a label called `foobar/test` will not be
displayed as match.

If the messages from each domain shall be sorted under their
Expand Down
4 changes: 4 additions & 0 deletions gmailsort_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# TODO add real tests
def test_first_dummy_test():
my_variable = "abc"
assert "abc" == my_variable
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ google-auth-oauthlib
tldextract
progress
ftfy
argcomplete
argcomplete
flake8
pytest
pylint