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.
Metadata
Release files for check_project 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| check_project-0.1.0.tar.gz | 15.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| check_project-0.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 24.1 kB
Release files / check_project-0.1.0.tar.gz
| Download URL | check_project-0.1.0.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43bc6593c38571a7f04f3b975e02cb25820fb1cd9708582d5072bfd2a01011fd
|
|
BLAKE2b-256 checksum How to use checksums |
b99ea15e845f6ff6975a724bc39352d390fb88c928d365e5f5919f0c38491ebb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / check_project-0.1.0-py2.py3-none-any.whl
| Download URL | check_project-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
76b0efc86d16d28962af363e69241f5d70d6311eadaafbd453a105af7fff99b0
|
|
BLAKE2b-256 checksum How to use checksums |
6c2c1ca20e54efc94c4d2a7c9521cd6212ba1af54cf7b2c743a3c7c0f7a8e04a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for check_project 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.