Skip to main content

Check project directories for uncommitted or unpushed work and for files like README and LICENSE.

Project description

check_project provides a command line tool for checking a variety of things on a project directory, like if you have code hidden in a git stash, or unpushed commits. Currently, it mostly assumes the project is in Git.

Typical usage often looks like this:

check_projects -d /foo/bar/baz

which would check /foo/bar/baz for the following:

  • a non-empty file in /foo/bar/baz with a name that starts with README

  • a non-empty file in /foo/bar/baz with a name that starts with LICENSE

  • /foo/bar/baz being in a git repository

  • /foo/bar/baz’s git repository having an empty stash

  • /foo/bar/baz’s git repository having remotes

  • /foo/bar/baz’s git repository having no uncommited changes

  • /foo/bar/baz’s git repository having no unpushed commits

The exit code of check_projects is 0 if all the checks pass, and 3 if any fail. Other non-zero exit codes may happen, and they indicate errors.

I’m definitely open to other checks and other version control systems. Let me know if there’s something you’re interested in.

check_projects seems to work for me, but please do not assume it works perfectly. If you’re using it for something critical, take a look at the code or let me know.

Usage

You can get help at the command line with –help:

usage: check_project [-h] [-v | -q] [-d DIRECTORY] [--ignore-unpushed]
                     [--ignore-uncommitted] [--ignore-stash]
                     [--ignore-missing-readme] [--ignore-missing-license]
                     [--ignore-no-remotes] [--ignore-unpushed-if-no-remotes]

Check project directories for uncommitted or unpushed work and for files like
README and LICENSE.

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose
  -q, --quiet
  -d DIRECTORY, --directory DIRECTORY
                        Base of the project. Defaults to current directory.
  --ignore-unpushed     Don't check for unpushed commits.
  --ignore-uncommitted  Don't check for uncommitted changes.
  --ignore-stash        Don't check for work in the stash.
  --ignore-missing-readme
                        Don't check for a README.
  --ignore-missing-license
                        Don't check for a LICENSE.
  --ignore-no-remotes   Don't check for remotes.
  --ignore-unpushed-if-no-remotes
                        Don't check for unpushed commits if there are no
                        remotes. You probably also want --ignore-no-remotes.

Installation

check_project should work on Linux and OS X, and definitely requires Git to be installed. It should work on Python 2.7, and 3.4+. It may work on Windows and other versions of Python. If you test it and it does, please let me know.

Development

Here’s what I do. Create a virtualenv. Activate it. You can run the code tests with python setup.py test. If you want to do the full suite of tests, and style checks, install tox into the virtualenv, and then run tox. You can also install the package into your virtualenv with pip install -e ..

Contact

If you have questions, comments, bug reports, heaps of praise, ideas, please make an issue at https://github.com/adamwolf/check_project.

Thanks!

Other Tools

There are numerous other tools like check_project that might suit you better.

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

check_project-0.1.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

check_project-0.1.0-py2.py3-none-any.whl (8.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file check_project-0.1.0.tar.gz.

File metadata

File hashes

Hashes for check_project-0.1.0.tar.gz
Algorithm Hash digest
SHA256 43bc6593c38571a7f04f3b975e02cb25820fb1cd9708582d5072bfd2a01011fd
MD5 6b30cbe66eb180ece2538a6e57d07b52
BLAKE2b-256 b99ea15e845f6ff6975a724bc39352d390fb88c928d365e5f5919f0c38491ebb

See more details on using hashes here.

File details

Details for the file check_project-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for check_project-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 76b0efc86d16d28962af363e69241f5d70d6311eadaafbd453a105af7fff99b0
MD5 5867c508f46cac6802f139e87545a98e
BLAKE2b-256 6c2c1ca20e54efc94c4d2a7c9521cd6212ba1af54cf7b2c743a3c7c0f7a8e04a

See more details on using hashes here.

Supported by

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