-
Notifications
You must be signed in to change notification settings - Fork 17
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 #152 from LeMyst/rewrite-wbi
⚡Rewrite WikibaseIntegrator
- Loading branch information
Showing
154 changed files
with
7,785 additions
and
4,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 |
---|---|---|
@@ -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 |
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,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 |
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,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 |
104 changes: 59 additions & 45 deletions
104
.github/workflows/python-package.yml → .github/workflows/python-pytest.yml
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,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 |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.