Skip to content

Commit fa06074

Browse files
Refactor: Apply Copier template
1 parent a7a7849 commit fa06074

36 files changed

+728
-395
lines changed

.auto-changelog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"output": "CHANGELOG.md",
3+
"template": ".auto-changelog-template.hbs",
4+
"tagPrefix": "bluepyparallel-v",
5+
"commitLimit": false,
6+
"backfillLimit": false,
7+
"ignoreCommitPattern": "Release [0-9]+\\.[0-9]+\\.[0-9]+|Update CHANGELOG.*|.*\\[skip-changelog\\].*|\\[pre-commit.ci\\]",
8+
"commitUrl": "https://bbpgitlab.epfl.ch/neuromath/bluepyparallel/commit/{id}",
9+
"issueUrl": "https://bbpgitlab.epfl.ch/neuromath/bluepyparallel/issues/{id}",
10+
"mergeUrl": "https://bbpgitlab.epfl.ch/neuromath/bluepyparallel/merge_requests/{id}",
11+
"compareUrl": "https://bbpgitlab.epfl.ch/neuromath/bluepyparallel/compare/{from}...{to}"
12+
}

.auto-changelog-template.hbs

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# Changelog
2+
3+
{{!--
4+
Introduction
5+
• This template tries to follow conventional commits format https://www.conventionalcommits.org/en/v1.0.0/
6+
• The template uses regex to filter commit types into their own headings (this is more than just fixes and features headings)
7+
• It also uses the replaceText function in package.json to remove the commit type text from the message, because the headers are shown instead.
8+
• The text 'Breaking:' or 'Breaking changes:' can be located anywhere in the commit.
9+
• The types feat:, fix:, chore:, docs:, refactor:, test:, style:, perf: must be at the beginning of the commit subject with an : on end.
10+
• They can optionally have a scope set to outline the module or component that is affected eg feat(bldAssess):
11+
• 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+
Example Definitions
13+
• feat: A new feature
14+
• fix: A bug fix
15+
• perf: A code change that improves performance
16+
• refactor: A code change that neither fixes a bug nor adds a feature
17+
• style: Changes that do not affect the meaning of the code (white-space, formatting, spelling mistakes, missing semi-colons, etc)
18+
• test: Adding missing tests or correcting existing tests
19+
• docs: Adding/updating documentation
20+
• chore: Something like updating a library version, or moving files to be in a better location and updating all file refs
21+
--}}
22+
23+
24+
{{!-- In package.json need to add this to remove label text from the change log output (because the markdown headers are now used to group them).
25+
NOTES • Individual brackets have been escaped twice to be Json compliant.
26+
• For items that define a scope eg feat(bldAssess): We remove the 1st bracket and then re-add it so we can select the right piece of text
27+
{
28+
"name": "my-awesome-package",
29+
"auto-changelog": {
30+
"replaceText": {
31+
"([bB]reaking:)": "",
32+
"([bB]reaking change:)": "",
33+
"(^[fF]eat:)": "",
34+
"(^[fF]eat\\()": "\\(",
35+
"(^[fF]ix:)": "",
36+
"(^[fF]ix\\()": "\\(",
37+
"(^[cC]hore:)": "",
38+
"(^[cC]hore\\()": "\\(",
39+
"(^[dD]ocs:)": "",
40+
"(^[dD]ocs\\()": "\\(",
41+
"(^[rR]efactor:)": "",
42+
"(^[rR]efactor\\()": "\\(",
43+
"(^[tT]est:)": "",
44+
"(^[tT]est\\()": "\\(",
45+
"(^[sS]tyle:)": "",
46+
"(^[sS]tyle\\()": "\\(",
47+
"(^[pP]erf:)": "",
48+
"(^[pP]erf\\()": "\\("
49+
}
50+
}
51+
}
52+
--}}
53+
54+
{{!--
55+
Regex reminders
56+
^ = starts with
57+
\( = ( character (otherwise it is interpreted as a regex lookup group)
58+
* = zero or more of the previous character
59+
\s = whitespace
60+
. = any character except newline
61+
| = or
62+
[aA] = charcter a or character A
63+
--}}
64+
65+
66+
{{#each releases}}
67+
{{#if href}}
68+
## [{{title}}]({{href}})
69+
{{else}}
70+
## {{title}}
71+
{{/if}}
72+
73+
> {{niceDate}}
74+
75+
{{#if summary}}
76+
{{summary}}
77+
{{/if}}
78+
79+
{{! List commits that fix a given issues}}
80+
{{#each fixes}}
81+
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.subject}}{{#each fixes}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}}){{/each}}
82+
{{/each}}
83+
84+
{{! List commits with 'breaking:' or 'Breaking change:' anywhere in the message under a heading}}
85+
{{#commit-list merges heading='### Breaking Changes :warning:' message='[bB]reaking [cC]hange:|[bB]reaking:' exclude='\[skip-changelog\]'}}
86+
- {{message}} @{{author}} <!--[`#{{id}}`]({{href}}) -->
87+
{{/commit-list}}
88+
89+
{{! 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\]'}}
91+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
92+
{{/commit-list}}
93+
94+
{{#commit-list merges heading='### Fixes' message='^[fF]ix:|^[fF]ix\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
95+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
96+
{{/commit-list}}
97+
98+
{{#commit-list merges heading='### Chores And Housekeeping' message='^[cC]hore:|^[cC]hore\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
99+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
100+
{{/commit-list}}
101+
102+
{{#commit-list merges heading='### Documentation Changes' message='^[dD]ocs:|^[dD]ocs\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
103+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
104+
{{/commit-list}}
105+
106+
{{#commit-list merges heading='### Refactoring and Updates' message='^[rR]efactor:|^[rR]efactor\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
107+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
108+
{{/commit-list}}
109+
110+
{{#commit-list merges heading='### Changes to Test Assests' message='^[tT]est:|^[tT]est\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
111+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
112+
{{/commit-list}}
113+
114+
{{#commit-list merges heading='### Tidying of Code eg Whitespace' message='^[sS]tyle:|^[sS]tyle\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
115+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
116+
{{/commit-list}}
117+
118+
{{#commit-list merges heading='### Performance Improvements' message='^[pP]erf:|^[pP]erf\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
119+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
120+
{{/commit-list}}
121+
122+
{{#commit-list merges heading='### CI Improvements' message='^[cC][iI]:|^[cC][iI]\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
123+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
124+
{{/commit-list}}
125+
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\]'}}
127+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
128+
{{/commit-list}}
129+
130+
{{! List commits with 'breaking:' or 'Breaking change:' anywhere in the message under a heading}}
131+
{{#commit-list commits heading='### Breaking Changes :warning:' message='[bB]reaking [cC]hange:|[bB]reaking:' exclude='\[skip-changelog\]'}}
132+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
133+
{{/commit-list}}
134+
135+
{{! 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\]'}}
137+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
138+
{{/commit-list}}
139+
140+
{{#commit-list commits heading='### Fixes' message='^[fF]ix:|^[fF]ix\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
141+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
142+
{{/commit-list}}
143+
144+
{{#commit-list commits heading='### Chores And Housekeeping' message='^[cC]hore:|^[cC]hore\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
145+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
146+
{{/commit-list}}
147+
148+
{{#commit-list commits heading='### Documentation Changes' message='^[dD]ocs:|^[dD]ocs\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
149+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
150+
{{/commit-list}}
151+
152+
{{#commit-list commits heading='### Refactoring and Updates' message='^[rR]efactor:|^[rR]efactor\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
153+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
154+
{{/commit-list}}
155+
156+
{{#commit-list commits heading='### Changes to Test Assests' message='^[tT]est:|^[tT]est\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
157+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
158+
{{/commit-list}}
159+
160+
{{#commit-list commits heading='### Tidying of Code eg Whitespace' message='^[sS]tyle:|^[sS]tyle\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
161+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
162+
{{/commit-list}}
163+
164+
{{#commit-list commits heading='### Performance Improvements' message='^[pP]erf:|^[pP]erf\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
165+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
166+
{{/commit-list}}
167+
168+
{{#commit-list commits heading='### CI Improvements' message='^[cC][iI]:|^[cC][iI]\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
169+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
170+
{{/commit-list}}
171+
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\]'}}
173+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
174+
{{/commit-list}}
175+
176+
{{/each}}

.codespellignorelines

Whitespace-only changes.

.codespellrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[codespell]
2+
skip = .git/*
3+
ignore-regex = @groupes.epfl.ch

.copier-answers.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Changes here will be overwritten by Copier
2+
3+
_commit: 0.1.12
4+
_src_path: [email protected]:neuromath/python-template.git
5+
author_email: [email protected]
6+
author_name: bbp-ou-cells
7+
copyright_license: BBP-internal-confidential
8+
copyright_year: '2022'
9+
distribution_name: bluepyparallel
10+
download_url: https://bbpgitlab.epfl.ch/neuromath/bluepyparallel
11+
init_git: false
12+
maintainer: null
13+
package_name: bluepyparallel
14+
project_description: Provides an embarassingly parallel tool with sql backend.
15+
project_name: BluePyParallel
16+
project_url: https://bbpteam.epfl.ch/documentation/projects/bluepyparallel
17+
repository_name: bluepyparallel
18+
repository_namespace: neuromath
19+
repository_provider: gitlab
20+
ssh_url: [email protected]:neuromath/bluepyparallel.git
21+
support_py37: true
22+
team_name: neuromath
23+
tracker_url: https://bbpteam.epfl.ch/project/issues/projects/CELLS/issues
24+
version: 0.0.8.dev0
25+
26+
# End of Copier answers

.coveragerc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
[paths]
2-
source =
2+
source_paths =
33
bluepyparallel
4+
*/site-packages/bluepyparallel
5+
*/bluepyparallel/bluepyparallel
46
*/bluepyparallel/bluepyparallel

.flake8

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

0 commit comments

Comments
 (0)