Skip to main content

Python commodity wrapper around GitPython

Project description

git_wrapper

pypi tests Documentation Status

Python wrapper around GitPython

  • Free software: MIT license

Notes

This library only supports python 3. Some features may still work with python 2.7 but not all of the syntax and features may be compatible.

Development

git_wrapper supports both standard python virtual environment setups and pipenv, which is integrated into our Makefile. To set up a pipenv-based development enironment, you can simply run:

make dev

This will install our dev environment for the package via pipenv. It is installed with --user, so it does not affect your site-packages. Pipenv creates a unique virtualenv for us, which you can activate via:

pipenv shell

See the pipenv documentation for more detail.

Documentation

To build the documentation on your checkout, simply run:

make docs

Building

If you wish to build a local package for testing at any time, you can simply run:

make dist

this will build a package with a .dev extension that you can install for testing and verification.

Contributions

All new code should include tests that exercise the code and prove that it works, or fixes the bug you are trying to fix. Any Pull Request without tests will not be accepted. See CONTRIBUTING.rst for more details.

Pushing a new release

  1. Tag the commit that will be the new release and push the new tag to the repo.
  2. Github Actions will then automatically build and publish a new release with updated documentation.

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

0.2.11 - 2025-03-25

Changed

  • Remove remote for re-creating it if url has changed.
  • Fix the format of the readthedocs config file.
  • Update deprecated action versions.
  • Removed incorrect version references.
  • Update github action versions.

0.2.10 - 2022-09-30

Changed

  • Add function to convert a commit reference to a commit hexsha.

0.2.9 - 2022-06-30

Changed

  • Added Prune Functionality To Fetch.
  • Added Information About Integration Tests To Docs.
  • Update mergify config to use queue instead of merge.
  • Fixes for publish job.
  • Update documentation to support new 'autochangelog' setup.
  • Initial automation of changelog generation.
  • Commit_format should be an internal-only method.
  • Remove dangling reference to Python 2.7, no longer supported.
  • Replace %s string substitutions with f-strings.
  • Switch to f-string over .format method.
  • Limit to run only on master.
  • Remove python 2-specific code.
  • Use tox for make test target.
  • Change fetch-depth to get correct tag info for builds.
  • Change how we generate version for test pypi builds.
  • Fix deploy job.
  • Improvements to publish github action.
  • Fix typo in readme.
  • Revamp our build process to be more in line with our other projects.

0.2.8 - 2021-07-29

Changed

  • Prep for version 0.2.8 release.
  • Add publish action.
  • Tweaks to workflow.
  • Modify to allow tag listing.
  • [#GH-75] Create GitHub Action CI job for twine check.
  • Mergify update (#81).

0.2.7 - 2021-04-28

Changed

  • Prepare 0.2.7 release.
  • Ensure apply_diff also includes new files when committing changes.
  • Fix branch names in github action (#79).
  • Use Github Actions to run the tests and remove Travis (#78).

0.2.6 - 2021-02-11

Changed

  • Prepare 0.2.6 release.
  • Provide new helper related to the log.
  • Move property initialisation to init.

0.2.5 - 2021-01-12

Changed

  • Preps for 0.2.5 release.

0.2.4.1 - 2021-01-11

Changed

  • Update version to 0.2.4.1.
  • Fix RST formatting error preventing uploads to Pypi.

0.2.4 - 2021-01-11

Changed

  • Prep for 0.2.4 release.
  • Add function to grep logs (#71).
  • Add function to cherry-pick a commit.
  • Preserve square brackets in commit messages when applying patches.

0.2.3 - 2020-12-15

Changed

  • Prep for 0.2.3 release.
  • Add option to checkout newly created branches.
  • Add option to run the integration tests with podman.
  • Update README with new release instructions.

0.2.2 - 2020-07-20

Changed

  • Prepare 0.2.2 release.
  • New function to check if a commit exists on a given remote branch.

0.2.1 - 2019-04-16

Changed

  • Prep for version 0.2.1 release.
  • Add tagging functions.
  • Add function to compare commit references.
  • Check reference exists in commit.describe.
  • Update travis url so mergify works.
  • Update mergify config for v2 api.

0.2.0 - 2019-01-18

Changed

  • Prep for version 0.2.0 release.
  • Add convenience method for creating a branch.
  • Add convenience method for checking if a branch exists.
  • Fix broken doc string.
  • Add functionality to refresh a repository's remotes.
  • Add --bare cloning option.
  • Add log diff functionality.
  • Allow customised commit message for reverts.
  • Integration tests for some GitCommit/GitBranch functions.
  • Improve a few doc strings.
  • Removing python 3.5 tests.
  • Add a couple of examples to the usage doc.
  • Move describe to GitCommit.
  • Move apply and reverse functions to GitBranch.
  • Rename GitWrapperCommit into GitCommit.
  • Move cherry functions into GitBranch.
  • Move rebase functionality into GitBranch.
  • Move clone functionality into base GitRepo.
  • Move Remote functions into their own class.
  • GitWrapperBase becomes GitRepo.
  • Logging setup improvements.
  • Minor string formatting improvements.
  • Add functionality to destroy a repo and reclone it.
  • Add git clone support.
  • Add Tox & Travis support for py37.
  • Skeleton code for integration tests.
  • Add back support for Python 2.7.
  • Add support for applying a diff.
  • Add support for applying a patch.
  • Add support for basic committing and commit revert.
  • Refactor branch/hash checks into a decorator.
  • Fix rebasing on branch issue.
  • Adding contributors.
  • Drop py34 from Travis environments.
  • Move setup to use pbr.
  • Add coverage in tests reports.
  • Avoid sending git CommandError back to the user.
  • Unify 'mock' imports.
  • Drop py34.
  • Add basic logging in more places.
  • Fix several doc strings formatting.
  • Fixing readthedocs not generating api information.
  • Add support for basic rebase + abort.
  • Fix a couple of typos.
  • Fixing inconsistent quote marks in doc strings.
  • Removing the Travis CI python2.7 config.
  • Removing python 2 support.
  • Adding the wrapt dependency to simplify the Python 2 code for the.
  • Signature() is Python 3.5 only. inspect.getcallargs() doesn't.

0.1.0 - 2018-07-05

Changed

  • Preping of tag 0.1.0.
  • Fixing mergify config file whitespace (#12).
  • Correcting the HISTORY.rst file.
  • Adding a mergify config (#10).
  • Moving away from pipenv. (#5).
  • Fixing tox.ini flake8 for tests.
  • Merge pull request #6 from jpichon/fix-make-lint.
  • 'Make lint' should match the tox setup.
  • Adding GitWrapperCherry (#4).

0.0.1 - 2018-06-20

Changed

  • Adding a wrapper base class and unit tests. (#3).
  • Fixing travis-ci badge. (#2).
  • Initial project structure (#1).
  • Initial commit of README.rst.

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

git_wrapper-0.2.11.tar.gz (43.2 kB view details)

Uploaded Source

Built Distribution

git_wrapper-0.2.11-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file git_wrapper-0.2.11.tar.gz.

File metadata

  • Download URL: git_wrapper-0.2.11.tar.gz
  • Upload date:
  • Size: 43.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for git_wrapper-0.2.11.tar.gz
Algorithm Hash digest
SHA256 fbefc7e61fc2bb8bec211c6c77884a042767245cf6634311de7f3c43692c3cc7
MD5 5d617872653e20c551638c5b5cb41558
BLAKE2b-256 13294185ffb9f825a1d31965511078e06f051a81ceed899d2d859ca8f7743b6c

See more details on using hashes here.

File details

Details for the file git_wrapper-0.2.11-py3-none-any.whl.

File metadata

  • Download URL: git_wrapper-0.2.11-py3-none-any.whl
  • Upload date:
  • Size: 38.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for git_wrapper-0.2.11-py3-none-any.whl
Algorithm Hash digest
SHA256 5ec23f9e1e881ac4b82aff5235acb5c8141e4aa5ac5467f413077da2d12b9742
MD5 05ddc0065b40a249788d11266c344231
BLAKE2b-256 27c7ca90965664a3e98ad683a2f0f62776373e2b92632577d550d4d0a216eb4d

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