diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..34590617 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,32 @@ +--- +name: Bug report +about: Create a report to help us improving Hyperion + +--- + + + + + + + + +- [x] I confirm that this is an issue rather than a question. + + + + +## Bug report + + +#### Steps to reproduce + + +#### What is expected? + + +#### What is actually happening? + + +#### System + \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..ffc399da --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,22 @@ +--- +name: Feature request +about: Suggest an idea for Hyperion + +--- + + + + +## Feature request + + + + + +#### What problem does this feature solve? + +#### What does the proposed API look like? + +#### How should this be implemented in your opinion? + +#### Are you willing to work on this yourself? diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..cf9b9df7 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,39 @@ + + + + + +**Summary** + +**What kind of change does this PR introduce?** (check at least one) + +- [ ] Bugfix +- [ ] Feature +- [ ] Code style update +- [ ] Refactor +- [ ] Docs +- [ ] Build-related changes +- [ ] Other, please describe: + +If changing the UI of web configuration, please provide the **before/after** screenshot: + +**Does this PR introduce a breaking change?** (check one) + +- [ ] Yes +- [ ] No + +If yes, please describe the impact and migration path for existing setups: + +**The PR fulfills these requirements:** + +- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number) + +If adding a **new feature**, the PR's description includes: + +- [ ] A convincing reason for adding this feature +- [ ] Related documents have been updated (docs/docs/en) +- [ ] Related tests have been updated + +To avoid wasting your time, it's best to open a **feature request issue** first and wait for approval before working on it. + +**Other information:** diff --git a/CODING_STYLE.md b/CODING_STYLE.md deleted file mode 100644 index 5b711f6e..00000000 --- a/CODING_STYLE.md +++ /dev/null @@ -1,61 +0,0 @@ -### Please use the following code style/guidelines - -- use QT wherever it's possible (except there is a good reason) -- use unix line endings (not windows) -- indent your code with TABs instead of spaces -- your files should end with a newline -- names are camel case -- use utf8 file encoding (ANSI encoding is strictly forbidden!) -- use speaking names for variables. -- avoid code dups -> if you write similar code blocks more the 2 times -> refactoring! -- avoid compiler macros (#ifdef #define ...) where possible -- class member variables must prefixed with underscore `int _myMemberVar` -- follow this rule for curly brackets - -``` -bad: -if (conditon) { - code -} - -good: -if (condition) -{ - code -} -``` -- initializer list on constructors: - -``` -bad: -MyClass::MyClass() - : myVarA(0), myVarB("eee"), myVarC(true) -{ -} - -MyClass::MyClass() : myVarA(0), - myVarB("eee"), - myVarC(true) -{ -} - -good: -MyClass::MyClass() - : myVarA(0) - , myVarB("eee") - , myVarC(true) -{ -} -``` - -- pointer declaration - -``` -bad: -int *foo; -int * fooFoo; - -good: -int* foo; -``` - diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..c7883262 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,123 @@ +## Translations +You can participate in the translation. +[![Join Translation](https://img.shields.io/badge/POEditor-translate-green.svg)](https://poeditor.com/join/project/Y4F6vHRFjA) + +## Development Setup + +> TODO: Be more specific, provide a Visual Studio Code workspace with plugins and pre configured build tasks + +Get Hyperion to compile: [Compile HowTo](CompileHowTo.md) + +## Workflow + +### Issue + +> TODO + +### Pull requests + +- Create a feature branch from the default branch (`master`) and merge back against that branch. +- It's OK to have multiple small commits as you work on the PR - GitHub automatically squashes them before merging. +- Make sure tests pass. +- If adding a new feature: + - Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it. +- If fixing bug: + - 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)`. + - Provide a detailed description of the bug in the PR. + +## Code Specification + +- use QT wherever it's possible (except there is a good reason) +- use unix line endings (not windows) +- indent your code with TABs instead of spaces +- your files should end with a newline +- names are camel case +- use utf8 file encoding (ANSI encoding is strictly forbidden!) +- use speaking names for variables. +- avoid code dups -> if you write similar code blocks more the 2 times -> refactoring! +- avoid compiler macros (#ifdef #define ...) where possible +- class member variables must prefixed with underscore `int _myMemberVar` +- initializer list on constructors: + +```c++ +bad: +MyClass::MyClass() + : myVarA(0), myVarB("eee"), myVarC(true) +{ +} + +MyClass::MyClass() : myVarA(0), + myVarB("eee"), + myVarC(true) +{ +} + +good: +MyClass::MyClass() + : myVarA(0) + , myVarB("eee") + , myVarC(true) +{ +} +``` + +- pointer declaration + +```c++ +bad: +int *foo; +int * fooFoo; + +good: +int* foo; +``` + +### Logger +Hyperion has a own logger class with different log levels. + - Use macros in include/utils/logger.h + - Don't use the Logger class directly unless there is a good reason to do so. +``` c++ +// *** including +#include + +// creating +// get a logger, this will create a logger named MAIN with min loglevel INFO, DEBUG messages won't displayed +Logger * log_main = Logger::getInstance("MAIN"); + +// get a logger, this will create a logger named MAIN with min loglevel DEBUG, all messages displayed +Logger * log_main = Logger::getInstance("MAIN", Logger::DEBUG); + +// using +// basic +Debug( log_main, "hello folks!"); +Info( log_main, "hello again!"); +Warning( log_main, "something is crazy"); +Error( log_main, "oh to crazy, aborting"); + +// quick logging, when only one message exists and want no typing overhead - or usage in static functions +Info( Logger::getInstance("LedDevice"), "Leddevice %s started", "PublicStreetLighting"); + +// a bit mor complex - with printf like format +Info( log_main, "hello %s, you have %d messages", "Dax", 25); + +// conditional messages +WarningIf( (value>threshold), log_main, "Alert, your value is greater then %d", threshold ); +``` +The amount of "%" mus match with following arguments + +#### The Placeholders + - %s for strings (this are cstrings, when having std::string use myStdString.c_str() to convert) + - %d for integer numbers + - %f for float numbers + - more placeholders possible, see [here](http://www.cplusplus.com/reference/cstdio/printf/) + +#### Log Level + * Debug - used when message is more or less for the developer or for trouble shooting + * Info - used for not absolutly developer stuff messages for what's going on + * Warning - warn if something is not as it should be, but didn't harm + * Error - used when an error occurs + + +## Commit specification + +> TODO \ No newline at end of file diff --git a/HyperionConfig.h.in b/HyperionConfig.h.in index a56cebee..1fb0e3eb 100644 --- a/HyperionConfig.h.in +++ b/HyperionConfig.h.in @@ -38,6 +38,7 @@ // the hyperion build id string #define HYPERION_BUILD_ID "${HYPERION_BUILD_ID}" +#define HYPERION_GIT_REMOTE "${HYPERION_GIT_REMOTE}" #define HYPERION_VERSION_MAJOR "${HYPERION_VERSION_MAJOR}" #define HYPERION_VERSION_MINOR "${HYPERION_VERSION_MINOR}" diff --git a/ISSUE_TEMPLATE b/ISSUE_TEMPLATE deleted file mode 100644 index b43a2f97..00000000 --- a/ISSUE_TEMPLATE +++ /dev/null @@ -1,9 +0,0 @@ -BEFORE YOU OPEN A NEW ISSUE! - -Search at our wiki: wiki.hyperion-project.org -Our FAQ: https://hyperion-project.org/wiki/FAQ-Frequently-Asked-Questions -And have a look at our forum: forum.hyperion-project.org -If you need help please open a new thread their! - -WE PROVIDE NO SUPPORT AT GITHUB! -All misleading issues will be closed without a announcement! diff --git a/PULL_REQUEST_TEMPLATE b/PULL_REQUEST_TEMPLATE deleted file mode 100644 index 5eb1f655..00000000 --- a/PULL_REQUEST_TEMPLATE +++ /dev/null @@ -1,9 +0,0 @@ - -**1.** Tell us something about your changes. - -**2.** If this changes affect the .conf file. Please provide the changed section - -**3.** Reference an issue (optional) - -Note: For further discussions use our forum: forum.hyperion-project.org - diff --git a/assets/webconfig/content/about.html b/assets/webconfig/content/about.html index f853ad3f..bdcd157c 100644 --- a/assets/webconfig/content/about.html +++ b/assets/webconfig/content/about.html @@ -1,11 +1,12 @@
- +
- +
-