Skip to content

Commit

Permalink
Chore: Apply Copier template
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-berchet committed Aug 30, 2023
1 parent b96264c commit 3c493f5
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 22 deletions.
16 changes: 13 additions & 3 deletions .auto-changelog-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Example Definitions
"([bB]reaking change:)": "",
"(^[bB]uild:)": "",
"(^[bB]uild\\()": "\\(",
"(^[dD]eprecate:)": "",
"(^[dD]eprecate\\()": "\\(",
"(^[fF]eat:)": "",
"(^[fF]eat\\()": "\\(",
"(^[fF]ix:)": "",
Expand Down Expand Up @@ -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}} <!--[`#{{id}}`]({{href}}) -->
{{/commit-list}}
Expand All @@ -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}}
Expand Down Expand Up @@ -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}}

Expand All @@ -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}}
Expand Down Expand Up @@ -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}}

Expand Down
5 changes: 3 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
8 changes: 3 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"]
Expand Down
6 changes: 6 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
'Build',
'Chore',
'CI',
'Deprecate',
'Docs',
'Feat',
'Fix',
Expand Down Expand Up @@ -101,6 +102,11 @@ module.exports = {
title: 'Release',
emoji: '🎉',
},
Deprecate: {
description: 'Deprecate a feature',
title: 'Deprecations',
emoji: '🗳',
},
},
},
scope: {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"(^[cC]hore\\((.*)\\): ?)": "\\($2\\)",
"(^[cC][iI]: ?)": "",
"(^[cC][iI]\\((.*)\\): ?)": "\\($2\\)",
"(^[dD]eprecate: ?)": "",
"(^[dD]eprecate\\((.*)\\): ?)": "\\($2\\)",
"(^[dD]ocs: ?)": "",
"(^[dD]ocs\\((.*)\\): ?)": "\\($2\\)",
"(^[fF]eat: ?)": "",
Expand Down
13 changes: 5 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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__
Expand All @@ -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",
Expand Down
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ envlist =
check-packaging
lint
docs
py38-min_versions
min_versions
py{38,39,310,311}
coverage

Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit 3c493f5

Please sign in to comment.