Skip to content

Commit

Permalink
Add contribution guide and issue templates
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelosthege committed Oct 4, 2024
1 parent e3f4492 commit 7c41ca8
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 3 deletions.
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Bug Report
description: File a bug report.
title: "[BUG]: ..."
labels: ["bug"]

body:
- type: markdown
attributes:
value: >
Thank you for taking the time to file a bug report.
Please also check the issue tracker for existing issues about the bug.
- type: textarea
attributes:
label: "Describe the issue:"
validations:
required: true

- type: textarea
attributes:
label: "Reproduceable code example:"
description: >
A short code example that reproduces the problem/missing feature.
placeholder: |
<< your code here >>
render: python
validations:
required: false

- type: textarea
attributes:
label: "Error message:"
description: >
Please include full error message, if any.
placeholder: |
<details>
Full traceback starting from `Traceback: ...`
</details>
render: shell

- type: textarea
attributes:
label: "Version information:"
description: >
EOS Version or commit SHA:
Operating system:
How did you install EOS?
placeholder: |
<details>
configuration information
</details>
validations:
required: true
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/developer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Developer issue
description: This template is for developers/maintainers only!

body:
- type: textarea
attributes:
label: Description
validations:
required: true
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Enhancement
description: Make a specific, well-motivated proposal for a feature.
title: "[ENH]: ..."
labels: [enhancement]


body:
- type: markdown
attributes:
value: >
Please post your idea first as a [Discussion](https://github.com/Akkudoktor-EOS/EOS/discussions)
to validate it and bring attention to it. After validation,
you can open this issue for a more technical developer discussion.
Check the [Contributor Guide](https://github.com/Akkudoktor-EOS/EOS/blob/main/CONTRIBUTING.md)
if you need more information.
- type: textarea
attributes:
label: "Link to discussion and related issues"
description: >
<link here>
render: python
validations:
required: false

- type: textarea
attributes:
label: "Proposed implementation"
description: >
How it could be implemented with a high level API.
render: python
validations:
required: false
48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Contributing to EOS

Thanks for taking the time to read this!

The `EOS` project is in early development, therefore we encourage contribution in the following ways:

## Bug Reports

Please report flaws or vulnerabilities in the [GitHub Issue Tracker]((https://github.com/Akkudoktor-EOS/EOS/issues)) using the corresponding issue template.

## Ideas & Features

Please first discuss the idea in a [GitHub Discussion](https://github.com/Akkudoktor-EOS/EOS/discussions) or the [Akkudoktor Forum](https://www.akkudoktor.net/forum/diy-energie-optimierungssystem-opensource-projekt/) before opening an issue.

There are just too many possibilities and the project would drown in tickets otherwise.

## Code Contributions

We welcome code contributions and bug fixes via [Pull Requests](https://github.com/Akkudoktor-EOS/EOS/pulls).
To make collaboration easier, we require pull requests to pass code style and unit tests.

### Code Style

Our code style checks use [`pre-commit`](https://pre-commit.com).

```bash
pip install -r requirements.txt
```

To run formatting automatically before every commit:

```bash
pre-commit install
```

Or run them manually:

```bash
pre-commit --all
```

### Tests

Use `pytest` to run tests locally:

```bash
python -m pytest -vs --cov modules --cov-report term-missing tests/
```
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This project provides a comprehensive solution for simulating and optimizing an

## Getting Involved

The discussion takes place in the [forum](https://www.akkudoktor.net/forum/diy-energie-optimierungssystem-opensource-projekt/). Please report bugs in the [Issue Tracker](https://github.com/Akkudoktor-EOS/EOS/issues). We welcome code contributions and bug fixes via [Pull Requests](https://github.com/Akkudoktor-EOS/EOS/pulls).
See [CONTRIBUTING.md](CONTRIBUTING.md).

## Installation

Expand Down
2 changes: 0 additions & 2 deletions flask_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
)



@app.route("/soc", methods=["GET"])
def flask_soc():
# MariaDB connection details
Expand Down Expand Up @@ -381,4 +380,3 @@ def root():
print(
f"Could not bind to host {host}:{port}. Error: {e}"
) # Error handling for binding issues

0 comments on commit 7c41ca8

Please sign in to comment.