Skip to content

Commit 52d5a7a

Browse files
committed
Code unification & restore windows build
1 parent 9776595 commit 52d5a7a

File tree

15 files changed

+108
-160
lines changed

15 files changed

+108
-160
lines changed

.azure_pipelines/run_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- script: |
4747
pip install pytest pytest-sugar pytest-cov
4848
49-
pytest -vvv --junitxml=unit_result.xml --cov=threaded --cov-report=xml --cov-report=html --cov-report term test
49+
pytest --junitxml=unit_result.xml --cov=threaded --cov-report=xml --cov-report=html --cov-report term test
5050
displayName: PyTest
5151
5252
- task: PublishTestResults@2

.coveragerc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[run]
22
source =
3-
threaded
3+
threaded
44
omit =
5-
test/*
5+
test/*
66
branch = True
77
[report]
88
exclude_lines =

.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ jobs:
2828
python setup.py develop -v
2929
- name: Test with pytest
3030
run: |
31-
py.test -vvv --cov-config .coveragerc --cov-report= --cov=threaded test
31+
py.test --cov-config .coveragerc --cov-report= --cov=threaded test
3232
coverage report -m --fail-under 90

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### Test results
22
/*_result*.xml
33
/report.html
4+
/mypy_report
45
/assets/*
56
.cache/*
67
.pytest_cache/*
@@ -10,7 +11,7 @@
1011

1112
### Generated code
1213
/threaded/*.c
13-
/pip-wheel-metadata/
14+
/pip-wheel-metadata
1415
### TortoiseGit template
1516
# Project-level settings
1617
/.tgitconfig

.pylintrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,9 @@ enable=all
6666

6767
disable=non-ascii-bytes-literal,
6868
raw-checker-failed,
69-
bad-inline-option,
7069
locally-disabled,
7170
file-ignored,
7271
suppressed-message,
73-
no-absolute-import,
74-
old-division,
7572
comprehension-escape,
7673
similarities,
7774
too-many-ancestors,
@@ -83,6 +80,7 @@ disable=non-ascii-bytes-literal,
8380
too-many-locals,
8481
too-many-statements,
8582
too-many-instance-attributes,
83+
too-many-lines,
8684
misplaced-comparison-constant,
8785
bad-continuation,
8886
broad-except,

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ _helpers:
2121
- &install_cython pip install --upgrade Cython
2222
- &build_package python setup.py bdist_wheel
2323
- &install_built pip install threaded --no-index -f dist
24-
- &test_no_cov py.test -vv test
24+
- &test_no_cov py.test -vvv test
2525
- &test_cythonized
2626
stage: Test cythonized
2727
install:
@@ -47,7 +47,7 @@ _helpers:
4747

4848
script:
4949
- python setup.py develop -v
50-
- py.test -vv --cov-config .coveragerc --cov-report= --cov=threaded test
50+
- py.test --cov-config .coveragerc --cov-report= --cov=threaded test
5151
- coverage report -m --fail-under 87
5252
after_success:
5353
- coveralls
@@ -75,7 +75,7 @@ jobs:
7575
install:
7676
- *upgrade_python_toolset
7777
- *install_deps
78-
- pip install --upgrade "mypy >= 0.700"
78+
- pip install --upgrade "mypy >= 0.720"
7979
script:
8080
- python setup.py --version
8181
- mypy --strict threaded

azure-pipelines.yml

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
displayName: 'Install dependencies'
2121
2222
- script: |
23-
pytest -vvv --flake8 -m flake8 --junitxml=flake8_result.xml threaded
23+
pytest --flake8 -m flake8 --junitxml=flake8_result.xml threaded
2424
displayName: 'PEP8'
2525
2626
- task: PublishTestResults@2
@@ -74,7 +74,7 @@ jobs:
7474
python -m pip install --upgrade pip
7575
pip install -U setuptools
7676
pip install -r requirements.txt
77-
pip install -U mypy
77+
pip install -U "mypy>=0.700"
7878
displayName: 'Install dependencies'
7979
8080
- script: |
@@ -98,66 +98,66 @@ jobs:
9898
- template: .azure_pipelines/run_tests.yml
9999
parameters: {name: 'Python_37', python: '3.7', architecture: 'x64', kind: 'native'}
100100

101-
# - template: .azure_pipelines/run_tests.yml
102-
# parameters: {name: 'Python_36', python: '3.6', architecture: 'x64', kind: 'cython'}
103-
# - template: .azure_pipelines/run_tests.yml
104-
# parameters: {name: 'Python_36', python: '3.6', architecture: 'x86', kind: 'cython'}
105-
# - template: .azure_pipelines/run_tests.yml
106-
# parameters: {name: 'Python_37', python: '3.7', architecture: 'x64', kind: 'cython'}
107-
# - template: .azure_pipelines/run_tests.yml
108-
# parameters: {name: 'Python_37', python: '3.7', architecture: 'x86', kind: 'cython'}
109-
110-
111-
# - job: 'Build_and_deploy'
112-
# dependsOn:
113-
# - Python_36_x64_native
114-
# - Python_37_x64_native
115-
#
116-
## - Python_36_x64_cython
117-
## - Python_36_x86_cython
118-
## - Python_37_x64_cython
119-
## - Python_37_x86_cython
120-
# condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
121-
# pool:
122-
# vmIMage: 'VS2017-Win2016'
123-
# strategy:
124-
# maxParallel: 6
125-
# matrix:
126-
# Python36_x64:
127-
# python.version: '3.6'
128-
# python.architecture: 'x64'
129-
# Python36_x86:
130-
# python.version: '3.6'
131-
# python.architecture: 'x86'
132-
# Python37_x64:
133-
# python.version: '3.7'
134-
# python.architecture: 'x64'
135-
# Python37_x86:
136-
# python.version: '3.7'
137-
# python.architecture: 'x86'
138-
#
139-
# steps:
140-
# - task: UsePythonVersion@0
141-
# inputs:
142-
# versionSpec: '$(python.version)'
143-
# architecture: '$(python.architecture)'
144-
#
145-
# - script: |
146-
# python -m pip install --upgrade pip
147-
# pip install -U setuptools
148-
# pip install -r build_requirements.txt
149-
# displayName: 'Install dependencies'
150-
#
151-
# - script: |
152-
# python setup.py bdist_wheel
153-
# displayName: 'Build'
154-
#
155-
# - task: TwineAuthenticate@0
156-
# displayName: 'Twine Authenticate '
157-
# inputs:
158-
# externalFeeds: PyPI
159-
#
160-
# - script: |
161-
# pip install -U twine
162-
# twine upload -r PyPI --config-file $(PYPIRC_PATH) dist/threaded-* --skip-existing
163-
# displayName: 'Deploy'
101+
- template: .azure_pipelines/run_tests.yml
102+
parameters: {name: 'Python_36', python: '3.6', architecture: 'x64', kind: 'cython'}
103+
- template: .azure_pipelines/run_tests.yml
104+
parameters: {name: 'Python_36', python: '3.6', architecture: 'x86', kind: 'cython'}
105+
- template: .azure_pipelines/run_tests.yml
106+
parameters: {name: 'Python_37', python: '3.7', architecture: 'x64', kind: 'cython'}
107+
- template: .azure_pipelines/run_tests.yml
108+
parameters: {name: 'Python_37', python: '3.7', architecture: 'x86', kind: 'cython'}
109+
110+
111+
- job: 'Build_and_deploy'
112+
dependsOn:
113+
- Python_36_x64_native
114+
- Python_37_x64_native
115+
116+
- Python_36_x64_cython
117+
- Python_36_x86_cython
118+
- Python_37_x64_cython
119+
- Python_37_x86_cython
120+
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
121+
pool:
122+
vmIMage: 'VS2017-Win2016'
123+
strategy:
124+
maxParallel: 6
125+
matrix:
126+
Python36_x64:
127+
python.version: '3.6'
128+
python.architecture: 'x64'
129+
Python36_x86:
130+
python.version: '3.6'
131+
python.architecture: 'x86'
132+
Python37_x64:
133+
python.version: '3.7'
134+
python.architecture: 'x64'
135+
Python37_x86:
136+
python.version: '3.7'
137+
python.architecture: 'x86'
138+
139+
steps:
140+
- task: UsePythonVersion@0
141+
inputs:
142+
versionSpec: '$(python.version)'
143+
architecture: '$(python.architecture)'
144+
145+
- script: |
146+
python -m pip install --upgrade pip
147+
pip install -U setuptools
148+
pip install -r build_requirements.txt
149+
displayName: 'Install dependencies'
150+
151+
- script: |
152+
python setup.py bdist_wheel
153+
displayName: 'Build'
154+
155+
- task: TwineAuthenticate@0
156+
displayName: 'Twine Authenticate '
157+
inputs:
158+
externalFeeds: PyPI
159+
160+
- script: |
161+
pip install -U twine
162+
twine upload -r PyPI --config-file $(PYPIRC_PATH) dist/threaded-* --skip-existing
163+
displayName: 'Deploy'

build_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Cython; platform_python_implementation == "CPython"
2-
wheel<0.32.0
2+
wheel==0.31.1
33
-r CI_REQUIREMENTS.txt
44
-r requirements.txt

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Minimum requirements for the build system to execute.
33
# PEP 508 specifications for PEP 518.
44
requires = [
5-
"setuptools >= 21.0.0,!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,!=36.2.0",
5+
"setuptools >= 21.0.0,!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,!=36.2.0", # PSF/ZPL
66
"wheel",
7-
"setuptools_scm"
7+
"setuptools_scm",
88
]
99
build-backend="setuptools.build_meta"
1010

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[pytest]
22
addopts = -vvv -s -p no:django -p no:ipdb
33
testpaths = test
4+
mock_use_standalone_module = false

0 commit comments

Comments
 (0)