Browse code

Bump required Python version to 3.11

Joseph Weston authored on 01/11/2023 04:28:45
Showing 1 changed files
... ...
@@ -1,19 +1,17 @@
1 1
 [tox]
2 2
 isolated_build = True
3
-envlist = clean,py{38,39},report
3
+envlist = clean,py{311},report
4 4
 
5 5
 [gh-actions]
6 6
 python =
7
-  3.8: clean,py38,report
8
-  3.9: clean,py39,report
7
+  3.11: clean,py311,report
9 8
 
10 9
 [pytest]
11 10
 addopts =
12 11
   --durations=5
13
-  --cov --cov-append --cov-fail-under=100 --cov-report=
12
+  --cov --cov-append --cov-fail-under=90 --cov-report=
14 13
   --black
15 14
   --mypy
16
-  --flake8
17 15
 norecursedirs =
18 16
   docs
19 17
 
... ...
@@ -38,8 +36,8 @@ output = .coverage.xml
38 36
 deps = .[test]
39 37
 commands = pytest
40 38
 depends =
41
-  {py38,py39}: clean
42
-  report: {py38,py39}
39
+  {py311}: clean
40
+  report: {py311}
43 41
 
44 42
 [testenv:report]
45 43
 deps = coverage
Browse code

Upgrade requirements to Python 3.8

Joseph Weston authored on 13/09/2021 02:02:38
Showing 1 changed files
... ...
@@ -1,11 +1,11 @@
1 1
 [tox]
2 2
 isolated_build = True
3
-envlist = clean,py{36,37},report
3
+envlist = clean,py{38,39},report
4 4
 
5 5
 [gh-actions]
6 6
 python =
7
-  3.6: clean,py36,report
8
-  3.7: clean,py37,report
7
+  3.8: clean,py38,report
8
+  3.9: clean,py39,report
9 9
 
10 10
 [pytest]
11 11
 addopts =
... ...
@@ -38,8 +38,8 @@ output = .coverage.xml
38 38
 deps = .[test]
39 39
 commands = pytest
40 40
 depends =
41
-  {py36,py37}: clean
42
-  report: {py36,py37}
41
+  {py38,py39}: clean
42
+  report: {py38,py39}
43 43
 
44 44
 [testenv:report]
45 45
 deps = coverage
Browse code

fix flake8 config and re-enable pre-commit flake8

Joseph Weston authored on 17/12/2019 10:55:22
Showing 1 changed files
... ...
@@ -67,7 +67,7 @@ ignore =
67 67
   W503,
68 68
 per-file-ignores =
69 69
   __init__.py: F401
70
--max-complexity = 18
70
+max-complexity = 18
71 71
 select = B, C, E, F, W, T4, B9
72 72
 exclude =
73 73
   .git,
Browse code

update tox config so that coverage still works

Joseph Weston authored on 30/11/2019 18:54:13
Showing 1 changed files
... ...
@@ -19,14 +19,13 @@ norecursedirs =
19 19
 
20 20
 [coverage:paths]
21 21
 source =
22
-  qsim
23
-  .tox/py*/lib/python*/site-packages/qsim/
22
+  src
23
+  .tox/py*/lib/python*/site-packages
24 24
 
25 25
 [coverage:run]
26 26
 branch = true
27 27
 parallel = true
28
-omit = tests/*
29
-include = qsim/*
28
+source = qsim
30 29
 
31 30
 [coverage:report]
32 31
 show_missing = true
Browse code

Add test durations to tox output

Joseph Weston authored on 10/11/2019 18:06:56
Showing 1 changed files
... ...
@@ -9,6 +9,7 @@ python =
9 9
 
10 10
 [pytest]
11 11
 addopts =
12
+  --durations=5
12 13
   --cov --cov-append --cov-fail-under=100 --cov-report=
13 14
   --black
14 15
   --mypy
Browse code

Make tests fail if coverage is less than 100%

Joseph Weston authored on 10/11/2019 16:39:21
Showing 1 changed files
... ...
@@ -9,7 +9,7 @@ python =
9 9
 
10 10
 [pytest]
11 11
 addopts =
12
-  --cov --cov-append --cov-report=
12
+  --cov --cov-append --cov-fail-under=100 --cov-report=
13 13
   --black
14 14
   --mypy
15 15
   --flake8
Browse code

Update tox.ini

Joseph Weston authored on 10/11/2019 09:38:29
Showing 1 changed files
... ...
@@ -8,8 +8,13 @@ python =
8 8
   3.7: clean,py37,report
9 9
 
10 10
 [pytest]
11
-addopts = --black --mypy --flake8 --cov --cov-append
12
-testpaths = qsim tests
11
+addopts =
12
+  --cov --cov-append --cov-report=
13
+  --black
14
+  --mypy
15
+  --flake8
16
+norecursedirs =
17
+  docs
13 18
 
14 19
 [coverage:paths]
15 20
 source =
... ...
@@ -19,8 +24,8 @@ source =
19 24
 [coverage:run]
20 25
 branch = true
21 26
 parallel = true
22
-include =
23
-  .tox/py*/lib/python*/site-packages/qsim/*
27
+omit = tests/*
28
+include = qsim/*
24 29
 
25 30
 [coverage:report]
26 31
 show_missing = true
... ...
@@ -61,7 +66,7 @@ ignore =
61 66
   E501,
62 67
   W503,
63 68
 per-file-ignores =
64
-  qsim/__init__.py: F401
69
+  __init__.py: F401
65 70
 -max-complexity = 18
66 71
 select = B, C, E, F, W, T4, B9
67 72
 exclude =
Browse code

Remove coverage report display during test run

Coverage reports are generated by the "report" test environment

Joseph Weston authored on 10/11/2019 09:13:21
Showing 1 changed files
... ...
@@ -8,7 +8,7 @@ python =
8 8
   3.7: clean,py37,report
9 9
 
10 10
 [pytest]
11
-addopts = --black --mypy --flake8 --cov --cov-append --cov-report term-missing
11
+addopts = --black --mypy --flake8 --cov --cov-append
12 12
 testpaths = qsim tests
13 13
 
14 14
 [coverage:paths]
Browse code

Add pytest-black configuration

Joseph Weston authored on 10/11/2019 09:13:03
Showing 1 changed files
... ...
@@ -8,7 +8,7 @@ python =
8 8
   3.7: clean,py37,report
9 9
 
10 10
 [pytest]
11
-addopts = --mypy --flake8 --cov --cov-append --cov-report term-missing
11
+addopts = --black --mypy --flake8 --cov --cov-append --cov-report term-missing
12 12
 testpaths = qsim tests
13 13
 
14 14
 [coverage:paths]
Browse code

Add mypy configuration

Joseph Weston authored on 09/11/2019 16:36:39
Showing 1 changed files
... ...
@@ -8,7 +8,8 @@ python =
8 8
   3.7: clean,py37,report
9 9
 
10 10
 [pytest]
11
-addopts = --flake8 --cov --cov-append --cov-report term-missing
11
+addopts = --mypy --flake8 --cov --cov-append --cov-report term-missing
12
+testpaths = qsim tests
12 13
 
13 14
 [coverage:paths]
14 15
 source =
Browse code

[docs] Set up documentation source and building machinery

Joseph Weston authored on 09/11/2019 13:59:02
Showing 1 changed files
... ...
@@ -47,6 +47,11 @@ deps = coverage
47 47
 skip_install = true
48 48
 commands = coverage erase
49 49
 
50
+[testenv:docs]
51
+changedir=docs
52
+deps = .[docs]
53
+commands = sphinx-build . _build
54
+
50 55
 [flake8]
51 56
 max-line-length = 100
52 57
 ignore =
Browse code

Add test configuration

Joseph Weston authored on 09/11/2019 00:48:03
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,65 @@
1
+[tox]
2
+isolated_build = True
3
+envlist = clean,py{36,37},report
4
+
5
+[gh-actions]
6
+python =
7
+  3.6: clean,py36,report
8
+  3.7: clean,py37,report
9
+
10
+[pytest]
11
+addopts = --flake8 --cov --cov-append --cov-report term-missing
12
+
13
+[coverage:paths]
14
+source =
15
+  qsim
16
+  .tox/py*/lib/python*/site-packages/qsim/
17
+
18
+[coverage:run]
19
+branch = true
20
+parallel = true
21
+include =
22
+  .tox/py*/lib/python*/site-packages/qsim/*
23
+
24
+[coverage:report]
25
+show_missing = true
26
+precision = 2
27
+
28
+[coverage:xml]
29
+output = .coverage.xml
30
+
31
+[testenv]
32
+deps = .[test]
33
+commands = pytest
34
+depends =
35
+  {py36,py37}: clean
36
+  report: {py36,py37}
37
+
38
+[testenv:report]
39
+deps = coverage
40
+skip_install = true
41
+commands =
42
+    coverage report
43
+    coverage xml
44
+
45
+[testenv:clean]
46
+deps = coverage
47
+skip_install = true
48
+commands = coverage erase
49
+
50
+[flake8]
51
+max-line-length = 100
52
+ignore =
53
+  E203,
54
+  E266,
55
+  E501,
56
+  W503,
57
+per-file-ignores =
58
+  qsim/__init__.py: F401
59
+-max-complexity = 18
60
+select = B, C, E, F, W, T4, B9
61
+exclude =
62
+  .git,
63
+  .tox,
64
+  __pycache__,
65
+  dist,