Skip to main content

Create restore points in your projects

Project description

checkpoint

Codacy Badge codecov.io GitHub release Downloads PRs Welcome

forthebadge made-with-python

Create restore points for your project locally

Checkpoint is a tool that helps you to create restore points for your project. This is very similar to git tagging, the only difference between these two is that checkpoint doesn't require the project to be git initialized. It also doesn't require you to have a git remote.

How does it work?

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

  • IOSequence: This sequence is used to perfrom all the input/output sequentional 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 checkpoint isto be initialized in a UI enviroment a sequence for UI can be created and passed to the Checkpoint constructor.

How to use checkpoint?

Currently, checkpoint can only be used in a CLI environment. 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
Restoring 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

Installation

pip install pycheckpoint

Development

1. Get the source code by cloning from 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.txt
4. Install checkpoint as a local project.
pip install .
5. Run the tests
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-10-24 225447 Screenshot 2021-10-24 225716

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycheckpoint-1.2.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

pycheckpoint-1.2-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file pycheckpoint-1.2.tar.gz.

File metadata

  • Download URL: pycheckpoint-1.2.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for pycheckpoint-1.2.tar.gz
Algorithm Hash digest
SHA256 36cb3a39d2fd514232612307278c5050eeca2ba1344fcf3849ff9619b37aa6d8
MD5 cff8bf2a3dc42219ae3162cce234cd75
BLAKE2b-256 84c10e1862ff46ee389125d6165fc3a48a4037a901d214da3f9ec132b5ee9cb8

See more details on using hashes here.

File details

Details for the file pycheckpoint-1.2-py3-none-any.whl.

File metadata

  • Download URL: pycheckpoint-1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for pycheckpoint-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 719c4fa5f5fd6ea6b4879c99f430ad6133c2149af204a1de504bce4cded6298b
MD5 6d0fdee77daa07c015c6a37415f54eb8
BLAKE2b-256 4f4e3a53102c20f75335296b480dcc63450ff8e73d287b9e12c0b448a7675ee0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page