Skip to content

Commit ce9ea3e

Browse files
CI: Add job for min versions (#39)
1 parent 9185e68 commit ce9ea3e

File tree

12 files changed

+107
-61
lines changed

12 files changed

+107
-61
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.39
44
_src_path: [email protected]:neuromath/python-template.git
55
author_email: ''
66
author_name: Blue Brain Project, EPFL
@@ -21,6 +21,7 @@ ssh_url: [email protected]:BlueBrain/data-validation-framework.git
2121
support_py37: false
2222
team_name: ''
2323
tracker_url: https://github.com/BlueBrain/data-validation-framework/issues
24+
use_pyproject_toml: false
2425
version: 0.6.2
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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- main
8+
workflow_dispatch:
89

910
jobs:
1011
build:
@@ -13,6 +14,12 @@ jobs:
1314
strategy:
1415
matrix:
1516
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"
1623

1724
steps:
1825
- uses: actions/checkout@v3
@@ -34,16 +41,21 @@ jobs:
3441
.tox
3542
~/.cache/pre-commit
3643
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ steps.date.outputs.date }}-${{ hashFiles('setup.py') }}-${{ hashFiles('.pre-commit-config.yaml') }}
37-
- name: Install dependencies
38-
run: |
39-
python -m pip install --upgrade pip setuptools
40-
pip install tox-gh-actions
4144
- name: Clear results in tox environments
4245
run: |
4346
rm -rf .tox/*/tmp
44-
- name: Run tox
47+
- name: Run tox with latest versions
48+
if: ${{ matrix.min_versions == 'latest_versions' }}
4549
run: |
50+
python -m pip install --upgrade pip setuptools
51+
pip install tox-gh-actions
4652
tox
53+
- name: Run tox with min versions
54+
if: ${{ matrix.min_versions == 'min_versions' }}
55+
run: |
56+
python -m pip install --upgrade pip setuptools
57+
pip install tox
58+
tox run -e min_versions
4759
- name: JUnit Report Action
4860
uses: mikepenz/action-junit-report@v3
4961
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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ 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
'Release',
3032
'Style',
@@ -101,6 +103,11 @@ module.exports = {
101103
title: 'Release',
102104
emoji: '🎉',
103105
},
106+
Deprecate: {
107+
description: 'Deprecate a feature',
108+
title: 'Deprecations',
109+
emoji: '🗳',
110+
},
104111
},
105112
},
106113
scope: {

data_validation_framework/result.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class ValidationResult(dict):
2828
"""
2929

3030
def __init__(self, is_valid, ret_code=None, comment=None, exception=None, **kwargs):
31-
""" """
3231
if ret_code is None:
3332
if is_valid:
3433
ret_code = 0

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: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +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"
7+
8+
[tool.setuptools_scm]
89

9-
# BLACK
1010
[tool.black]
1111
line-length = 100
1212
target-version = [
1313
"py38",
1414
"py39",
15+
"py310",
16+
"py311",
1517
]
1618

17-
# PYDOCSTYLE
1819
[tool.pydocstyle]
1920
# ignore the following:
2021
# - D105: Missing docstring in magic method
@@ -25,13 +26,11 @@ add-ignore = [
2526
]
2627
convention = "google"
2728

28-
# ISORT
2929
[tool.isort]
3030
profile = "black"
3131
line_length = 100
3232
force_single_line = true
3333

34-
# PYTEST
3534
[tool.pytest.ini_options]
3635
testpaths = [
3736
"tests",

setup.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
reqs = [
88
"luigi>=3.1",
99
"luigi-tools>=0.0.18",
10-
"numpy<1.24",
11-
"pandas",
12-
"rst2pdf",
13-
"sphinx>=3,<6",
14-
"tqdm",
10+
"numpy>=1.21",
11+
"pandas>=1.3",
12+
"rst2pdf>=0.99",
13+
"sphinx>=4,<6",
14+
"tqdm>=4.40",
1515
]
1616
doc_reqs = [
1717
"m2r2",
@@ -20,11 +20,10 @@
2020
]
2121
test_reqs = [
2222
"diff_pdf_visually>=1.6.2",
23-
"pause",
24-
"pytest",
25-
"pytest-cov",
26-
"pytest-html",
27-
"rst2pdf>=0.99",
23+
"pause>=0.2",
24+
"pytest>=7",
25+
"pytest-cov>=3",
26+
"pytest-html>=3.1",
2827
]
2928

3029
setup(
@@ -41,10 +40,6 @@
4140
license="Apache License 2.0",
4241
packages=find_namespace_packages(include=["data_validation_framework*"]),
4342
python_requires=">=3.8",
44-
use_scm_version=True,
45-
setup_requires=[
46-
"setuptools_scm",
47-
],
4843
install_requires=reqs,
4944
extras_require={
5045
"docs": doc_reqs,

0 commit comments

Comments
 (0)