Skip to content

Commit ecfe02a

Browse files
committed
Initial commit
Signed-off-by: Sahas Subramanian <[email protected]>
0 parents  commit ecfe02a

39 files changed

+1847
-0
lines changed

.cookiecutter-replay.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"cookiecutter": {
3+
"Introduction": "",
4+
"type": "lib",
5+
"name": "gridpool",
6+
"description": "High-level interface to grid pools for the Frequenz platform.",
7+
"title": "Frequenz Gridpool Library",
8+
"keywords": "(comma separated: 'frequenz', <type> and <name> are included automatically)",
9+
"github_org": "frequenz-floss",
10+
"license": "MIT",
11+
"author_name": "Frequenz Energy-as-a-Service GmbH",
12+
"author_email": "[email protected]",
13+
"python_package": "frequenz.gridpool",
14+
"pypi_package_name": "frequenz-gridpool",
15+
"github_repo_name": "frequenz-gridpool-python",
16+
"default_codeowners": "(like @some-org/some-team; defaults to a team based on the repo type)",
17+
"_template": "gh:frequenz-floss/frequenz-repo-config-python"
18+
},
19+
"_cookiecutter": {
20+
"Introduction": "{{cookiecutter | introduction}}",
21+
"type": [
22+
"actor",
23+
"api",
24+
"app",
25+
"lib",
26+
"model"
27+
],
28+
"name": null,
29+
"description": null,
30+
"title": "{{cookiecutter | proj_title}}",
31+
"keywords": "(comma separated: 'frequenz', <type> and <name> are included automatically)",
32+
"github_org": "frequenz-floss",
33+
"license": [
34+
"MIT",
35+
"Proprietary"
36+
],
37+
"author_name": "Frequenz Energy-as-a-Service GmbH",
38+
"author_email": "[email protected]",
39+
"python_package": "{{cookiecutter | python_package}}",
40+
"pypi_package_name": "{{cookiecutter | pypi_package_name}}",
41+
"github_repo_name": "{{cookiecutter | github_repo_name}}",
42+
"default_codeowners": "(like @some-org/some-team; defaults to a team based on the repo type)"
43+
}
44+
}

.editorconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
# Set default charset, indent style and trimming of whitespace
12+
[{.editorconfig,CODEOWNERS,LICENSE,*.{in,json,md,proto,py,pyi,toml,yaml,yml}}]
13+
charset = utf-8
14+
indent_style = space
15+
trim_trailing_whitespace = true
16+
17+
# 4 space indentation
18+
[*.{py,pyi}]
19+
indent_size = 4
20+
21+
# 2 space indentation
22+
[{.editorconfig,CODEOWNERS,LICENSE,*.{in,json,proto,toml,yaml,yml}}]
23+
indent_size = 2
24+
25+
# No indentation size specified for *.md because different blocks have
26+
# different indentation rules

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# GitHub issue form. For more information see:
2+
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
3+
4+
name: Report something is not working properly 🐛
5+
description:
6+
Use this if there is something that is not working properly. If you are not
7+
sure or you need help making something work, please ask a question instead.
8+
labels:
9+
- "priority:❓"
10+
- "type:bug"
11+
body:
12+
- type: markdown
13+
attributes:
14+
value:
15+
Thanks for taking the time to fill out this bug report!
16+
- type: textarea
17+
id: what-happened
18+
attributes:
19+
label: What happened?
20+
description: Please tell us what happened that shouldn't have.
21+
placeholder: What happened that shouldn't have.
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: what-expected
26+
attributes:
27+
label: What did you expect instead?
28+
description: Please tell us what did you expect to happen.
29+
placeholder: What did you expect to happen.
30+
validations:
31+
required: true
32+
- type: input
33+
id: version
34+
attributes:
35+
label: Affected version(s)
36+
description:
37+
Please add a comma-separated list of the versions affected by this
38+
issue.
39+
placeholder: 'Example: v0.11.0, v0.12.0'
40+
- type: dropdown
41+
id: part
42+
attributes:
43+
label: Affected part(s)
44+
description:
45+
Which parts of the repo are affected by this issue? Select all that
46+
apply.
47+
multiple: true
48+
options:
49+
- I don't know (part:❓)
50+
- Documentation (part:docs)
51+
- Unit, integration and performance tests (part:tests)
52+
- Build script, CI, dependencies, etc. (part:tooling)
53+
# TODO(cookiecutter): Add other parts
54+
# Please have in mind that that the part:xxx labels need to
55+
# be created in the GitHub repository.
56+
validations:
57+
required: true
58+
- type: textarea
59+
id: extra
60+
attributes:
61+
label: Extra information
62+
description:
63+
Please write here any extra information you think it might be relevant,
64+
e.g., if this didn't happen before, or if you suspect where the problem
65+
might be.
66+
placeholder: Any extra information you think it might be relevant.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# GitHub issue template chooser. For more information see:
2+
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
3+
4+
blank_issues_enabled: true
5+
contact_links:
6+
- name: Ask a question ❓
7+
url: https://github.com/frequenz-floss/frequenz-gridpool-python/discussions/new?category=support
8+
# TODO(cookiecutter): Make sure the GitHub repository has a discussion category "Support"
9+
# Rename the "Q&A" category to "Support" and change the emoji to 🆘 (SOS)
10+
about: Use this if you are not sure how to do something, have installation problems, etc.

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# GitHub issue form. For more information see:
2+
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
3+
4+
name: Request a feature or enhancement ✨
5+
description: Use this if something is missing or could be done better or more easily.
6+
labels:
7+
- "part:❓"
8+
- "priority:❓"
9+
- "type:enhancement"
10+
body:
11+
- type: markdown
12+
attributes:
13+
value:
14+
Thanks for taking the time to fill out this feature or enhancement
15+
request!
16+
- type: textarea
17+
id: whats-needed
18+
attributes:
19+
label: What's needed?
20+
description:
21+
Please tell us what's missing or what could be done better or more easily.
22+
placeholder: What's missing or what could be done better or more easily.
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: solution
27+
attributes:
28+
label: Proposed solution
29+
description:
30+
Please tell us how you think the needs above can be fulfilled. Only
31+
fill this field if it wasn't described above.
32+
placeholder:
33+
How do you think the needs above can be fulfilled. Only fill this field
34+
if it wasn't described above.
35+
- type: textarea
36+
id: use-cases
37+
attributes:
38+
label: Use cases
39+
description:
40+
Please tell us about the main use cases you see for this new feature or
41+
enhancement to help us understand more.
42+
placeholder:
43+
The main use cases you see for this new feature or enhancement to help
44+
us understand more.
45+
- type: textarea
46+
id: alternatives
47+
attributes:
48+
label: Alternatives and workarounds
49+
description:
50+
Please tell us if you tried any alternatives or workarounds for these
51+
use cases and how (un)useful they were.
52+
placeholder:
53+
Any alternatives or workarounds for these use cases and how (un)useful
54+
they were.
55+
- type: textarea
56+
id: additional-context
57+
attributes:
58+
label: Additional context
59+
description:
60+
Please add any additional information here - screenshots, diagrams, etc.
61+
placeholder: Any additional information here - screenshots, diagrams, etc.

.github/RELEASE_NOTES.template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Frequenz Gridpool Library Release Notes
2+
3+
## Summary
4+
5+
<!-- Here goes a general summary of what this release is about -->
6+
7+
## Upgrading
8+
9+
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
10+
11+
## New Features
12+
13+
<!-- Here goes the main new features and examples or instructions on how to use them -->
14+
15+
## Bug Fixes
16+
17+
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# License: MIT
2+
# Copyright © 2025 Frequenz Energy-as-a-Service GmbH
3+
# This Dockerfile is used to run the tests in arm64, which is not supported by
4+
# GitHub Actions at the moment.
5+
6+
FROM docker.io/library/ubuntu:20.04
7+
8+
ENV DEBIAN_FRONTEND=noninteractive
9+
10+
# Install Python 3.11 and curl to install pip later
11+
RUN apt-get update -y && \
12+
apt-get install --no-install-recommends -y \
13+
software-properties-common && \
14+
add-apt-repository ppa:deadsnakes/ppa && \
15+
apt-get install --no-install-recommends -y \
16+
ca-certificates \
17+
curl \
18+
git \
19+
python3.11 \
20+
python3.11-distutils && \
21+
apt-get clean && \
22+
rm -rf /var/lib/apt/lists/*
23+
24+
# Install pip
25+
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11
26+
27+
RUN update-alternatives --install \
28+
/usr/local/bin/python python /usr/bin/python3.11 1 && \
29+
python -m pip install --upgrade --no-cache-dir pip
30+
31+
COPY entrypoint.bash /usr/bin/entrypoint.bash
32+
33+
ENTRYPOINT ["/usr/bin/entrypoint.bash"]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
# License: MIT
3+
# Copyright © 2025 Frequenz Energy-as-a-Service GmbH
4+
set -e
5+
6+
echo "System details:" $(uname -a)
7+
echo "Machine:" $(uname -m)
8+
9+
exec "$@"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# License: MIT
2+
# Copyright © 2025 Frequenz Energy-as-a-Service GmbH
3+
# This Dockerfile is used to test the installation of the python package in
4+
# multiple platforms in the CI. It is not used to build the package itself.
5+
6+
FROM python:3.11-slim
7+
8+
RUN apt-get update -y && \
9+
apt-get install --no-install-recommends -y \
10+
git && \
11+
apt-get clean && \
12+
rm -rf /var/lib/apt/lists/* && \
13+
python -m pip install --upgrade --no-cache-dir pip
14+
15+
COPY dist dist
16+
# This git-credentials file is made available by the GitHub ci.yaml workflow
17+
COPY git-credentials /root/.git-credentials
18+
RUN git config --global credential.helper store && \
19+
pip install dist/*.whl && \
20+
rm -rf dist /root/.git-credentials

.github/dependabot.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
day: "saturday"
8+
labels:
9+
- "part:tooling"
10+
- "type:tech-debt"
11+
# Default versioning-strategy. For other versioning-strategy see:
12+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#versioning-strategy
13+
versioning-strategy: auto
14+
# Allow up to 10 open pull requests for updates to dependency versions
15+
open-pull-requests-limit: 10
16+
# We group patch updates as they should always work.
17+
# We also group minor updates, as it works too for most libraries,
18+
# typically except libraries that don't have a stable release yet (v0.x.x
19+
# branch), so we make some exceptions for them.
20+
# Major updates and dependencies excluded by the above groups are still
21+
# managed, but they'll create one PR per dependency, as breakage is
22+
# expected, so it might need manual intervention.
23+
# Finally, we group some dependencies that are related to each other, and
24+
# usually need to be updated together.
25+
groups:
26+
patch:
27+
update-types:
28+
- "patch"
29+
exclude-patterns:
30+
# pydoclint has shipped breaking changes in patch updates often
31+
- "pydoclint"
32+
minor:
33+
update-types:
34+
- "minor"
35+
exclude-patterns:
36+
- "async-solipsism"
37+
- "frequenz-repo-config*"
38+
- "markdown-callouts"
39+
- "mkdocs-gen-files"
40+
- "mkdocs-literate-nav"
41+
- "mkdocstrings*"
42+
- "pydoclint"
43+
- "pytest-asyncio"
44+
# We group repo-config updates as it uses optional dependencies that are
45+
# considered different dependencies otherwise, and will create one PR for
46+
# each if we don't group them.
47+
repo-config:
48+
patterns:
49+
- "frequenz-repo-config*"
50+
mkdocstrings:
51+
patterns:
52+
- "mkdocstrings*"
53+
54+
- package-ecosystem: "github-actions"
55+
directory: "/"
56+
schedule:
57+
interval: "monthly"
58+
day: "saturday"
59+
labels:
60+
- "part:tooling"
61+
- "type:tech-debt"
62+
groups:
63+
compatible:
64+
update-types:
65+
- "minor"
66+
- "patch"
67+
artifacts:
68+
patterns:
69+
- "actions/*-artifact"

0 commit comments

Comments
 (0)