This guide is for developers who wish to commit to or create pull requests for this repository.
Please refer to the README.md file for a simple user guide.
- Create an issue and discuss with others how to fix a bug or add a feature you need;
- Either fork (external developer) or branch (internal developer) to develope new code and keep your branch life span as short as possible;
- Create a pull request;
- An action will automatically create a release draft;
- Once steps 1-4 are repeated multiple times and a new version is ready, repo admin will publish the drafted release and a changelog will be generated automatically.
- Keep commits small, for example commit every new function added instead of a whole new functionality;
- Change as few files as possible to reduce your chance of getting conflicts with others;
- Push multiple times a day to keep the main branch always update and resolve conflicts when it's still manageable;
- Keep the HEAD on the main branch always build-able;
- Copy IssueId from Linear (if you are using
Linear
) and include it in your commit message.
- Only keep short-living branches/forks; Branches should preferably live less than one or two days. If it is impossible to finish a branch within one day, then you should split your issue into smaller goals.
We are using a mixture of trunk-based development strategy
and the github flow
, which means:
- For anything that you would like to appear on the release log and change log, you should create a short living branch and pull request;
- For anything that doesn't need to appear in change log, you can commit to the main branch directly, such as when the issue is small, nobody has reported it yet, and just changing a few lines are enough.
Use the github flow
, which means:
- Fork the repo;
- Develope the code and pull request
We list a few rule of thumbs for styling the code here:
- Use .clang-format to format the code automatically;
- Naming conventions:
- Files, classes, methods, functions: Upper Camel;
- Variables: camel;
- Constants: all upper case;
- Make your names meaningful.
- Keep all functions short and make them do only one thing;
- Provide Doxygen-style comments.
Recommend using VScode for cross-platform compatibility.
Recommend Intel oneAPI for easier cross-platform compatibility.
Make sure you adopt the modern cmake approach when writing CMakeLists.txt file. Here is a list of good articles you should read, modern cmake, some modern cmake tips, on target_sources, on PRIVATE PUBLIC INTERFACE
-
Install TeXLive ... (TBA)
-
Install doxygen ... (TBA)
-
Install doxygen2 ... (TBA)
-
Install nodejs,npm,pnpm ... (TBA)