|
1 | | -## 🤝 Contributing to OMath or other Orange's Projects |
| 1 | +# Contributing |
2 | 2 |
|
3 | | -### ❕ Prerequisites |
| 3 | +## Prerequisites |
4 | 4 |
|
5 | | -- A working up-to-date OMath installation |
6 | | -- C++ knowledge |
7 | | -- Git knowledge |
8 | | -- Ability to ask for help (Feel free to create empty pull-request or PM a maintainer |
9 | | - in [Telegram](https://t.me/orange_cpp)) |
| 5 | +- C++ compiler with C++23 support (Clang 18+, GCC 14+, MSVC 19.38+) |
| 6 | +- CMake 3.25+ |
| 7 | +- Git |
| 8 | +- Familiarity with the codebase (see `INSTALL.md` for setup) |
10 | 9 |
|
11 | | -### ⏬ Setting up OMath |
| 10 | +For questions, create a draft PR or reach out via [Telegram](https://t.me/orange_cpp). |
12 | 11 |
|
13 | | -Please read INSTALL.md file in repository |
| 12 | +## Workflow |
14 | 13 |
|
15 | | -### 🔀 Pull requests and Branches |
| 14 | +1. [Fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) the repository. |
| 15 | +2. Create a feature branch from `main`. |
| 16 | +3. Make your changes, ensuring tests pass. |
| 17 | +4. Open a [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) against `main`. |
16 | 18 |
|
17 | | -In order to send code back to the official OMath repository, you must first create a copy of OMath on your github |
18 | | -account ([fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)) and |
19 | | -then [create a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) back to OMath. |
| 19 | +## Code Style |
20 | 20 |
|
21 | | -OMath development is performed on multiple branches. Changes are then pull requested into master. By default, changes |
22 | | -merged into master will not roll out to stable build users unless the `stable` tag is updated. |
| 21 | +Follow the project `.clang-format`. Run `clang-format` before committing. |
23 | 22 |
|
24 | | -### 📜 Code-Style |
| 23 | +## Building |
25 | 24 |
|
26 | | -The orange code-style can be found in `.clang-format`. |
| 25 | +Use one of the CMake presets defined in `CMakePresets.json`: |
27 | 26 |
|
28 | | -### 📦 Building |
| 27 | +```bash |
| 28 | +cmake --preset <preset-name> -DOMATH_BUILD_TESTS=ON |
| 29 | +cmake --build --preset <preset-name> |
| 30 | +``` |
29 | 31 |
|
30 | | -OMath has already created the `cmake-build` and `out` directories where cmake/bin files are located. By default, you |
31 | | -can build OMath by running `cmake --build cmake-build/build/windows-release --target omath -j 6` in the source |
32 | | -directory. |
| 32 | +Run `cmake --list-presets` to see available configurations. |
| 33 | + |
| 34 | +## Tests |
| 35 | + |
| 36 | +All new functionality must include unit tests. Run the test binary after building to verify nothing is broken. |
0 commit comments