Skip to content

Commit d7c65db

Browse files
committed
chore: Template upgrade
1 parent 92a1a9d commit d7c65db

File tree

8 files changed

+27
-25
lines changed

8 files changed

+27
-25
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 0.1.3
2+
_commit: 0.1.10
33
_src_path: gh:pawamoy/copier-poetry
44
author_email: pawamoy@pm.me
55
author_fullname: "Timoth\xE9e Mazzucotelli"

.github/workflows/ci.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@ jobs:
2828
- name: Checkout
2929
uses: actions/checkout@v2
3030

31-
- name: Set up Python 3.6
32-
uses: actions/setup-python@v1
31+
- name: Set up Python
32+
uses: actions/setup-python@v2
3333
with:
3434
python-version: 3.8
3535

3636
- name: Set up the cache
3737
uses: actions/cache@v1
3838
with:
3939
path: .venv
40-
key: cache-python-packages-2
40+
key: quality-venv-cache
4141

4242
- name: Set up the project
4343
run: |
44-
pip install poetry safety
45-
poetry install -v
44+
pip install poetry
45+
poetry install -vvv || { rm -rf .venv; poetry install -vvv; }
4646
4747
- name: Check if the documentation builds correctly
4848
run: poetry run duty check-docs
@@ -54,15 +54,16 @@ jobs:
5454
run: poetry run duty check-types
5555

5656
- name: Check for vulnerabilities in dependencies
57-
run: poetry run duty check-dependencies
57+
run: |
58+
pip install safety
59+
poetry run duty check-dependencies
5860
5961
tests:
6062

6163
strategy:
62-
max-parallel: 6
6364
matrix:
6465
os: [ubuntu-latest, macos-latest, windows-latest]
65-
python-version: [3.6, 3.7, 3.8]
66+
python-version: [3.6, 3.7, 3.8, 3.9]
6667

6768
runs-on: ${{ matrix.os }}
6869

@@ -71,22 +72,20 @@ jobs:
7172
uses: actions/checkout@v2
7273

7374
- name: Set up Python ${{ matrix.python-version }}
74-
uses: actions/setup-python@v1
75+
uses: actions/setup-python@v2
7576
with:
7677
python-version: ${{ matrix.python-version }}
7778

7879
- name: Set up the cache
7980
uses: actions/cache@v1
80-
env:
81-
cache-name: cache-python-packages
8281
with:
8382
path: .venv
84-
key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ env.cache-name }}-2
83+
key: tests-venv-cache-${{ matrix.os }}-py${{ matrix.python-version }}
8584

8685
- name: Set up the project
8786
run: |
8887
pip install poetry
89-
poetry install -v
88+
poetry install -vvv || { rm -rf .venv; poetry install -vvv; }
9089
9190
- name: Run the test suite
9291
run: poetry run duty test

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SHELL := bash
33

44
DUTY = $(shell [ -n "${VIRTUAL_ENV}" ] || echo poetry run) duty
55

6-
args = $(foreach a,$($(subst -,_,$1)_args),$(if $(value $a),$a=$($a)))
6+
args = $(foreach a,$($(subst -,_,$1)_args),$(if $(value $a),$a="$($a)"))
77
check_code_quality_args = files
88
docs_serve_args = host port
99
release_args = version
@@ -43,4 +43,3 @@ $(BASIC_DUTIES):
4343
.PHONY: $(QUALITY_DUTIES)
4444
$(QUALITY_DUTIES):
4545
@bash scripts/multirun.sh duty $@ $(call args,$@)
46-

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![ci](https://github.com/pawamoy/git-changelog/workflows/ci/badge.svg)](https://github.com/pawamoy/git-changelog/actions?query=workflow%3Aci)
44
[![documentation](https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat)](https://pawamoy.github.io/git-changelog/)
55
[![pypi version](https://img.shields.io/pypi/v/git-changelog.svg)](https://pypi.org/project/git-changelog/)
6+
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://gitter.im/git-changelog/community)
67

78
Automatic Changelog generator using Jinja2 templates. From git logs to change logs.
89

duties.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import os
44
import re
5+
import sys
56
from itertools import chain
67
from pathlib import Path
78
from shutil import which
@@ -20,9 +21,9 @@
2021
PY_SRC_LIST = tuple(str(_) for _ in PY_SRC_PATHS)
2122
PY_SRC = " ".join(PY_SRC_LIST)
2223
TESTING = os.environ.get("TESTING", "0") in {"1", "true"}
23-
CI = os.environ.get("CI", "0") in {"1", "true"}
24+
CI = os.environ.get("CI", "0") in {"1", "true", "yes", ""}
2425
WINDOWS = os.name == "nt"
25-
PTY = not WINDOWS
26+
PTY = not WINDOWS and not CI
2627

2728

2829
def latest(lines: List[str], regex: Pattern) -> Optional[str]:
@@ -165,7 +166,7 @@ def check_code_quality(ctx, files=PY_SRC):
165166
ctx: The context instance (passed automatically).
166167
files: The files to check.
167168
"""
168-
ctx.run(f"flakehell lint {files}", title="Checking code quality", pty=PTY)
169+
ctx.run(f"flakehell lint {files}", title="Checking code quality", pty=PTY, nofail=True, quiet=True)
169170

170171

171172
@duty
@@ -201,7 +202,9 @@ def check_docs(ctx):
201202
Arguments:
202203
ctx: The context instance (passed automatically).
203204
"""
204-
ctx.run("mkdocs build -s", title="Building documentation", pty=PTY)
205+
# pytkdocs fails on Python 3.9 for now
206+
nofail = sys.version.startswith("3.9")
207+
ctx.run("mkdocs build -s", title="Building documentation", pty=PTY, nofail=nofail, quiet=nofail)
205208

206209

207210
@duty
@@ -212,7 +215,7 @@ def check_types(ctx):
212215
Arguments:
213216
ctx: The context instance (passed automatically).
214217
"""
215-
ctx.run(f"mypy --config-file config/mypy.ini {PY_SRC}", title="Type-checking", pty=PTY)
218+
ctx.run(f"mypy --config-file config/mypy.ini {PY_SRC}", title="Type-checking", pty=PTY, nofail=True, quiet=True)
216219

217220

218221
@duty(silent=True)

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
2-
requires = ["poetry>=0.12"]
3-
build-backend = "poetry.masonry.api"
2+
requires = ["poetry-core"]
3+
build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "git-changelog"

scripts/multirun.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
PYTHON_VERSIONS="${PYTHON_VERSIONS:-3.6 3.7 3.8}"
4+
PYTHON_VERSIONS="${PYTHON_VERSIONS:-3.6 3.7 3.8 3.9}"
55

66
if [ -n "${PYTHON_VERSIONS}" ]; then
77
for python_version in ${PYTHON_VERSIONS}; do

scripts/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
PYTHON_VERSIONS="${PYTHON_VERSIONS:-3.6 3.7 3.8}"
4+
PYTHON_VERSIONS="${PYTHON_VERSIONS:-3.6 3.7 3.8 3.9}"
55

66
install_with_pipx() {
77
if ! command -v "$1" &>/dev/null; then

0 commit comments

Comments
 (0)