Skip to content

Commit b9ecd0e

Browse files
authored
chore: Add Github Issue templates & webui sysinfo (#681)
* chore: better gh templates * chore: add about - sysinfo to gh issues * fix: Webui freeze on auth error * Split Git Remote to own field * Move CONTRIBUTING.md
1 parent 70f93c7 commit b9ecd0e

File tree

12 files changed

+274
-117
lines changed

12 files changed

+274
-117
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improving Hyperion
4+
5+
---
6+
7+
<!-- Please don't delete this template or we'll close your issue -->
8+
<!-- Before creating an issue please make sure you are using the latest version of Hyperion. -->
9+
10+
<!-- Please confirm you will submit an issue. -->
11+
<!-- Issues which contain questions or support requests will be closed. -->
12+
<!-- (Update "[ ]" to "[x]" to check a box) -->
13+
14+
- [x] I confirm that this is an issue rather than a question.
15+
16+
<!-- Please ask questions here -->
17+
<!-- https://hyperion-project.org -->
18+
19+
## Bug report
20+
21+
22+
#### Steps to reproduce
23+
24+
25+
#### What is expected?
26+
27+
28+
#### What is actually happening?
29+
30+
31+
#### System
32+
<!-- Your system information - please copy paste "System info (Github Issue)" section from web configuration/system/about -->
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for Hyperion
4+
5+
---
6+
7+
<!-- Please don't delete this template or we'll close your issue -->
8+
<!-- Before creating an issue please make sure you are using the latest version of Hyperion. -->
9+
10+
## Feature request
11+
12+
<!-- Please ask questions on our Forum. -->
13+
<!-- https://hyperion-project.org -->
14+
<!-- Issues which contain questions or support requests will be closed. -->
15+
16+
#### What problem does this feature solve?
17+
18+
#### What does the proposed API look like?
19+
20+
#### How should this be implemented in your opinion?
21+
22+
#### Are you willing to work on this yourself?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!-- Please don't delete this template -->
2+
3+
<!-- PULL REQUEST TEMPLATE -->
4+
<!-- (Update "[ ]" to "[x]" to check a box) -->
5+
6+
**Summary**
7+
8+
**What kind of change does this PR introduce?** (check at least one)
9+
10+
- [ ] Bugfix
11+
- [ ] Feature
12+
- [ ] Code style update
13+
- [ ] Refactor
14+
- [ ] Docs
15+
- [ ] Build-related changes
16+
- [ ] Other, please describe:
17+
18+
If changing the UI of web configuration, please provide the **before/after** screenshot:
19+
20+
**Does this PR introduce a breaking change?** (check one)
21+
22+
- [ ] Yes
23+
- [ ] No
24+
25+
If yes, please describe the impact and migration path for existing setups:
26+
27+
**The PR fulfills these requirements:**
28+
29+
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
30+
31+
If adding a **new feature**, the PR's description includes:
32+
33+
- [ ] A convincing reason for adding this feature
34+
- [ ] Related documents have been updated (docs/docs/en)
35+
- [ ] Related tests have been updated
36+
37+
To avoid wasting your time, it's best to open a **feature request issue** first and wait for approval before working on it.
38+
39+
**Other information:**

CODING_STYLE.md

Lines changed: 0 additions & 61 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
## Translations
2+
You can participate in the translation.
3+
[![Join Translation](https://img.shields.io/badge/POEditor-translate-green.svg)](https://poeditor.com/join/project/Y4F6vHRFjA)
4+
5+
## Development Setup
6+
7+
> TODO: Be more specific, provide a Visual Studio Code workspace with plugins and pre configured build tasks
8+
9+
Get Hyperion to compile: [Compile HowTo](CompileHowTo.md)
10+
11+
## Workflow
12+
13+
### Issue
14+
15+
> TODO
16+
17+
### Pull requests
18+
19+
- Create a feature branch from the default branch (`master`) and merge back against that branch.
20+
- It's OK to have multiple small commits as you work on the PR - GitHub automatically squashes them before merging.
21+
- Make sure tests pass.
22+
- If adding a new feature:
23+
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
24+
- If fixing bug:
25+
- If you are resolving an open issue, add `(fix #xxxx)` (`#xxxx` being the issue ID) in your PR title for a better release log, e.g. `chore(feat): implement SSR (fix #1234)`.
26+
- Provide a detailed description of the bug in the PR.
27+
28+
## Code Specification
29+
30+
- use QT wherever it's possible (except there is a good reason)
31+
- use unix line endings (not windows)
32+
- indent your code with TABs instead of spaces
33+
- your files should end with a newline
34+
- names are camel case
35+
- use utf8 file encoding (ANSI encoding is strictly forbidden!)
36+
- use speaking names for variables.
37+
- avoid code dups -> if you write similar code blocks more the 2 times -> refactoring!
38+
- avoid compiler macros (#ifdef #define ...) where possible
39+
- class member variables must prefixed with underscore `int _myMemberVar`
40+
- initializer list on constructors:
41+
42+
```c++
43+
bad:
44+
MyClass::MyClass()
45+
: myVarA(0), myVarB("eee"), myVarC(true)
46+
{
47+
}
48+
49+
MyClass::MyClass() : myVarA(0),
50+
myVarB("eee"),
51+
myVarC(true)
52+
{
53+
}
54+
55+
good:
56+
MyClass::MyClass()
57+
: myVarA(0)
58+
, myVarB("eee")
59+
, myVarC(true)
60+
{
61+
}
62+
```
63+
64+
- pointer declaration
65+
66+
```c++
67+
bad:
68+
int *foo;
69+
int * fooFoo;
70+
71+
good:
72+
int* foo;
73+
```
74+
75+
### Logger
76+
Hyperion has a own logger class with different log levels.
77+
- Use macros in include/utils/logger.h
78+
- Don't use the Logger class directly unless there is a good reason to do so.
79+
``` c++
80+
// *** including
81+
#include <utils/logger.h>
82+
83+
// creating
84+
// get a logger, this will create a logger named MAIN with min loglevel INFO, DEBUG messages won't displayed
85+
Logger * log_main = Logger::getInstance("MAIN");
86+
87+
// get a logger, this will create a logger named MAIN with min loglevel DEBUG, all messages displayed
88+
Logger * log_main = Logger::getInstance("MAIN", Logger::DEBUG);
89+
90+
// using
91+
// basic
92+
Debug( log_main, "hello folks!");
93+
Info( log_main, "hello again!");
94+
Warning( log_main, "something is crazy");
95+
Error( log_main, "oh to crazy, aborting");
96+
97+
// quick logging, when only one message exists and want no typing overhead - or usage in static functions
98+
Info( Logger::getInstance("LedDevice"), "Leddevice %s started", "PublicStreetLighting");
99+
100+
// a bit mor complex - with printf like format
101+
Info( log_main, "hello %s, you have %d messages", "Dax", 25);
102+
103+
// conditional messages
104+
WarningIf( (value>threshold), log_main, "Alert, your value is greater then %d", threshold );
105+
```
106+
The amount of "%" mus match with following arguments
107+
108+
#### The Placeholders
109+
- %s for strings (this are cstrings, when having std::string use myStdString.c_str() to convert)
110+
- %d for integer numbers
111+
- %f for float numbers
112+
- more placeholders possible, see [here](http://www.cplusplus.com/reference/cstdio/printf/)
113+
114+
#### Log Level
115+
* Debug - used when message is more or less for the developer or for trouble shooting
116+
* Info - used for not absolutly developer stuff messages for what's going on
117+
* Warning - warn if something is not as it should be, but didn't harm
118+
* Error - used when an error occurs
119+
120+
121+
## Commit specification
122+
123+
> TODO

HyperionConfig.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939
// the hyperion build id string
4040
#define HYPERION_BUILD_ID "${HYPERION_BUILD_ID}"
41+
#define HYPERION_GIT_REMOTE "${HYPERION_GIT_REMOTE}"
4142

4243
#define HYPERION_VERSION_MAJOR "${HYPERION_VERSION_MAJOR}"
4344
#define HYPERION_VERSION_MINOR "${HYPERION_VERSION_MINOR}"

ISSUE_TEMPLATE

Lines changed: 0 additions & 9 deletions
This file was deleted.

PULL_REQUEST_TEMPLATE

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)