Skip to content

Commit 8a742e1

Browse files
authored
Move TODOs so they are easier to remove (frequenz-floss#120)
While updating project to new templates, it is much easier to be able to remove whole lines than having to edit a line.
2 parents 69043ee + 5047e3c commit 8a742e1

File tree

18 files changed

+75
-46
lines changed

18 files changed

+75
-46
lines changed

RELEASE_NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@
1818

1919
### Cookiecutter template
2020

21+
2122
- Generated project's dependencies were bumped.
2223

24+
- Move `TODO`s so they are in their own line.
25+
26+
This makes it easier to upgrade projects to new templates, as removing whole lines is easier than having to edit them.
27+
2328
## Bug Fixes
2429

2530
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->

cookiecutter/{{cookiecutter.github_repo_name}}/mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ theme:
4949
name: Switch to light mode
5050

5151
extra:
52-
social: # TODO(cookiecutter): You probably want to update the links
52+
# TODO(cookiecutter): You probably want to update the social links
53+
social:
5354
- icon: fontawesome/brands/github
5455
link: https://github.com/{{cookiecutter.github_org}}
5556
- icon: fontawesome/brands/linkedin

cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ description = "{{cookiecutter.description}}"
1515
readme = "README.md"
1616
license = { text = "{{cookiecutter.license}}" }
1717
keywords = {{cookiecutter | keywords}}
18-
classifiers = [ # TODO(cookiecutter): Remove and add more if appropriate
18+
# TODO(cookiecutter): Remove and add more classifiers if appropriate
19+
classifiers = [
1920
"Development Status :: 3 - Alpha",
2021
"Intended Audience :: Developers",
2122
{%- if cookiecutter.license == "MIT" %}
@@ -31,22 +32,23 @@ classifiers = [ # TODO(cookiecutter): Remove and add more if appropriate
3132
"Typing :: Typed",
3233
]
3334
requires-python = ">= 3.11, < 4"
35+
# TODO(cookiecutter): Remove and add more dependencies if appropriate
3436
{%- if cookiecutter.type in ("app", "actor", "model") %}
35-
dependencies = [ # TODO(cookiecutter): Remove and add more if appropriate
37+
dependencies = [
3638
"typing-extensions == 4.5.0",
3739
# Make sure to update the mkdocs.yml file when
3840
# changing the version
3941
# (plugins.mkdocstrings.handlers.python.import)
4042
"frequenz-sdk == 0.24.0",
4143
]
4244
{%- elif cookiecutter.type == "api" %}
43-
dependencies = [ # TODO(cookiecutter): Remove and add more if appropriate
45+
dependencies = [
4446
"frequenz-api-common >= 0.3.1, < 0.4.0",
4547
"googleapis-common-protos >= 1.56.2, < 2",
4648
"grpcio >= 1.51.1, < 2",
4749
]
4850
{%- else %}
49-
dependencies = [ # TODO(cookiecutter): Remove and add more if appropriate
51+
dependencies = [
5052
"typing-extensions >= 4.5.0, < 5",
5153
]
5254
{%- endif %}
@@ -56,7 +58,8 @@ dynamic = ["version"]
5658
name = "{{cookiecutter.author_name}}"
5759
email = "{{cookiecutter.author_email}}"
5860

59-
[project.optional-dependencies] # TODO(cookiecutter): Remove and add more if appropriate
61+
# TODO(cookiecutter): Remove and add more optional dependencies if appropriate
62+
[project.optional-dependencies]
6063
dev-docstrings = [
6164
"pydocstyle == 6.3.0",
6265
"darglint == 1.8.1",

tests_golden/integration/test_cookiecutter_generation/actor/cookiecutter-stdout.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
./README.md:TODO(cookiecutter): Improve the README file
99
./mkdocs.yml: # TODO(cookiecutter): You might want to add other external references here
1010
./mkdocs.yml: # TODO(cookiecutter): You might want to change the logo, the file is located in "docs/"
11-
./mkdocs.yml: social: # TODO(cookiecutter): You probably want to update the links
11+
./mkdocs.yml: # TODO(cookiecutter): You probably want to update the social links
1212
./mkdocs.yml:# TODO(cookiecutter): "main" is the GitHub repo default branch, you might want to update it
13-
./pyproject.toml:[project.optional-dependencies] # TODO(cookiecutter): Remove and add more if appropriate
14-
./pyproject.toml:classifiers = [ # TODO(cookiecutter): Remove and add more if appropriate
15-
./pyproject.toml:dependencies = [ # TODO(cookiecutter): Remove and add more if appropriate
13+
./pyproject.toml:# TODO(cookiecutter): Remove and add more classifiers if appropriate
14+
./pyproject.toml:# TODO(cookiecutter): Remove and add more dependencies if appropriate
15+
./pyproject.toml:# TODO(cookiecutter): Remove and add more optional dependencies if appropriate
1616
./src/frequenz/actor/test/__init__.py:# TODO(cookiecutter): Remove this function
1717
./src/frequenz/actor/test/__init__.py:TODO(cookiecutter): Add a more descriptive module description.
1818
./tests/test_test.py:def test_test_fails() -> None: # TODO(cookiecutter): Remove

tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ theme:
4949
name: Switch to light mode
5050

5151
extra:
52-
social: # TODO(cookiecutter): You probably want to update the links
52+
# TODO(cookiecutter): You probably want to update the social links
53+
social:
5354
- icon: fontawesome/brands/github
5455
link: https://github.com/frequenz-floss
5556
- icon: fontawesome/brands/linkedin

tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/pyproject.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ description = "Test description"
1515
readme = "README.md"
1616
license = { text = "MIT" }
1717
keywords = ["frequenz", "python", "actor", "test"]
18-
classifiers = [ # TODO(cookiecutter): Remove and add more if appropriate
18+
# TODO(cookiecutter): Remove and add more classifiers if appropriate
19+
classifiers = [
1920
"Development Status :: 3 - Alpha",
2021
"Intended Audience :: Developers",
2122
"License :: OSI Approved :: MIT License",
@@ -25,7 +26,8 @@ classifiers = [ # TODO(cookiecutter): Remove and add more if appropriate
2526
"Typing :: Typed",
2627
]
2728
requires-python = ">= 3.11, < 4"
28-
dependencies = [ # TODO(cookiecutter): Remove and add more if appropriate
29+
# TODO(cookiecutter): Remove and add more dependencies if appropriate
30+
dependencies = [
2931
"typing-extensions == 4.5.0",
3032
# Make sure to update the mkdocs.yml file when
3133
# changing the version
@@ -38,7 +40,8 @@ dynamic = ["version"]
3840
name = "Frequenz Energy-as-a-Service GmbH"
3941
4042

41-
[project.optional-dependencies] # TODO(cookiecutter): Remove and add more if appropriate
43+
# TODO(cookiecutter): Remove and add more optional dependencies if appropriate
44+
[project.optional-dependencies]
4245
dev-docstrings = [
4346
"pydocstyle == 6.3.0",
4447
"darglint == 1.8.1",

tests_golden/integration/test_cookiecutter_generation/api/cookiecutter-stdout.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
./README.md:TODO(cookiecutter): Improve the README file
88
./mkdocs.yml: # TODO(cookiecutter): You might want to add other external references here
99
./mkdocs.yml: # TODO(cookiecutter): You might want to change the logo, the file is located in "docs/"
10-
./mkdocs.yml: social: # TODO(cookiecutter): You probably want to update the links
10+
./mkdocs.yml: # TODO(cookiecutter): You probably want to update the social links
1111
./mkdocs.yml:# TODO(cookiecutter): "main" is the GitHub repo default branch, you might want to update it
1212
./proto/frequenz/api/test/test.proto:// TODO(cookiecutter): Add a more descriptive package description.
1313
./proto/frequenz/api/test/test.proto:// TODO(cookiecutter): Remove this message.
1414
./py/frequenz/api/test/__init__.py:TODO(cookiecutter): Add a more descriptive module description.
15-
./pyproject.toml:[project.optional-dependencies] # TODO(cookiecutter): Remove and add more if appropriate
16-
./pyproject.toml:classifiers = [ # TODO(cookiecutter): Remove and add more if appropriate
17-
./pyproject.toml:dependencies = [ # TODO(cookiecutter): Remove and add more if appropriate
15+
./pyproject.toml:# TODO(cookiecutter): Remove and add more classifiers if appropriate
16+
./pyproject.toml:# TODO(cookiecutter): Remove and add more dependencies if appropriate
17+
./pyproject.toml:# TODO(cookiecutter): Remove and add more optional dependencies if appropriate
1818

1919
--------------------------------------------------------------------------------
2020

tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ theme:
4949
name: Switch to light mode
5050

5151
extra:
52-
social: # TODO(cookiecutter): You probably want to update the links
52+
# TODO(cookiecutter): You probably want to update the social links
53+
social:
5354
- icon: fontawesome/brands/github
5455
link: https://github.com/frequenz-floss
5556
- icon: fontawesome/brands/linkedin

tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/pyproject.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ description = "Test description"
1515
readme = "README.md"
1616
license = { text = "MIT" }
1717
keywords = ["frequenz", "python", "api", "grpc", "protobuf", "rpc", "test"]
18-
classifiers = [ # TODO(cookiecutter): Remove and add more if appropriate
18+
# TODO(cookiecutter): Remove and add more classifiers if appropriate
19+
classifiers = [
1920
"Development Status :: 3 - Alpha",
2021
"Intended Audience :: Developers",
2122
"License :: OSI Approved :: MIT License",
@@ -25,7 +26,8 @@ classifiers = [ # TODO(cookiecutter): Remove and add more if appropriate
2526
"Typing :: Typed",
2627
]
2728
requires-python = ">= 3.11, < 4"
28-
dependencies = [ # TODO(cookiecutter): Remove and add more if appropriate
29+
# TODO(cookiecutter): Remove and add more dependencies if appropriate
30+
dependencies = [
2931
"frequenz-api-common >= 0.3.1, < 0.4.0",
3032
"googleapis-common-protos >= 1.56.2, < 2",
3133
"grpcio >= 1.51.1, < 2",
@@ -36,7 +38,8 @@ dynamic = ["version"]
3638
name = "Frequenz Energy-as-a-Service GmbH"
3739
3840

39-
[project.optional-dependencies] # TODO(cookiecutter): Remove and add more if appropriate
41+
# TODO(cookiecutter): Remove and add more optional dependencies if appropriate
42+
[project.optional-dependencies]
4043
dev-docstrings = [
4144
"pydocstyle == 6.3.0",
4245
"darglint == 1.8.1",

tests_golden/integration/test_cookiecutter_generation/app/cookiecutter-stdout.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
./README.md:TODO(cookiecutter): Improve the README file
88
./mkdocs.yml: # TODO(cookiecutter): You might want to add other external references here
99
./mkdocs.yml: # TODO(cookiecutter): You might want to change the logo, the file is located in "docs/"
10-
./mkdocs.yml: social: # TODO(cookiecutter): You probably want to update the links
10+
./mkdocs.yml: # TODO(cookiecutter): You probably want to update the social links
1111
./mkdocs.yml:# TODO(cookiecutter): "main" is the GitHub repo default branch, you might want to update it
12-
./pyproject.toml:[project.optional-dependencies] # TODO(cookiecutter): Remove and add more if appropriate
13-
./pyproject.toml:classifiers = [ # TODO(cookiecutter): Remove and add more if appropriate
14-
./pyproject.toml:dependencies = [ # TODO(cookiecutter): Remove and add more if appropriate
12+
./pyproject.toml:# TODO(cookiecutter): Remove and add more classifiers if appropriate
13+
./pyproject.toml:# TODO(cookiecutter): Remove and add more dependencies if appropriate
14+
./pyproject.toml:# TODO(cookiecutter): Remove and add more optional dependencies if appropriate
1515
./src/frequenz/app/test/__init__.py:# TODO(cookiecutter): Remove this function
1616
./src/frequenz/app/test/__init__.py:TODO(cookiecutter): Add a more descriptive module description.
1717
./tests/test_test.py:def test_test_fails() -> None: # TODO(cookiecutter): Remove

0 commit comments

Comments
 (0)