Skip to content

antrikshmisri/checkpoint

Repository files navigation

Checkpoint


checkpoint logo


pip install pycheckpoint

forthebadge made-with-python forthebadge


Codacy Badge codecov.io Maintainability

Install Checkpoint Windows Install Checkpoint MacOS Install Checkpoint Ubuntu

GitHub release Downloads PRs Welcome

Checkpoint is a tool that helps you to create restore points for your project
Unlike other tools like git, checkpoint makes the whole process as simple as a few click
Plus, there is no need for a remote repository, checkpoint does everything locally

How does it work?

Checkpoint provides multiple Sequence classes that have member functions which execute based on their order in the sequence. These sequences are used to perform all the sequential operations that are required to create a restore point. Some of these sequences are:

  • IOSequence: This sequence is used to perform all the input/output sequential operations.
  • CLISequence: This sequence is used to perform all the CLI operations which includes parsing the arguments, determining the action and performing the action.

Checkpoint also supports custom sequences that can be used to initialize checkpoint in different environments. For example, if a checkpoint is to be initialized in a UI environment a sequence for UI can be created and passed to the Checkpoint constructor.

Detailed documentation can be found here

How to use checkpoint?

To run checkpoint in UI environment, run the following command:

Run checkpoint in UI environment
checkpoint --run-ui

The following is an example of how to use checkpoint in a CLI environment.

Initialize checkpoint in the target project
checkpoint --action=init --path=path/to/project

After initialization a .checkpoint directory is created in the target project. If the project is git initialized, this directory should be added to the git ignore file.

Creating a restore point
checkpoint --name=restore_point_name --action=create --path=path/to/project
Jumping to a restore point
checkpoint --name=restore_point_name --action=restore --path=path/to/project
Deleting a restore point
checkpoint --name=restore_point_name --action=delete --path=path/to/project
Version of checkpoint
checkpoint --name=restore_point_name --action=version --path=path/to/project

Installation

pip install pycheckpoint

Development

1. Get the source code by cloning from the remote repository.
git clone https://github.com/antrikshmisri/checkpoint.git
2. Create and activate a virtual environment.
python -m venv venv
source venv/bin/activate
3. Get the dependencies
pip install -r requirements/default.txt
4. Install checkpoint as a local project.
pip install .
5. Run the tests
pip install -r requirements/test.txt
pytest -v checkpoint/tests/

Code of Conduct

Please go through the code of conduct before contributing to this project which can be found here.

Screenshots

Screenshot 2021-11-09 222450

Screenshot 2021-11-09 222154