diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..ca2991e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -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: | +
+ Full traceback starting from `Traceback: ...` +
+ render: shell + +- type: textarea + attributes: + label: "Version information:" + description: > + EOS Version or commit SHA: + Operating system: + How did you install EOS? + placeholder: | +
+ configuration information +
+ validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/developer.yml b/.github/ISSUE_TEMPLATE/developer.yml new file mode 100644 index 0000000..9dfa51b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/developer.yml @@ -0,0 +1,9 @@ +name: Developer issue +description: This template is for developers/maintainers only! + +body: +- type: textarea + attributes: + label: Description + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/enhancement.yml b/.github/ISSUE_TEMPLATE/enhancement.yml new file mode 100644 index 0000000..0debfc2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.yml @@ -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: > + + 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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e4fbc3d --- /dev/null +++ b/CONTRIBUTING.md @@ -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/ +``` diff --git a/README.md b/README.md index 8d86e25..1a3f34c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/flask_server.py b/flask_server.py index 9da654c..165c6df 100755 --- a/flask_server.py +++ b/flask_server.py @@ -31,7 +31,6 @@ ) - @app.route("/soc", methods=["GET"]) def flask_soc(): # MariaDB connection details @@ -381,4 +380,3 @@ def root(): print( f"Could not bind to host {host}:{port}. Error: {e}" ) # Error handling for binding issues -