Skip to content

Commit 49efd6d

Browse files
Merge pull request #1 from flora-hofmann-frequenz/update_cookie
Update cookiecutter
2 parents 0dda9b6 + 3944ca9 commit 49efd6d

39 files changed

+1913
-3
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": "frequenz-reporting",
6+
"description": "A highlevel interface for the reporting API",
7+
"title": "Reporting Highlevel Interface",
8+
"keywords": "reporting, highlevel, tooling, api",
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.reporting",
14+
"pypi_package_name": "frequenz-reporting-python",
15+
"github_repo_name": "frequenz-reporting-python",
16+
"default_codeowners": "@frequenz-floss/api-reporting-team",
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: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
validations:
54+
required: true
55+
- type: textarea
56+
id: extra
57+
attributes:
58+
label: Extra information
59+
description:
60+
Please write here any extra information you think it might be relevant,
61+
e.g., if this didn't happen before, or if you suspect where the problem
62+
might be.
63+
placeholder: Any extra information you think it might be relevant.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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-reporting-python/discussions/new?category=support
8+
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+
# Reporting Highlevel Interface 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 © 2024 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 © 2024 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 © 2024 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 --platform=${TARGETPLATFORM} 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: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
day: "sunday"
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 production and development ("optional" in the context of
17+
# pyproject.toml) dependency updates when they are patch and minor updates,
18+
# so we end up with less PRs being generated.
19+
# Major updates are still managed, but they'll create one PR per
20+
# dependency, as major updates are expected to be breaking, it is better to
21+
# manage them individually.
22+
groups:
23+
required:
24+
dependency-type: "production"
25+
update-types:
26+
- "minor"
27+
- "patch"
28+
optional:
29+
dependency-type: "development"
30+
update-types:
31+
- "minor"
32+
- "patch"
33+
34+
- package-ecosystem: "github-actions"
35+
directory: "/"
36+
schedule:
37+
interval: "monthly"
38+
day: "sunday"
39+
labels:
40+
- "part:tooling"
41+
- "type:tech-debt"
42+
groups:
43+
compatible:
44+
update-types:
45+
- "minor"
46+
- "patch"
47+
artifacts:
48+
patterns:
49+
- "actions/*-artifact"

.github/keylabeler.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# KeywordLabeler app configuration. For more information check:
2+
# https://github.com/ZeWaka/KeywordLabeler#readme
3+
4+
# Determines if we search the title (optional). Defaults to true.
5+
matchTitle: true
6+
7+
# Determines if we search the body (optional). Defaults to true.
8+
matchBody: true
9+
10+
# Determines if label matching is case sensitive (optional). Defaults to true.
11+
caseSensitive: true
12+
13+
# Explicit keyword mappings to labels. Form of match:label. Required.
14+
labelMappings:
15+
"part:docs": "part:docs"
16+
"part:tests": "part:tests"
17+
"part:tooling": "part:tooling"
18+
"part:❓": "part:❓"

0 commit comments

Comments
 (0)