Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da3c6de

Browse files
committed
ci: update dependencies
1 parent f5f71ad commit da3c6de

File tree

6 files changed

+533
-854
lines changed

6 files changed

+533
-854
lines changed

pdm.lock

Lines changed: 461 additions & 818 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/mkdocs_newsletter/version.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010

1111
def version_info() -> str:
1212
"""Display the version of the program, python and the platform."""
13-
return dedent(f"""\
13+
return dedent(
14+
f"""\
1415
------------------------------------------------------------------
1516
mkdocs_newsletter: {__version__}
1617
Python: {sys.version.split(" ", maxsplit=1)[0]}
1718
Platform: {platform.platform()}
18-
------------------------------------------------------------------""")
19+
------------------------------------------------------------------"""
20+
)

tests/conftest.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def full_repo_(repo: Repo) -> Repo:
7878
commit_date = datetime.datetime(2021, 2, 5, 12, tzinfo=tz.tzlocal())
7979
index.add(["docs/devops/helm/helm.md", "docs/devops/devops.md"])
8080
index.commit(
81-
textwrap.dedent("""\
81+
textwrap.dedent(
82+
"""\
8283
feat(helm): introduce Helm the Kubernetes package manager
8384
8485
[Helm](https://helm.sh/) is the package manager for Kubernetes. Through
@@ -94,7 +95,8 @@ def full_repo_(repo: Repo) -> Repo:
9495
9596
One of the most important goals of the DevOps initiative is to break the
9697
silos between the developers and the sysadmins, that lead to ill feelings
97-
and unproductivity."""),
98+
and unproductivity."""
99+
),
98100
author=author,
99101
committer=committer,
100102
author_date=commit_date,
@@ -143,10 +145,12 @@ def full_repo_(repo: Repo) -> Repo:
143145
commit_date = datetime.datetime(2021, 3, 2, 12, tzinfo=tz.tzlocal())
144146
index.add(["docs/coding/tdd.md", "docs/coding/python/gitpython.md"])
145147
index.commit(
146-
textwrap.dedent("""\
148+
textwrap.dedent(
149+
"""\
147150
feat(tdd): define test driven development
148151
149-
feat(gitpython): present the python library"""),
152+
feat(gitpython): present the python library"""
153+
),
150154
author=author,
151155
committer=committer,
152156
author_date=commit_date,

tests/unit/services/test_last_newsletters.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,12 @@ def test_create_newsletter_creates_daily_article(repo: Repo) -> None:
520520
category_order=0,
521521
file_="index.md",
522522
)
523-
file_content = dedent("""\
523+
file_content = dedent(
524+
"""\
524525
# [Introduction](index.md)
525526
526-
* New: Create the introduction page""")
527+
* New: Create the introduction page"""
528+
)
527529
changes_to_publish = DigitalGardenChanges(daily=[change])
528530

529531
result = create_newsletters(changes_to_publish, repo)
@@ -552,10 +554,12 @@ def test_create_newsletter_creates_weekly_articles(repo: Repo) -> None:
552554
category_order=0,
553555
file_="index.md",
554556
)
555-
file_content = dedent("""\
557+
file_content = dedent(
558+
"""\
556559
# [Introduction](index.md)
557560
558-
* New: Create the introduction page""")
561+
* New: Create the introduction page"""
562+
)
559563
changes_to_publish = DigitalGardenChanges(weekly=[change])
560564

561565
result = create_newsletters(changes_to_publish, repo)
@@ -584,10 +588,12 @@ def test_create_newsletter_creates_monthly_articles(repo: Repo) -> None:
584588
category_order=0,
585589
file_="index.md",
586590
)
587-
file_content = dedent("""\
591+
file_content = dedent(
592+
"""\
588593
# [Introduction](index.md)
589594
590-
* New: Create the introduction page""")
595+
* New: Create the introduction page"""
596+
)
591597
changes_to_publish = DigitalGardenChanges(monthly=[change])
592598

593599
result = create_newsletters(changes_to_publish, repo)
@@ -616,10 +622,12 @@ def test_create_newsletter_creates_yearly_articles(repo: Repo) -> None:
616622
category_order=0,
617623
file_="index.md",
618624
)
619-
file_content = dedent("""\
625+
file_content = dedent(
626+
"""\
620627
# [Introduction](index.md)
621628
622-
* New: Create the introduction page""")
629+
* New: Create the introduction page"""
630+
)
623631
changes_to_publish = DigitalGardenChanges(yearly=[change])
624632

625633
result = create_newsletters(changes_to_publish, repo)

tests/unit/services/test_semantic_changes.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ def test_changes_extracts_commits_with_multiple_changes(repo: Repo) -> None:
8383
commit_date = datetime.datetime(2021, 2, 5, tzinfo=tz.tzlocal())
8484
repo.index.add(["docs/devops/helm/helm.md", "docs/devops/devops.md"])
8585
repo.index.commit(
86-
textwrap.dedent("""\
86+
textwrap.dedent(
87+
"""\
8788
feat(helm): introduce Helm the Kubernetes package manager
8889
8990
[Helm](https://helm.sh/) is the package manager for Kubernetes.
@@ -99,7 +100,8 @@ def test_changes_extracts_commits_with_multiple_changes(repo: Repo) -> None:
99100
100101
One of the most important goals of the DevOps initiative is to break
101102
the silos between the developers and the sysadmins, that lead to ill
102-
feelings and unproductivity."""),
103+
feelings and unproductivity."""
104+
),
103105
author=author,
104106
committer=committer,
105107
author_date=commit_date,
@@ -109,25 +111,29 @@ def test_changes_extracts_commits_with_multiple_changes(repo: Repo) -> None:
109111
Change(
110112
date=commit_date,
111113
summary="Introduce Helm the Kubernetes package manager.",
112-
message=dedent("""\
114+
message=dedent(
115+
"""\
113116
[Helm](https://helm.sh/) is the package manager for Kubernetes.
114117
Through charts it helps you define, install and upgrade even the most
115-
complex Kubernetes applications."""),
118+
complex Kubernetes applications."""
119+
),
116120
type_="feature",
117121
scope="helm",
118122
),
119123
Change(
120124
date=commit_date,
121125
summary="Define DevOps.",
122-
message=dedent("""\
126+
message=dedent(
127+
"""\
123128
[DevOps](https://en.wikipedia.org/wiki/DevOps) is a set of practices
124129
that combines software development (Dev) and information-technology
125130
operations (Ops) which aims to shorten the systems development life
126131
cycle and provide continuous delivery with high software quality.
127132
128133
One of the most important goals of the DevOps initiative is to break
129134
the silos between the developers and the sysadmins, that lead to ill
130-
feelings and unproductivity."""),
135+
feelings and unproductivity."""
136+
),
131137
type_="feature",
132138
scope="devops",
133139
),

tests/unit/test_newsletter_template.py

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ def test_newsletter_prints_level_1_change() -> None:
2929

3030
result = create_newsletter(changes)
3131

32-
assert result == dedent("""\
32+
assert result == dedent(
33+
"""\
3334
# [Introduction](index.md)
3435
35-
* New: Add introduction""")
36+
* New: Add introduction"""
37+
)
3638

3739

3840
def test_newsletter_prints_level_2_change() -> None:
@@ -57,12 +59,14 @@ def test_newsletter_prints_level_2_change() -> None:
5759

5860
result = create_newsletter(changes)
5961

60-
assert result == dedent("""\
62+
assert result == dedent(
63+
"""\
6164
# Botany
6265
6366
## [Trees](trees.md)
6467
65-
* New: Add trees""")
68+
* New: Add trees"""
69+
)
6670

6771

6872
def test_newsletter_prints_level_3_change() -> None:
@@ -89,14 +93,16 @@ def test_newsletter_prints_level_3_change() -> None:
8993

9094
result = create_newsletter(changes)
9195

92-
assert result == dedent("""\
96+
assert result == dedent(
97+
"""\
9398
# DevOps
9499
95100
## Infrastructure as Code
96101
97102
### [Helm](helm.md)
98103
99-
* New: Add helm""")
104+
* New: Add helm"""
105+
)
100106

101107

102108
def test_template_prints_changes_in_chronological_order() -> None:
@@ -127,11 +133,13 @@ def test_template_prints_changes_in_chronological_order() -> None:
127133

128134
result = create_newsletter(changes)
129135

130-
assert result == dedent("""\
136+
assert result == dedent(
137+
"""\
131138
# [Introduction](index.md)
132139
133140
* New: Add introduction
134-
* Improvement: Add new content""")
141+
* Improvement: Add new content"""
142+
)
135143

136144

137145
def test_template_prints_changes_with_subsection_link() -> None:
@@ -154,10 +162,12 @@ def test_template_prints_changes_with_subsection_link() -> None:
154162

155163
result = create_newsletter(changes)
156164

157-
assert result == dedent("""\
165+
assert result == dedent(
166+
"""\
158167
# [Introduction](index.md)
159168
160-
* Improvement: [Add new content](index.md#article-subsection)""")
169+
* Improvement: [Add new content](index.md#article-subsection)"""
170+
)
161171

162172

163173
def test_template_prints_changes_with_message() -> None:
@@ -190,7 +200,8 @@ def test_template_prints_changes_with_message() -> None:
190200

191201
result = create_newsletter(changes)
192202

193-
assert result == dedent("""\
203+
assert result == dedent(
204+
"""\
194205
# [Introduction](index.md)
195206
196207
* Improvement: Add new content
@@ -199,7 +210,8 @@ def test_template_prints_changes_with_message() -> None:
199210
200211
* Improvement: Add more content
201212
202-
Another short change description.""")
213+
Another short change description."""
214+
)
203215

204216

205217
def test_template_prints_changes_with_long_message() -> None:
@@ -269,14 +281,16 @@ def test_template_sorts_changes_without_subsection() -> None:
269281

270282
result = create_newsletter(changes)
271283

272-
assert result == dedent("""\
284+
assert result == dedent(
285+
"""\
273286
# [DevOps](devops.md)
274287
275288
* New: Create the devops introduction page.
276289
277290
## [Helm](helm.md)
278291
279-
* New: Create the helm introduction page.""")
292+
* New: Create the helm introduction page."""
293+
)
280294

281295

282296
def test_template_group_changes_by_category() -> None:
@@ -320,7 +334,8 @@ def test_template_group_changes_by_category() -> None:
320334

321335
result = create_newsletter(changes)
322336

323-
assert result == dedent("""\
337+
assert result == dedent(
338+
"""\
324339
# [DevOps](devops.md)
325340
326341
* New: Create the devops introduction page.
@@ -330,4 +345,5 @@ def test_template_group_changes_by_category() -> None:
330345
331346
## [Trees](trees.md)
332347
333-
* New: Create the trees introduction page.""")
348+
* New: Create the trees introduction page."""
349+
)

0 commit comments

Comments
 (0)