Skip to content

Commit

Permalink
Merge pull request #152 from LeMyst/rewrite-wbi
Browse files Browse the repository at this point in the history
⚡Rewrite WikibaseIntegrator
  • Loading branch information
LeMyst authored Jul 14, 2022
2 parents 231df01 + d91f205 commit 92c9680
Show file tree
Hide file tree
Showing 154 changed files with 7,785 additions and 4,344 deletions.
25 changes: 25 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .coveragerc to control coverage.py
[run]
branch = True

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

# Don't complain about TYPE_CHECKING specific imports:
if TYPE_CHECKING:

ignore_errors = True
15 changes: 13 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
version: 2
updates:

# Maintain dependencies for pip
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
assignees:
- "LeMyst"
open-pull-requests-limit: 10

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
assignees:
- "LeMyst"
open-pull-requests-limit: 10

# Maintain dependencies for pip
# Maintain dependencies for documentation
- package-ecosystem: "pip"
directory: "/"
directory: "/docs/"
schedule:
interval: "daily"
assignees:
- "LeMyst"
open-pull-requests-limit: 10
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: '3.10'

- name: Install pypa/build
run: >-
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Python Code Quality and Lint

on:
push:
branches: [ master ]
paths:
- 'wikibaseintegrator/**.py'
- 'test/**.py'
pull_request:
branches: [ '**' ]
paths:
- 'wikibaseintegrator/**.py'
- 'test/**.py'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]

- name: Set up Python 3.10
uses: actions/[email protected]
with:
python-version: '3.10'

- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Upgrade setup tools
run: |
python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: |
python -m pip install .[dev]
- name: isort imports check
run: |
python -m isort --check --diff wikibaseintegrator test
- name: mypy typing check
run: |
python -m mypy --install-types --non-interactive
- name: pylint code linting
run: |
python -m pylint wikibaseintegrator test || pylint-exit $?
- name: codespell spell checking
run: |
codespell wikibaseintegrator test
- name: flynt string formatter converting
run: |
python -m flynt -f wikibaseintegrator test
Original file line number Diff line number Diff line change
@@ -1,45 +1,59 @@
name: Python package

on:
push:
branches: [ master ]
pull_request:
branches: [ '**' ]

jobs:
build:
name: pytest ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11-dev' ]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Upgrade setup tools
run: |
python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: |
python -m pip install .[dev]
- name: Test with pytest
run: |
python -m pytest
name: Python pytest

on:
push:
branches: [ master ]
paths:
- 'wikibaseintegrator/**.py'
- 'test/**.py'
- 'setup.cfg'
- 'setup.py'
- 'requirements.txt'
- 'pyproject.toml'
pull_request:
branches: [ '**' ]
paths:
- 'wikibaseintegrator/**.py'
- 'test/**.py'
- 'setup.cfg'
- 'setup.py'
- 'requirements.txt'
- 'pyproject.toml'

jobs:
build:
name: pytest ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10' ] # '3.11-dev'

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Upgrade setup tools
run: |
python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: |
python -m pip install .[dev]
- name: Test with pytest
run: |
python -m pytest
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,8 @@ fabric.properties
# Idea pylint plugin configuration file
.idea/pylint.xml

# Completely remove .idea folder
.idea

# Other stuff
/drafts/
24 changes: 0 additions & 24 deletions .idea/WikibaseIntegrator.iml

This file was deleted.

5 changes: 0 additions & 5 deletions .idea/codeStyles/codeStyleConfig.xml

This file was deleted.

50 changes: 0 additions & 50 deletions .idea/inspectionProfiles/WikibaseIntegrator.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/vagrant.xml

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/vcs.xml

This file was deleted.

Loading

0 comments on commit 92c9680

Please sign in to comment.