This repo is for doing and storing small CPP experiments, it's like playing with CPP and storing its results, in a controlled and automated way. I needed this because there there so many things to play with and witness in CPP!
There are different branches for different works.
Longlived branches:
-
main branch
: used for storing all experiemnts data. themain branch
should NOT merged to any other branch anywhere! Onlydev branch
can merge intomain branch
. -
dev branch
: used only for building project other than the./experiment
folder. It's mainly for building different utils and merging features to this branch. Clone this branch for cloning only the base project and not including theexperiment folder
. TODO: add a part in ReadMe "How to clone this project."
Shortlived branches:
feature/*
: all new features are added in their respective branches and then merged to thedev
branch. for example branch name:feature/adding-makefiles
There are 3 main commands as of now
- getNewExperiment.sh To generate new Experiments under experiments/on_going folder.
- publishExperiment.sh To move the experiment from "on_going" to the experiments folder. It is automatically named when it's moved.
It was earlier planned to commit it to git also.
- fork.sh To fork (copy) the experiments to the "on_going" experiments directory. The forked experiment is automatically named.
SYNOPSIS
./utils/getNewExperiment.sh (no arguments required)
SYNOPSIS
./utils/publishExperiment.sh <existing directory path to the "on_going" experiment.>
DESCRIPTION To move the experiment from "on_going" to the experiments folder. It is automatically named when it's moved.
SYNOPSIS
utils/fork.sh <existing directory path to the experiment.>
DESCRIPTION To fork (copy) the experiment to the "on_going" experiments directory. The forked experiment is automatically named.
Use clange-format Microsoft style.
For that use
clang-format -style=Microsoft <path to c/cpp file>
and to write the change
clang-format -style=Microsoft -i <path to c/cpp file>
PublishExperiment.sh should automatically do that. it searches for all c/cpp files inside the experiment folder and runs this.
For every bash script add a comment block having this information.
#!/bin/bash
# Filename: my_script.sh
# Description: This Bash script performs a specific task.
# Usage: ./my_script.sh [OPTIONS] ARGUMENTS
# Options:
# -h, --help Show this help message and exit.
Every function definition adds a comment block having this information.
# Function: print_greeting
# Description: This function takes a name as an argument and prints a greeting message.
# Arguments:
# $1 - The name to greet.
# Returns: None
- PublishExperiment.sh have these things to
- Maintain clang-formate for the experiment to be published.
- Add auto-commit feature once published with description extraction.
- Add a Makefile for each experiment.
- Add Python script to extract tags and tasks for each experiment to be used later.
- Add support for
clang-tidy
and use it frommake
. - Add bash/python script to run multiple input test cases.
- Add support support for all types of sanitizers running automatically.