Skip to content

Commit eba0f89

Browse files
committed
Move copyright and license as code comments
When generating the documentation, the License and Copyright text appears on every module. It might be confusing for users if the license applies to the code or the documentation. This commit just moves the copyright notice and license specification as a regular comment instead of putting it into the docstring that gets rendered as documentation. This was automatically adjusted using: ```sh find -name '*.py' -not -path './.*' \ | xargs sed -i '1 i\# License: MIT\n# Copyright © 2022 Frequenz Energy-as-a-Service GmbH\n' find -name '*.py' -not -path './.*' \ | xargs sed -zi 's/\n\?\(Copyright\|License\)\n[^\n]*\n\n\?//g' find -name '*.py' -not -path './.*' \ | xargs sed -zi 's/\("""[^\n]\+\)\n"""/\1"""/g' ``` Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 7c20848 commit eba0f89

File tree

102 files changed

+307
-685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+307
-685
lines changed

benchmarks/data_ingestion/benchmark_microgrid_data.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"""Benchmark for microgrid data.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""Benchmark for microgrid data."""
95

106
import asyncio
117
import time

benchmarks/power_distribution/power_distributor.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"""Check how long it takes to distribute power.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""Check how long it takes to distribute power."""
95

106
import asyncio
117
import csv

examples/__init__.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
"""Examples for the sdk.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""Examples for the sdk."""

examples/sdk_resampling_example.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"""Frequenz Python SDK resampling example.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""Frequenz Python SDK resampling example."""
95

106
import asyncio
117

examples/sdk_usage_example.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
3+
14
"""Frequenz Python SDK usage examples.
25
36
This example creates two users.
47
One user sends request with power to apply in PowerDistributor.
58
Second user receives requests and set that power.
6-
7-
Copyright
8-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
9-
10-
License
11-
MIT
129
"""
1310

1411
import asyncio

noxfile.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
3+
14
from typing import List
25
import nox
36

src/frequenz/sdk/__init__.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
"""
2-
Frequenz Python SDK.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
33

4-
Copyright
5-
Copyright © 2021 Frequenz Energy-as-a-Service GmbH
6-
7-
License
8-
MIT
9-
"""
4+
"""Frequenz Python SDK."""

src/frequenz/sdk/_internal/__init__.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
"""
2-
Utility types and functions for internal use.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
33

4-
Copyright
5-
Copyright © 2021 Frequenz Energy-as-a-Service GmbH
6-
7-
License
8-
MIT
9-
"""
4+
"""Utility types and functions for internal use."""
105

116
from .singleton_meta import SingletonMeta
127

src/frequenz/sdk/_internal/singleton_meta.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
"""
2-
Definition of Singleton metaclass.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
33

4-
Copyright
5-
Copyright © 2021 Frequenz Energy-as-a-Service GmbH
6-
7-
License
8-
MIT
9-
"""
4+
"""Definition of Singleton metaclass."""
105

116
from threading import Lock
127
from typing import Any, Dict

src/frequenz/sdk/actor/__init__.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
"""A base class for creating simple composable actors.
1+
# License: MIT
2+
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
23

3-
Copyright
4-
Copyright © 2022 Frequenz Energy-as-a-Service GmbH
5-
6-
License
7-
MIT
8-
"""
4+
"""A base class for creating simple composable actors."""
95

106
from .channel_registry import ChannelRegistry
117
from .decorator import actor

0 commit comments

Comments
 (0)