diff --git a/.auto-changelog-template.hbs b/.auto-changelog-template.hbs index 5a2c3f9..60d2ab9 100644 --- a/.auto-changelog-template.hbs +++ b/.auto-changelog-template.hbs @@ -33,6 +33,8 @@ Example Definitions "([bB]reaking change:)": "", "(^[bB]uild:)": "", "(^[bB]uild\\()": "\\(", + "(^[dD]eprecate:)": "", + "(^[dD]eprecate\\()": "\\(", "(^[fF]eat:)": "", "(^[fF]eat\\()": "\\(", "(^[fF]ix:)": "", @@ -84,7 +86,7 @@ Example Definitions - {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.subject}}{{#each fixes}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}}){{/each}} {{/each}} - {{! List commits with 'breaking:' or 'Breaking change:' anywhere in the message under a heading}} + {{! List merge commits with 'breaking:' or 'Breaking change:' anywhere in the message under a heading}} {{#commit-list merges heading='### Breaking Changes :warning:' message='[bB]reaking [cC]hange:|[bB]reaking:' exclude='\[skip-changelog\]'}} - {{message}} @{{author}} {{/commit-list}} @@ -94,6 +96,10 @@ Example Definitions - {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}}) {{/commit-list}} + {{#commit-list merges heading='### Deprecated Features' message='^[dD]eprecate:|^[dD]eprecate\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}} + - {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}}) + {{/commit-list}} + {{#commit-list merges heading='### New Features' message='^[fF]eat:|^[fF]eat\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}} - {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}}) {{/commit-list}} @@ -130,7 +136,7 @@ Example Definitions - {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}}) {{/commit-list}} - {{#commit-list merges heading='### General Changes' exclude='[bB]reaking [cC]hange:|[bB]reaking:|^[bB]uild:|^[bB]uild\(|^[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\]'}} + {{#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\]'}} - {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}}) {{/commit-list}} @@ -144,6 +150,10 @@ Example Definitions - {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}}) {{/commit-list}} + {{#commit-list commits heading='### Deprecated Features' message='^[dD]eprecate:|^[dD]eprecate\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}} + - {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}}) + {{/commit-list}} + {{#commit-list commits heading='### New Features' message='^[fF]eat:|^[fF]eat\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}} - {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}}) {{/commit-list}} @@ -180,7 +190,7 @@ Example Definitions - {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}}) {{/commit-list}} - {{#commit-list commits heading='### General Changes' exclude='[bB]reaking [cC]hange:|[bB]reaking:|^[bB]uild:|^[bB]uild\(|^[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\]'}} + {{#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\]'}} - {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}}) {{/commit-list}} diff --git a/.copier-answers.yml b/.copier-answers.yml index efaa353..28d1917 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,6 +1,6 @@ # Changes here will be overwritten by Copier -_commit: 0.1.36 +_commit: 0.1.47 _src_path: git@bbpgitlab.epfl.ch:neuromath/python-template.git author_email: bbp-ou-cells@groupes.epfl.ch author_name: bbp-ou-cells @@ -17,10 +17,11 @@ project_url: https://bbpteam.epfl.ch/documentation/projects/synthesis-workflow repository_name: synthesis-workflow repository_namespace: neuromath repository_provider: gitlab +setup_codeql: false ssh_url: git@bbpgitlab.epfl.ch:neuromath/synthesis-workflow.git -support_py37: false team_name: neuromath tracker_url: https://bbpteam.epfl.ch/project/issues/projects/CELLS/issues +use_pyproject_toml: false version: 0.1.2.dev1 # End of Copier answers diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 973a543..710fe4c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,10 @@ include: - /ci/jobs/auto-release.yml - /ci/jobs/check-merge-request-title.yml - /ci/lib/pytest-template.yml + - /ci/jobs/py38.yml - /ci/jobs/py39.yml + - /ci/jobs/py310.yml + - /ci/jobs/min_versions.yml - /ci/jobs/coverage.yml .tox-template: @@ -29,11 +32,6 @@ include: KUBERNETES_MEMORY_LIMIT: 4Gi KUBERNETES_MEMORY_REQUEST: 4Gi -py38: - extends: .pytest-template - variables: - TOXENV: ${CI_JOB_NAME},${CI_JOB_NAME}-min_versions - lint: variables: KUBERNETES_CPU_LIMIT: 1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c2c797e..d5be74b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - rev: v9.4.0 + rev: v9.5.0 hooks: - id: commitlint stages: @@ -24,11 +24,11 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.3.0 hooks: - id: black - repo: https://github.com/codespell-project/codespell - rev: v2.2.2 + rev: v2.2.4 hooks: - id: codespell args: ["-x", ".codespellignorelines"] diff --git a/commitlint.config.js b/commitlint.config.js index 8090487..df424e4 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -20,6 +20,7 @@ module.exports = { 'Build', 'Chore', 'CI', + 'Deprecate', 'Docs', 'Feat', 'Fix', @@ -101,6 +102,11 @@ module.exports = { title: 'Release', emoji: '🎉', }, + Deprecate: { + description: 'Deprecate a feature', + title: 'Deprecations', + emoji: '🗳', + }, }, }, scope: { diff --git a/package.json b/package.json index 712977e..8e43834 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,8 @@ "(^[cC]hore\\((.*)\\): ?)": "\\($2\\)", "(^[cC][iI]: ?)": "", "(^[cC][iI]\\((.*)\\): ?)": "\\($2\\)", + "(^[dD]eprecate: ?)": "", + "(^[dD]eprecate\\((.*)\\): ?)": "\\($2\\)", "(^[dD]ocs: ?)": "", "(^[dD]ocs\\((.*)\\): ?)": "\\($2\\)", "(^[fF]eat: ?)": "", diff --git a/pyproject.toml b/pyproject.toml index 63f6fef..67f6ae7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,19 @@ -# SETUPTOOLS [build-system] requires = [ - "setuptools>=42", - "wheel", - "setuptools_scm[toml]>=3.4", + "setuptools>=45", ] +build-backend = "setuptools.build_meta" + -# BLACK [tool.black] line-length = 100 target-version = [ "py38", "py39", + "py310", + "py311", ] -# PYDOCSTYLE [tool.pydocstyle] # ignore the following: # - D107: Missing docstring in __init__ @@ -23,13 +22,11 @@ add-ignore = [ ] convention = "google" -# ISORT [tool.isort] profile = "black" line_length = 100 force_single_line = true -# PYTEST [tool.pytest.ini_options] testpaths = [ "tests", diff --git a/tox.ini b/tox.ini index 2d3ddb2..078eb39 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ envlist = check-packaging lint docs - py38-min_versions + min_versions py{38,39,310,311} coverage @@ -69,6 +69,9 @@ commands = python -m build -o {envtmpdir}/dist twine check {envtmpdir}/dist/* +[testenv:min_versions] +basepython = python3.8 + [testenv:lint] basepython = python3.8 deps =