Skip to content

Commit c5c205a

Browse files
Refactor: Apply Copier template (#19)
1 parent 9223ba9 commit c5c205a

28 files changed

+239
-128
lines changed

.auto-changelog-template.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Example Definitions
123123
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
124124
{{/commit-list}}
125125

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\(|^[dD]ocs:|^[dD]ocs\(|^[rR]efactor:|^[rR]efactor\(|^[tT]est:|^[tT]est\(|^[sS]tyle:|^[sS]tyle\(|^[pP]erf:|^[pP]erf\(|\[skip-changelog\]'}}
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\]'}}
127127
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
128128
{{/commit-list}}
129129

.codespellignorelines

Whitespace-only changes.

.copier-answers.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Changes here will be overwritten by Copier
2+
3+
_commit: 0.1.7
4+
_src_path: [email protected]:neuromath/python-template.git
5+
author_email: ''
6+
author_name: Blue Brain Project, EPFL
7+
copyright_license: Apache License 2.0
8+
copyright_year: '2022'
9+
download_url: [email protected]:BlueBrain/dir-content-diff.git
10+
init_git: false
11+
maintainer: Adrien Berchet (@adrien-berchet)
12+
package_name: dir_content_diff
13+
project_description: Simple tool to compare directory contents.
14+
project_name: dir-content-diff
15+
project_url: https://dir-content-diff.readthedocs.io
16+
repository: BlueBrain/dir-content-diff
17+
repository_provider: github
18+
support_py37: false
19+
team_name: ''
20+
today: 29 August 2022
21+
tracker_url: https://github.com/BlueBrain/dir-content-diff/issues
22+
version: 1.1.0
23+
24+
# End of Copier answers

.coveragerc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[paths]
2-
sources =
2+
source_paths =
33
dir_content_diff
44
*/site-packages/dir_content_diff
5+
*/dir_content_diff/dir_content_diff
56
*/dir-content-diff/dir_content_diff

.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

.github/workflows/publish-sdist.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ jobs:
1515
uses: actions/setup-python@v2
1616
with:
1717
python-version: 3.8
18-
- name: Build a source tarball
18+
- name: Build a wheel and a source tarball
1919
run: |
20-
python setup.py sdist
20+
pip install setuptools>=42 wheel setuptools_scm[toml]>=3.4
21+
python setup.py sdist bdist_wheel
2122
- name: Publish distribution package to PyPI
22-
uses: pypa/gh-action-pypi-publish@master
23+
uses: pypa/gh-action-pypi-publish@release/v1
2324
with:
2425
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/run-tox.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
name: Run all tox jobs using python3
1+
name: Run all tox jobs using Python3
22

33
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- main
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
89
jobs:
910
build:
11+
1012
runs-on: ubuntu-latest
1113
strategy:
1214
matrix:
1315
python-version: [3.8, 3.9]
16+
1417
steps:
1518
- uses: actions/checkout@v2
1619
- name: Set up Python ${{ matrix.python-version }}
@@ -25,6 +28,11 @@ jobs:
2528
- name: Run tox
2629
run: |
2730
tox
31+
- name: JUnit Report Action
32+
uses: mikepenz/[email protected]
33+
if: always() # always run even if the previous step fails
34+
with:
35+
report_paths: 'reports/pytest-*.xml'
2836
- name: Upload to codecov
2937
if: ${{matrix.python-version == '3.8'}}
3038
uses: codecov/codecov-action@v1

.gitignore

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,42 @@
1-
**/__pycache__
2-
*.egg-info
1+
# data
2+
.eggs
3+
.idea
34
*.pyc
45
*.swp
5-
._.DS_Store
6-
.coverage*
6+
*py~
7+
*~
8+
*.egg-info
9+
10+
# Mac related stuff
711
.DS_Store
8-
.eggs
9-
.tox
12+
13+
# Packaging builds
1014
build
11-
coverage.xml
1215
dist
13-
doc/build
16+
17+
# tox
18+
.tox
19+
20+
# coverage
21+
.coverage
22+
.coverage*
23+
coverage.xml
24+
25+
# venv
26+
venv
27+
test_venv
28+
29+
# docs
30+
docs/build
31+
docs/source/generated
32+
docs/source/examples
33+
34+
# reports
1435
reports
36+
37+
# examples
38+
examples/.ipynb_checkpoints
39+
40+
# Node
41+
node_modules
42+
package-lock.json

.pre-commit-config.yaml

Lines changed: 5 additions & 4 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.2.0
5+
rev: v4.3.0
66
hooks:
77
- id: check-added-large-files
88
- id: check-case-conflict
@@ -13,7 +13,7 @@ repos:
1313
- id: end-of-file-fixer
1414
- id: trailing-whitespace
1515
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
16-
rev: v8.0.0
16+
rev: v9.0.0
1717
hooks:
1818
- id: commitlint
1919
stages:
@@ -24,19 +24,20 @@ repos:
2424
hooks:
2525
- id: isort
2626
- repo: https://github.com/psf/black
27-
rev: 22.3.0
27+
rev: 22.6.0
2828
hooks:
2929
- id: black
3030
- repo: https://github.com/codespell-project/codespell
3131
rev: v2.1.0
3232
hooks:
3333
- id: codespell
34+
args: ["-x", ".codespellignorelines"]
3435
- repo: https://github.com/PyCQA/pydocstyle
3536
rev: 6.1.1
3637
hooks:
3738
- id: pydocstyle
3839
additional_dependencies: ["toml"]
3940
- repo: https://github.com/PyCQA/flake8
40-
rev: 4.0.1
41+
rev: 5.0.4
4142
hooks:
4243
- id: flake8

.pylintrc

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[MESSAGES CONTROL]
2+
disable=
3+
arguments-differ,
4+
invalid-name,
5+
6+
[FORMAT]
7+
# Regexp for a line that is allowed to be longer than the limit.
8+
ignore-long-lines=\bhttps?://\S
9+
# Maximum number of characters on a single line.
10+
max-line-length=100
11+
12+
[DESIGN]
13+
# Maximum number of arguments for function / method
14+
max-args=10
15+
# Argument names that match this expression will be ignored. Default to name
16+
# with leading underscore
17+
ignored-argument-names=args|kwargs|_.*
18+
# Maximum number of locals for function / method body
19+
max-locals=25
20+
# Maximum number of return / yield for function / method body
21+
max-returns=6
22+
# Maximum number of branch for function / method body
23+
max-branches=20
24+
# Maximum number of statements in function / method body
25+
max-statements=50
26+
# Maximum number of parents for a class (see R0901).
27+
max-parents=7
28+
# Maximum number of attributes for a class (see R0902).
29+
max-attributes=40
30+
# Minimum number of public methods for a class (see R0903).
31+
min-public-methods=0
32+
# Maximum number of public methods for a class (see R0904).
33+
max-public-methods=60
34+
35+
[SIMILARITIES]
36+
# checks for similarities and duplicated code. This computation may be
37+
# memory / CPU intensive, so you should disable it if you experiments some
38+
# problems.
39+
40+
# Minimum lines number of a similarity.
41+
min-similarity-lines=25
42+
# Ignore comments when computing similarities.
43+
ignore-comments=yes
44+
# Ignore docstrings when computing similarities.
45+
ignore-docstrings=yes
46+
47+
[TYPECHECK]
48+
# List of classes names for which member attributes should not be checked
49+
# (useful for classes with attributes dynamically set).
50+
51+
# as of numpy 1.8.0, name resolution seems to be a problem. Ignore lookups in numpy
52+
# ignored-classes=numpy,list

0 commit comments

Comments
 (0)