Metadata-Version: 2.1
Name: changeguard
Version: 0.3.1
Summary: CLI to check if any of the original files in a repository/directory change over the course of a precommit script.
Author-email: AYF <realazthat@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Azriel Fasten.
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of
        this software and associated documentation files (the "Software"), to deal in
        the Software without restriction, including without limitation the rights to
        use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
        the Software, and to permit persons to whom the Software is furnished to do so,
        subject to the following conditions:
        
        The above copyright notice and this permission notice (including the next
        paragraph) shall be included in all copies or substantial portions of the
        Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
        FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
        COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
        IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
        CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        
Project-URL: Homepage, https://github.com/realazthat/changeguard
Project-URL: Documentation, https://github.com/realazthat/changeguard
Project-URL: Repository, https://github.com/realazthat/changeguard
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: markdown-it-py<4,>=3
Requires-Dist: mdurl<1,>=0
Requires-Dist: pathspec<1,>=0.12
Requires-Dist: pygments<3,>=2
Requires-Dist: pyyaml<7,>=6
Requires-Dist: rich<14,>=13
Requires-Dist: rich-argparse<2,>=1
Requires-Dist: types-pyyaml<7,>=6
Requires-Dist: typing-extensions<5,>=4
Provides-Extra: prod
Requires-Dist: markdown-it-py==3.0.0; extra == "prod"
Requires-Dist: mdurl==0.1.2; extra == "prod"
Requires-Dist: pathspec==0.12.1; extra == "prod"
Requires-Dist: pygments==2.17.2; extra == "prod"
Requires-Dist: pyyaml==6.0.1; extra == "prod"
Requires-Dist: rich==13.7.1; extra == "prod"
Requires-Dist: rich-argparse==1.4.0; extra == "prod"
Requires-Dist: types-pyyaml==6.0.12.20240311; extra == "prod"
Requires-Dist: typing-extensions==4.10.0; extra == "prod"
Provides-Extra: dev
Requires-Dist: argcomplete==3.2.3; extra == "dev"
Requires-Dist: autoflake==2.3.1; extra == "dev"
Requires-Dist: certifi==2024.2.2; extra == "dev"
Requires-Dist: cffi==1.16.0; extra == "dev"
Requires-Dist: cfgv==3.4.0; extra == "dev"
Requires-Dist: charset-normalizer==3.3.2; extra == "dev"
Requires-Dist: colorama==0.4.6; extra == "dev"
Requires-Dist: cryptography==42.0.5; extra == "dev"
Requires-Dist: defusedxml==0.7.1; extra == "dev"
Requires-Dist: distlib==0.3.8; extra == "dev"
Requires-Dist: docutils==0.20.1; extra == "dev"
Requires-Dist: filelock==3.13.3; extra == "dev"
Requires-Dist: identify==2.5.35; extra == "dev"
Requires-Dist: idna==3.6; extra == "dev"
Requires-Dist: importlib-metadata==7.1.0; extra == "dev"
Requires-Dist: importlib-resources==6.4.0; extra == "dev"
Requires-Dist: isort==5.13.2; extra == "dev"
Requires-Dist: jaraco-classes==3.3.1; extra == "dev"
Requires-Dist: jaraco-context==4.3.0; extra == "dev"
Requires-Dist: jaraco-functools==4.0.0; extra == "dev"
Requires-Dist: jeepney==0.8.0; extra == "dev"
Requires-Dist: jinja2==3.1.3; extra == "dev"
Requires-Dist: keyring==25.0.0; extra == "dev"
Requires-Dist: markdown-it-py==3.0.0; extra == "dev"
Requires-Dist: markupsafe==2.1.5; extra == "dev"
Requires-Dist: mdurl==0.1.2; extra == "dev"
Requires-Dist: more-itertools==10.2.0; extra == "dev"
Requires-Dist: mypy==1.8.0; extra == "dev"
Requires-Dist: mypy-extensions==1.0.0; extra == "dev"
Requires-Dist: nh3==0.2.17; extra == "dev"
Requires-Dist: nodeenv==1.8.0; extra == "dev"
Requires-Dist: pathspec==0.12.1; extra == "dev"
Requires-Dist: pexpect==4.9.0; extra == "dev"
Requires-Dist: pip-licenses==4.3.4; extra == "dev"
Requires-Dist: pkginfo==1.10.0; extra == "dev"
Requires-Dist: platformdirs==4.2.0; extra == "dev"
Requires-Dist: pre-commit==3.5.0; extra == "dev"
Requires-Dist: prettytable==3.10.0; extra == "dev"
Requires-Dist: ptyprocess==0.7.0; extra == "dev"
Requires-Dist: pycparser==2.21; extra == "dev"
Requires-Dist: pyflakes==3.2.0; extra == "dev"
Requires-Dist: pygments==2.17.2; extra == "dev"
Requires-Dist: pyright==1.1.352; extra == "dev"
Requires-Dist: pyyaml==6.0.1; extra == "dev"
Requires-Dist: readme-renderer==43.0; extra == "dev"
Requires-Dist: requests==2.31.0; extra == "dev"
Requires-Dist: requests-toolbelt==1.0.0; extra == "dev"
Requires-Dist: rfc3986==2.0.0; extra == "dev"
Requires-Dist: rich==13.7.1; extra == "dev"
Requires-Dist: rich-argparse==1.4.0; extra == "dev"
Requires-Dist: secretstorage==3.3.3; extra == "dev"
Requires-Dist: snipinator==1.0.9; extra == "dev"
Requires-Dist: toml-sort==0.23.1; extra == "dev"
Requires-Dist: tomli==2.0.1; extra == "dev"
Requires-Dist: tomlkit==0.12.4; extra == "dev"
Requires-Dist: twine==5.0.0; extra == "dev"
Requires-Dist: types-colorama==0.4.15.20240311; extra == "dev"
Requires-Dist: types-pyyaml==6.0.12.20240311; extra == "dev"
Requires-Dist: typing-extensions==4.10.0; extra == "dev"
Requires-Dist: urllib3==2.2.1; extra == "dev"
Requires-Dist: virtualenv==20.25.1; extra == "dev"
Requires-Dist: wcwidth==0.2.13; extra == "dev"
Requires-Dist: xmltodict==0.13.0; extra == "dev"
Requires-Dist: yapf==0.40.2; extra == "dev"
Requires-Dist: yq==3.2.3; extra == "dev"
Requires-Dist: zipp==3.18.1; extra == "dev"

<!--

WARNING: This file is auto-generated by snipinator. Do not edit directly.
SOURCE: `README.md.jinja2`.

-->
<!--


-->

# ChangeGuard

![Top language][9] ![GitHub License][3] [![PyPI - Version][4]][5]
[![Python Version][8]][5]

|         | Status                     | Stable                    | Unstable                  |                    |
| ------- | -------------------------- | ------------------------- | ------------------------- | ------------------ |
| Master  | [![Build and Test][1]][2]  | [![since tagged][6]][10]  |                           | ![last commit][7]  |
| Develop | [![Build and Test][11]][2] | [![since tagged][12]][13] | [![since tagged][15]][16] | ![last commit][14] |

CLI to check if your repository/directory files have changed over the span of a
script.

## What

Like hashdeep, but customized to check if any of the original files in a
repository/directory change over the course of a precommit script.

## Features

- Can use any sha256sum-like command (uses xxhash by default).
- Use `.changeguard-ignore` to ignore files that should not be checked for
  changes.

## Getting Started

### Install

#### Tested on

- WSL2 Ubuntu 20.04, Python 3.8.0
- Ubuntu 20.04, Python 3.8.0, 3.9.0, 3.10.0, 3.11.0, 3.12.0, tested in GitHub
  Actions workflow
  ([build-and-test.yml](./.github/workflows/build-and-test.yml)).

**Requirements:**

- Linux-like environment
  - Why: Uses pexpect.spawn().
- Python 3.8+
  - Why: Some dev dependencies require Python 3.8+.

```bash
# Install from pypi (https://pypi.org/project/changeguard/)
pip install changeguard

# Install from git (https://github.com/realazthat/changeguard)
pip install git+https://github.com/realazthat/changeguard.git@v0.3.1
```

### Use

## Contributions

### Development environment: Linux-like

- For running `pre.sh` (Linux-like environment).
  - Requires `pyenv`, or an exact matching version of python as in
    [`.python-version`](./.python-version).
  - `nvm` for prettier (markdown formatting).
  - `bash`, `grep`, `xxd`, `git`, `xxhash` (for scripts/workflows/tests).
  - `jq`, ([installation](https://jqlang.github.io/jq/)) required for
    [yq](https://github.com/kislyuk/yq), which is itself required for our
    `README.md` generation, which uses `tomlq` (from the
    [yq](https://github.com/kislyuk/yq) package) to include version strings from
    `pyproject.toml`.
  - Requires `nodejs` (for act).
  - Requires `go` (to run act).
  - `docker` (for act).

### Commit Process

1. (Optionally) Fork the `develop` branch.
2. Stage your files: `git add path/to/file.py`.
3. `bash scripts/pre.sh`, this will format, lint, and test the code.
4. `git status` check if anything changed (generated `README.md` for
   example), if so, `git add` the changes, and go back to the previous step.
5. `git commit -m "..."`.
6. Make a PR to `develop` (or push to develop if you have the rights).

## Release Process

These instructions are for maintainers of the project.

1. `develop` branch: Run `bash scripts/pre.sh` to ensure everything
   is in order.
2. `develop` branch: Bump the version in `pyproject.toml`, following
   semantic versioning principles. Also modify the `last_unstable_release` and
   `last_stable_release` in the `[tool.changeguard-project-metadata]` table as
   appropriate.
3. `develop` branch: Commit these changes with a message like "Prepare release
   X.Y.Z". (See the contributions section [above](#commit-process)).
4. `master` branch: Merge the `develop` branch into the `master` branch:
   `git checkout master && git merge develop --no-ff`.
5. `master` branch: Tag the release: Create a git tag for the release with
   `git tag -a vX.Y.Z -m "Version X.Y.Z"`.
6. Publish to PyPI: Publish the release to PyPI with
   `bash scripts/deploy-to-pypi.sh`.
7. Push to GitHub: Push the commit and tags to GitHub with `git push` and
   `git push --tags`.
8. `git checkout develop && git merge master` The `--no-ff` option adds a commit
   to the master branch for the merge, so refork the develop branch from the
   master branch.
9. `git push origin develop` Push the develop branch to GitHub.

[1]:
  https://github.com/realazthat/changeguard/actions/workflows/build-and-test.yml/badge.svg?branch=master
[2]:
  https://github.com/realazthat/changeguard/actions/workflows/build-and-test.yml
[3]: https://img.shields.io/github/license/realazthat/changeguard
[4]: https://img.shields.io/pypi/v/changeguard
[5]: https://pypi.org/project/changeguard/
[6]:
  https://img.shields.io/github/commits-since/realazthat/changeguard/v0.3.1/master
[7]: https://img.shields.io/github/last-commit/realazthat/changeguard/master
[8]: https://img.shields.io/pypi/pyversions/changeguard
[9]:
  https://img.shields.io/github/languages/top/realazthat/changeguard.svg?&cacheSeconds=28800
[10]:
  https://github.com/realazthat/changeguard/compare/v0.3.1...master
[11]:
  https://github.com/realazthat/changeguard/actions/workflows/build-and-test.yml/badge.svg?branch=develop
[12]:
  https://img.shields.io/github/commits-since/realazthat/changeguard/v0.3.1/develop
[13]:
  https://github.com/realazthat/changeguard/compare/v0.3.1...develop
[14]: https://img.shields.io/github/last-commit/realazthat/changeguard/develop
[15]:
  https://img.shields.io/github/commits-since/realazthat/changeguard/v0.3.1/develop
[16]:
  https://github.com/realazthat/changeguard/compare/v0.3.1...develop
