Skip to content

Commit 12e6738

Browse files
committed
Merge branch 'master' into add-github-service
2 parents 74408e2 + 9bc5882 commit 12e6738

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1146
-595
lines changed
Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
name: "CodeQL"
1+
name: "Code Scanning - Action"
72

83
on:
94
#push:
@@ -15,48 +10,44 @@ on:
1510
- cron: '0 16 */2 * *'
1611

1712
jobs:
18-
analyze:
19-
name: Analyze
13+
CodeQL-Build:
14+
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
2015
runs-on: ubuntu-latest
2116

22-
strategy:
23-
fail-fast: false
24-
matrix:
25-
# Override automatic language detection by changing the below list
26-
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
27-
language: [ 'python' ]
28-
# Learn more...
29-
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
17+
permissions:
18+
# required for all workflows
19+
security-events: write
20+
21+
# only required for workflows in private repositories
22+
actions: read
23+
contents: read
3024

3125
steps:
3226
- name: Checkout repository
3327
uses: actions/checkout@v3
3428

3529
# Initializes the CodeQL tools for scanning.
3630
- name: Initialize CodeQL
37-
uses: github/codeql-action/init@v1
31+
uses: github/codeql-action/init@v2
32+
# Override language selection by uncommenting this and choosing your languages
3833
with:
39-
languages: ${{ matrix.language }}
40-
# If you wish to specify custom queries, you can do so here or in a config file.
41-
# By default, queries listed here will override any specified in a config file.
42-
# Prefix the list here with "+" to use these queries and those in the config file.
43-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
44-
45-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
46-
# If this step fails, then you should remove it and run the build manually (see below)
34+
languages: python
35+
36+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
37+
# If this step fails, then you should remove it and run the build manually (see below).
4738
- name: Autobuild
48-
uses: github/codeql-action/autobuild@v1
39+
uses: github/codeql-action/autobuild@v2
4940

5041
# ℹ️ Command-line programs to run using the OS shell.
5142
# 📚 https://git.io/JvXDl
5243

53-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
54-
# and modify them (or add more) to build your code if your project
55-
# uses a compiled language
44+
# ✏️ If the Autobuild fails above, remove it and uncomment the following
45+
# three lines and modify them (or add more) to build your code if your
46+
# project uses a compiled language
5647

5748
#- run: |
58-
# make bootstrap
59-
# make release
49+
# make bootstrap
50+
# make release
6051

6152
- name: Perform CodeQL Analysis
62-
uses: github/codeql-action/analyze@v1
53+
uses: github/codeql-action/analyze@v2

.github/workflows/publish-to-pypi.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,36 @@ jobs:
88
build-n-publish:
99
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
1010
runs-on: ubuntu-latest
11+
1112
steps:
1213
- uses: actions/checkout@v3
1314
- name: Set up Python 3.10
14-
uses: actions/setup-python@v3
15+
uses: actions/setup-python@v4
1516
with:
1617
python-version: '3.10'
18+
1719
- name: Install pypa/build
1820
run: >-
1921
python -m
2022
pip install
2123
build
2224
--user
25+
2326
- name: Build a binary wheel and a source tarball
2427
run: >-
2528
python -m
2629
build
2730
--sdist
2831
--wheel
2932
.
33+
3034
- name: Publish distribution 📦 to Test PyPI
3135
uses: pypa/gh-action-pypi-publish@v1.5.0
3236
with:
3337
user: __token__
3438
password: ${{ secrets.test_pypi_password }}
3539
repository_url: https://test.pypi.org/legacy/
40+
3641
- name: Publish distribution 📦 to PyPI
3742
if: startsWith(github.ref, 'refs/tags')
3843
uses: pypa/gh-action-pypi-publish@v1.5.0

.github/workflows/python-lint.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,60 @@ name: Python Code Quality and Lint
33
on:
44
push:
55
branches: [ master ]
6+
paths:
7+
- 'wikibaseintegrator/**.py'
8+
- 'test/**.py'
69
pull_request:
710
branches: [ '**' ]
11+
paths:
12+
- 'wikibaseintegrator/**.py'
13+
- 'test/**.py'
814

915
jobs:
1016
build:
1117
runs-on: ubuntu-latest
1218

1319
steps:
1420
- uses: actions/checkout@v2.4.0
21+
1522
- name: Set up Python 3.10
1623
uses: actions/setup-python@v2.3.1
1724
with:
1825
python-version: '3.10'
26+
1927
- name: Cache pip
20-
uses: actions/cache@v2.1.7
28+
uses: actions/cache@v3
2129
with:
2230
path: ~/.cache/pip
2331
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
2432
restore-keys: |
2533
${{ runner.os }}-pip-
2634
${{ runner.os }}-
35+
2736
- name: Upgrade setup tools
2837
run: |
2938
python -m pip install --upgrade pip setuptools
39+
3040
- name: Install dependencies
3141
run: |
3242
python -m pip install .[dev]
43+
3344
- name: isort imports check
3445
run: |
3546
python -m isort --check --diff wikibaseintegrator test
47+
3648
- name: mypy typing check
3749
run: |
3850
python -m mypy --install-types --non-interactive
51+
3952
- name: pylint code linting
4053
run: |
4154
python -m pylint wikibaseintegrator test || pylint-exit $?
55+
56+
- name: codespell spell checking
57+
run: |
58+
codespell wikibaseintegrator test
59+
60+
- name: flynt string formatter converting
61+
run: |
62+
python -m flynt -f wikibaseintegrator test

.github/workflows/python-pytest.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,28 @@ name: Python pytest
33
on:
44
push:
55
branches: [ master ]
6+
paths:
7+
- 'wikibaseintegrator/**.py'
8+
- 'test/**.py'
9+
- 'setup.cfg'
10+
- 'setup.py'
11+
- 'requirements.txt'
12+
- 'pyproject.toml'
613
pull_request:
714
branches: [ '**' ]
15+
paths:
16+
- 'wikibaseintegrator/**.py'
17+
- 'test/**.py'
18+
- 'setup.cfg'
19+
- 'setup.py'
20+
- 'requirements.txt'
21+
- 'pyproject.toml'
822

923
jobs:
1024
build:
1125
name: pytest ${{ matrix.python-version }}/${{ matrix.mediawiki-version }}
1226
runs-on: ubuntu-latest
27+
1328
strategy:
1429
matrix:
1530
python-version: [ '3.7', '3.8', '3.9', '3.10' ] # 3.11-dev
@@ -24,23 +39,27 @@ jobs:
2439
env:
2540
WIKIBASE_BUNDLE_IMAGE_NAME: wikibase/wikibase-bundle:${{ matrix.mediawiki-version }}
2641
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v3
42+
uses: actions/setup-python@v4
2843
with:
2944
python-version: ${{ matrix.python-version }}
45+
3046
- name: Cache pip
31-
uses: actions/cache@v2.1.7
47+
uses: actions/cache@v3
3248
with:
3349
path: ~/.cache/pip
3450
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
3551
restore-keys: |
3652
${{ runner.os }}-pip-
3753
${{ runner.os }}-
54+
3855
- name: Upgrade setup tools
3956
run: |
4057
python -m pip install --upgrade pip setuptools
58+
4159
- name: Install dependencies
4260
run: |
4361
python -m pip install .[dev]
62+
4463
- name: Test with pytest
4564
run: |
4665
python -m pytest

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,8 @@ fabric.properties
157157
# Idea pylint plugin configuration file
158158
.idea/pylint.xml
159159

160+
# Completely remove .idea folder
161+
.idea
162+
160163
# Other stuff
161164
/drafts/

.idea/WikibaseIntegrator.iml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.idea/inspectionProfiles/WikibaseIntegrator.xml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/misc.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)