- Fork the repo
- Clone forked version
- Create branch (from master!) with task number and descriptive name (see rule #3)
- Implement your task
- Check if your work doesn't go against the rules
- Commit changes and push branch to a remote
- Create pull request IN THIS REPO from your branch
- Check your pull request
- Wait until review is done
- Check results and answer questions
- All tests are passed
- Branch is correct and branched from master
- Pull request changes are correct (only code from one task)
- Pull request title contains task name and your surname
Please respect the template:
├───include # Your task is defined here.
├───src # !!!!! Your implementation will be here (for non-template tasks) !!!!!
└───tests
├───cmake_modules # Utils for downloading unit tests
└───unit_tests
├───headers # Mock classes and testing data
└───src # !!!!! Task unit tests !!!!!
If something does not work, check recommended environment.
If google test does not compile, try define in CMake:
gtest_disable_pthreads=ON
Tools:
- CMake 3.0+
- C++ compiler that supports C++17 filesystem (gcc recommended, because code tested only for it)
- Git
For Windows:
cmake
Qt Creator + compiler
Git
For Ubuntu:
sudo apt-get install cmake qtcreator git gcc
- Ubuntu
- Qt Creator IDE
- gcc 7.3.0+ (or latest)
- gdb
If you want to improve your code style during the training, please follow C++ Core Guidelines. Especially, you must follow these rules:
- https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#S-naming (MAKE YOUR CODE READABLE AS ENGLISH - AVOID ABBREVIATIONS AND MAGIC NUMBERS/VARIABLES!)
- https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rcpl-C (USE C++, NOT C!)
- https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#S-resource (DON'T MANUALLY CONTROL THE RESOURCES!)
- https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#S-performance (DON'T OPTIMIZE JUST BECAUSE YOU WANT!)
- https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#S-expr (DON'T REINVENT THE WHEEL AND MAKE CODE SIMPLER TO UNDERSTAND!)
- Create github account and fork this repo
- Install git
- Setup ssh access
- Learn how to:
- Clone repository:
git clone git@github.com:smay1613/LTC-STL-Student.git
(with your fork!) - Check current status (branch, remote, etc) - do this before and after any command!:
git status
- Switch to another branch:
git checkout -b task_name_YourSurname
(-b creates a branch from the current branch) - ....implement task.....
- ....check if everything is ok....
- Add files to index:
git add *changed files with code*
- Commit changes and write meaningful commit message:
git commit
- Push to remote:
git push
- ....create pull request on Github....
- Switch back to master branch:
git checkout master
- Clone repository:
- https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork
- https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork
If you want to get some experience, you can contribute to this repository:
- Add more tests for practice
- Improve CMake
- If you have bash experience, you can help with repository automation (for pull requests) using Github Actions API:
- Build
- Testing
- Labeling
- Mark counter