Skip to content

Commit 04520d7

Browse files
CI: Setup min_versions job (#27)
1 parent ce52cad commit 04520d7

File tree

11 files changed

+120
-58
lines changed

11 files changed

+120
-58
lines changed

.auto-changelog-template.hbs

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Introduction
99
• The types feat:, fix:, chore:, docs:, refactor:, test:, style:, perf: must be at the beginning of the commit subject with an : on end.
1010
• They can optionally have a scope set to outline the module or component that is affected eg feat(bldAssess):
1111
• There is a short hash on the end of every commit that is currently commented out so that change log did not grow too long (due to some system's file size limitations). You can uncomment if you wish [`{{shorthash}}`]({{href}})
12+
1213
Example Definitions
1314
• feat: A new feature
1415
• fix: A bug fix
@@ -30,6 +31,10 @@ Example Definitions
3031
"replaceText": {
3132
"([bB]reaking:)": "",
3233
"([bB]reaking change:)": "",
34+
"(^[bB]uild:)": "",
35+
"(^[bB]uild\\()": "\\(",
36+
"(^[dD]eprecate:)": "",
37+
"(^[dD]eprecate\\()": "\\(",
3338
"(^[fF]eat:)": "",
3439
"(^[fF]eat\\()": "\\(",
3540
"(^[fF]ix:)": "",
@@ -59,7 +64,7 @@ Example Definitions
5964
\s = whitespace
6065
. = any character except newline
6166
| = or
62-
[aA] = charcter a or character A
67+
[aA] = character a or character A
6368
--}}
6469

6570

@@ -81,13 +86,21 @@ Example Definitions
8186
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.subject}}{{#each fixes}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}}){{/each}}
8287
{{/each}}
8388

84-
{{! List commits with 'breaking:' or 'Breaking change:' anywhere in the message under a heading}}
89+
{{! List merge commits with 'breaking:' or 'Breaking change:' anywhere in the message under a heading}}
8590
{{#commit-list merges heading='### Breaking Changes :warning:' message='[bB]reaking [cC]hange:|[bB]reaking:' exclude='\[skip-changelog\]'}}
8691
- {{message}} @{{author}} <!--[`#{{id}}`]({{href}}) -->
8792
{{/commit-list}}
8893

8994
{{! List commits organised under a heading, but not those already listed in the breaking section }}
90-
{{#commit-list merges heading='### New Features' message='^[fF]eat:|[fF]eat\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
95+
{{#commit-list merges heading='### Build' message='^[bB]uild:|^[bB]uild\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
96+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
97+
{{/commit-list}}
98+
99+
{{#commit-list merges heading='### Deprecated Features' message='^[dD]eprecate:|^[dD]eprecate\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
100+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
101+
{{/commit-list}}
102+
103+
{{#commit-list merges heading='### New Features' message='^[fF]eat:|^[fF]eat\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
91104
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
92105
{{/commit-list}}
93106

@@ -123,7 +136,7 @@ Example Definitions
123136
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
124137
{{/commit-list}}
125138

126-
{{#commit-list merges heading='### Uncategorized Changes' exclude='[bB]reaking [cC]hange:|[bB]reaking:|^[fF]eat:|^[fF]eat\(|^[fF]ix:|^[fF]ix\(|^[cC]hore:|^[cC]hore\(|^[cC][iI]:|^[cC][iI]\(|^[dD]ocs:|^[dD]ocs\(|^[rR]efactor:|^[rR]efactor\(|^[tT]est:|^[tT]est\(|^[sS]tyle:|^[sS]tyle\(|^[pP]erf:|^[pP]erf\(|\[skip-changelog\]'}}
139+
{{#commit-list merges heading='### General Changes' exclude='[bB]reaking [cC]hange:|[bB]reaking:|^[bB]uild:|^[bB]uild\(|^[dD]eprecate:|^[dD]eprecate\(|^[fF]eat:|^[fF]eat\(|^[fF]ix:|^[fF]ix\(|^[cC]hore:|^[cC]hore\(|^[cC][iI]:|^[cC][iI]\(|^[dD]ocs:|^[dD]ocs\(|^[rR]efactor:|^[rR]efactor\(|^[tT]est:|^[tT]est\(|^[sS]tyle:|^[sS]tyle\(|^[pP]erf:|^[pP]erf\(|\[skip-changelog\]'}}
127140
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
128141
{{/commit-list}}
129142

@@ -133,7 +146,15 @@ Example Definitions
133146
{{/commit-list}}
134147

135148
{{! List commits organised under a heading, but not those already listed in the breaking section }}
136-
{{#commit-list commits heading='### New Features' message='^[fF]eat:|[fF]eat\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
149+
{{#commit-list commits heading='### Build' message='^[bB]uild:|^[bB]uild\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
150+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
151+
{{/commit-list}}
152+
153+
{{#commit-list commits heading='### Deprecated Features' message='^[dD]eprecate:|^[dD]eprecate\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
154+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
155+
{{/commit-list}}
156+
157+
{{#commit-list commits heading='### New Features' message='^[fF]eat:|^[fF]eat\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
137158
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
138159
{{/commit-list}}
139160

@@ -169,7 +190,7 @@ Example Definitions
169190
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
170191
{{/commit-list}}
171192

172-
{{#commit-list commits heading='### Uncategorized Changes' exclude='[bB]reaking [cC]hange:|[bB]reaking:|^[fF]eat:|^[fF]eat\(|^[fF]ix:|^[fF]ix\(|^[cC]hore:|^[cC]hore\(|^[cC][iI]:|^[cC][iI]\(|^[dD]ocs:|^[dD]ocs\(|^[rR]efactor:|^[rR]efactor\(|^[tT]est:|^[tT]est\(|^[sS]tyle:|^[sS]tyle\(|^[pP]erf:|^[pP]erf\(|\[skip-changelog\]'}}
193+
{{#commit-list commits heading='### General Changes' exclude='[bB]reaking [cC]hange:|[bB]reaking:|^[bB]uild:|^[bB]uild\(|^[dD]eprecate:|^[dD]eprecate\(|^[fF]eat:|^[fF]eat\(|^[fF]ix:|^[fF]ix\(|^[cC]hore:|^[cC]hore\(|^[cC][iI]:|^[cC][iI]\(|^[dD]ocs:|^[dD]ocs\(|^[rR]efactor:|^[rR]efactor\(|^[tT]est:|^[tT]est\(|^[sS]tyle:|^[sS]tyle\(|^[pP]erf:|^[pP]erf\(|\[skip-changelog\]'}}
173194
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
174195
{{/commit-list}}
175196

.copier-answers.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changes here will be overwritten by Copier
22

3-
_commit: 0.1.26
3+
_commit: 0.1.40
44
_src_path: git@bbpgitlab.epfl.ch:neuromath/python-template.git
55
author_email: ''
66
author_name: Blue Brain Project, EPFL
@@ -21,6 +21,7 @@ ssh_url: git@github.com:BlueBrain/dir-content-diff.git
2121
support_py37: false
2222
team_name: ''
2323
tracker_url: https://github.com/BlueBrain/dir-content-diff/issues
24+
use_pyproject_toml: false
2425
version: 1.1.0
2526

2627
# End of Copier answers

.flake8

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[flake8]
22
ignore =
3-
E203, # E203: whitespace before ':'
4-
W503 # W503: line break before binary operator
3+
# E203: whitespace before ':'
4+
E203,
5+
# W503: line break before binary operator
6+
W503
57
max-line-length = 100

.github/workflows/run-tox.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python-version: ["3.8", "3.9", "3.10"]
16+
python-version: ["3.8", "3.9", "3.10", "3.11"]
17+
min_versions: ["min_versions", "latest_versions"]
18+
exclude:
19+
- min_versions: "min_versions"
20+
include:
21+
- python-version: "3.8"
22+
min_versions: "min_versions"
1723

1824
steps:
1925
- uses: actions/checkout@v3
@@ -37,16 +43,21 @@ jobs:
3743
.tox
3844
~/.cache/pre-commit
3945
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ steps.date.outputs.date }}-${{ hashFiles('setup.py') }}-${{ hashFiles('.pre-commit-config.yaml') }}
40-
- name: Install dependencies and register dot plugin
41-
run: |
42-
python -m pip install --upgrade pip setuptools
43-
pip install tox-gh-actions
4446
- name: Clear results in tox environments
4547
run: |
4648
rm -rf .tox/*/tmp
47-
- name: Run tox
49+
- name: Run tox with latest versions
50+
if: ${{ matrix.min_versions == 'latest_versions' }}
4851
run: |
52+
python -m pip install --upgrade pip setuptools
53+
pip install tox-gh-actions
4954
tox
55+
- name: Run tox with min versions
56+
if: ${{ matrix.min_versions == 'min_versions' }}
57+
run: |
58+
python -m pip install --upgrade pip setuptools
59+
pip install tox
60+
tox run -e min_versions
5061
- name: JUnit Report Action
5162
uses: mikepenz/action-junit-report@v3
5263
if: always() # always run even if the previous step fails

.pre-commit-config.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ default_language_version:
22
python: python3.8
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.3.0
5+
rev: v4.4.0
66
hooks:
77
- id: check-added-large-files
88
- id: check-case-conflict
@@ -13,31 +13,31 @@ repos:
1313
- id: end-of-file-fixer
1414
- id: trailing-whitespace
1515
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
16-
rev: v9.0.0
16+
rev: v9.4.0
1717
hooks:
1818
- id: commitlint
1919
stages:
2020
- commit-msg
2121
additional_dependencies: ['conventional-changelog-conventionalcommits']
2222
- repo: https://github.com/pycqa/isort
23-
rev: 5.10.1
23+
rev: 5.12.0
2424
hooks:
2525
- id: isort
2626
- repo: https://github.com/psf/black
27-
rev: 22.6.0
27+
rev: 22.12.0
2828
hooks:
2929
- id: black
3030
- repo: https://github.com/codespell-project/codespell
31-
rev: v2.1.0
31+
rev: v2.2.2
3232
hooks:
3333
- id: codespell
3434
args: ["-x", ".codespellignorelines"]
3535
- repo: https://github.com/PyCQA/pydocstyle
36-
rev: 6.1.1
36+
rev: 6.3.0
3737
hooks:
3838
- id: pydocstyle
39-
additional_dependencies: ["toml"]
39+
additional_dependencies: ["tomli"]
4040
- repo: https://github.com/PyCQA/flake8
41-
rev: 5.0.4
41+
rev: 6.0.0
4242
hooks:
4343
- id: flake8

commitlint.config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ module.exports = {
2020
'Build',
2121
'Chore',
2222
'CI',
23+
'Deprecate',
2324
'Docs',
2425
'Feat',
2526
'Fix',
2627
'Perf',
2728
'Refactor',
29+
'Release',
2830
'Revert',
2931
'Style',
3032
'Test',
31-
'Release',
3233
],
3334
],
3435
},
@@ -96,6 +97,16 @@ module.exports = {
9697
title: 'Reverts',
9798
emoji: '🗑',
9899
},
100+
Release: {
101+
description: 'Release commit',
102+
title: 'Release',
103+
emoji: '🎉',
104+
},
105+
Deprecate: {
106+
description: 'Deprecate a feature',
107+
title: 'Deprecations',
108+
emoji: '🗳',
109+
},
99110
},
100111
},
101112
scope: {

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"(^[cC]hore\\((.*)\\): ?)": "\\($2\\)",
1111
"(^[cC][iI]: ?)": "",
1212
"(^[cC][iI]\\((.*)\\): ?)": "\\($2\\)",
13+
"(^[dD]eprecate: ?)": "",
14+
"(^[dD]eprecate\\((.*)\\): ?)": "\\($2\\)",
1315
"(^[dD]ocs: ?)": "",
1416
"(^[dD]ocs\\((.*)\\): ?)": "\\($2\\)",
1517
"(^[fF]eat: ?)": "",

pyproject.toml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
# SETUPTOOLS
21
[build-system]
32
requires = [
4-
"setuptools>=42",
5-
"wheel",
6-
"setuptools_scm[toml]>=3.4",
3+
"setuptools>=45",
4+
"setuptools_scm[toml]>=6.2",
75
]
6+
build-backend = "setuptools.build_meta"
87

98
[tool.setuptools_scm]
109

11-
# BLACK
1210
[tool.black]
1311
line-length = 100
1412
target-version = [
1513
"py38",
1614
"py39",
15+
"py310",
16+
"py311",
1717
]
1818

19-
# PYDOCSTYLE
2019
[tool.pydocstyle]
2120
# ignore the following:
2221
# - D107: Missing docstring in __init__
@@ -25,13 +24,11 @@ add-ignore = [
2524
]
2625
convention = "google"
2726

28-
# ISORT
2927
[tool.isort]
3028
profile = "black"
3129
line_length = 100
3230
force_single_line = true
3331

34-
# PYTEST
3532
[tool.pytest.ini_options]
3633
testpaths = [
3734
"tests",

setup.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,29 @@
55
from setuptools import setup
66

77
reqs = [
8-
"dictdiffer",
9-
"diff_pdf_visually>=1.5.1",
10-
"PyYaml",
8+
"dictdiffer>=0.8",
9+
"diff_pdf_visually>=1.7",
10+
"PyYaml>=5.3",
1111
]
12+
1213
doc_reqs = [
1314
"m2r2",
14-
"mistune<2",
15-
"sphinx",
15+
"sphinx<6",
1616
"sphinx-bluebrain-theme",
1717
]
18+
1819
pandas_reqs = [
19-
"pandas",
20-
"tables",
20+
"pandas>=1.4",
21+
"tables>=3.7",
2122
]
23+
2224
test_reqs = [
23-
"coverage",
25+
"coverage>=6",
2426
"dicttoxml>=1.7.16",
25-
"matplotlib",
27+
"matplotlib>=3",
2628
"rst2pdf>=0.99",
27-
"pytest",
28-
"pytest-html",
29+
"pytest>=6.2",
30+
"pytest-html>=2",
2931
]
3032

3133
setup(
@@ -65,6 +67,7 @@
6567
"Programming Language :: Python :: 3.8",
6668
"Programming Language :: Python :: 3.9",
6769
"Programming Language :: Python :: 3.10",
68-
"Topic :: Software Development :: Libraries :: Python Modules",
70+
"Programming Language :: Python :: 3.11",
71+
"Topic :: Scientific/Engineering :: Bio-Informatics",
6972
],
7073
)

tests/test_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ def test_update_register(self, registry_reseter):
549549
):
550550
dir_content_diff.register_comparator(".pdf", dir_content_diff.JsonComparator())
551551

552-
with pytest.raises(ValueError, match=("The '.unknown_ext' extension is not registered.")):
552+
with pytest.raises(ValueError, match="The '.unknown_ext' extension is not registered."):
553553
dir_content_diff.unregister_comparator(".unknown_ext")
554554

555555
dir_content_diff.unregister_comparator(".unknown_ext", quiet=True)

0 commit comments

Comments
 (0)