Thank you for your interest in contributing to palpatine! 🪅
"The Dark Side Of The Force Is A Pathway To Many Abilities Some Consider To Be Unnatural." - Palpatine
Discuss the change you wish to make via issues page
First install Homebrew if you don't have it already.
If you don't have Xcode installed, you can at least run the xcode-select --install
command to install the command line tools. This will ensure you have (clang++, gcc, git etc.) installed.
Test if you have the required tools with;
clang++ --version
, if not install by runningbrew install clang++
cmake --version
(tested with 3.15.4) - if not install withbrew install cmake
make --version
- if not install withbrew install make
Tested on Ubuntu 20.04.5 LTS (Focal Fossa) with;
clang++ --version
, if not install by runningsudo apt install clang++
cmake --version
(tested with 3.15.4) - if not install withsudo apt install cmake
make --version
- if not install withsudo apt install make
Clone the repository and run either ./palpatine
or make prepare
in the root directory of the project.
Note: If you get permission denied error when running
./palpatine
you can runchmod +x palpatine
to give the executable permission to run. See more about chmod here.
This automates the traditional cmake build process (i.e. mkdir build && cd build && cmake .. && make
) and creates an executable file in the build/app
directory. Preview the prepare command
in Makefile and executable palpatine script to see what commands are being run for better understanding.
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --config Debug --target unit_tests
cd tests
./unit_tests
CMake is used to configure the following dependencies as git submodules, and they will be installed in the external
directory when the Building
step is completed:
- p-ranav/argparse - A single-file header-only C++11 library for parsing command line arguments.
- ikalnytskyi/termcolor - A header-only C++ library for printing colored messages to a terminal.
- nlohmann/json - JSON for Modern C++. Used to parse the config file and generate the static site.
You can visualize these dependencies by running make prepare
in your terminal and view the image file from build/dependency.png
. This command will require graphviz
and dot
to be installed in your system.
You can install this with brew install graphviz && brew install dot
This step is completely optional and only useful to visualize what dependencies are required. Currently, it looks like this -
- Run
clang-format -i src/*
andclang-tidy ./src/*.h ./src/*.cpp ./app/main.cpp -p build
to format and lint your changes.
Note: If you get
clang-tidy: command not found
error, you can install it withbrew install clang-tidy
on macOS orsudo apt install clang-tidy
on Linux. The-p build
flag is used to specify the build directory for the compilation database. See more about clang-tidy here.
- Update the README.md depending on the changes you made.
- Increase the version numbers
MAJOR.MINOR.PATCH
that this change will be released as.