{ "info": { "author": "Gabriel Bretschner", "author_email": "bretschner@i6.informatik.rwth-aachen.de", "bugtrack_url": null, "classifiers": [], "description": "# checkout_code\nTool to checkout a specific commit to a unique location\n\n## installation\n\n```\npip install .\n```\n\n## usage\n\n```\ncheckout_code\n --repository /path/to/git/repo\n --checkout-dir /path/to/version/location\n -c commit_hash\n --use-prefix\n```\n\n`--use-prefix` prefixes the directories in `checkout_dir` with the repository name\n\nTo get the final path use an additional `--get-path`, i.e.\n\n```\ncheckout_code\n --repository /path/to/git/repo\n --checkout-dir /path/to/version/location\n -c commit_hash\n --use-prefix\n --get-path\n```\nthis will only print the path but **not** checkout the code. Its intendented to be used in a variable.\n\n\n## example usage in scripts\n\n\n```\nsource env/bin/activate\nCOMMIT=\"b59616685000ddb5583186bcb7fd4b3e3d481f19\"\ncheckout_code --repository ~/src/sockeye --checkout-dir ~/work/sockeye/ -c $COMMIT --use-prefix\npath=$(checkout_code --repository ~/src/sockeye --checkout-dir ~/work/sockeye/ -c $COMMIT --use-prefix --get-path)\nexport PYTHONPATH=\"$path:$PYTHONPATH\"\n```\n\n## development version a.k.a `HEAD`\n\nif you specify the commit as `HEAD` the tool will not checkout anything but the `--get-path` option will return your repository. That way you can use `HEAD` to point to your latest, possible uncommited, version\n\n## environment files\n\nTo make it easier to use you can also use [`.env`](https://github.com/theskumar/python-dotenv) files instead or in addition to CLI-options. You can specify the file by using `--env /path/to/.env/file` or it will [automatically search for files](https://github.com/theskumar/python-dotenv#getting-started). In the environment file just use\n```\nrepository=/path/to/repo\ncheckout_dir=/path/to/checkout_dir\nuse_prefix=True\n```\nto specify your settings.\n\n**Note** command line arguments will always override environment settings\n\n\n## version history\n\n### 0.1 2018-03-08\n\n* initial version\n\n### 0.2 2018-03-08\n\n* added file lock\n* added requirements\n\n### 0.3 2018-03-20\n\n* added loading of env files\n\n### 0.4 2018-07-13\n\n* return exit code 1 if checkout_dir does not exists\n\n### 0.5 2019-02-08\n\n* add default timeout for filelock (closes [#2](https://github.com/kanedo/checkout_code/issues/2))\n* added option to change timeout value\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kanedo/checkout_code", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "checkout-code", "package_url": "https://pypi.org/project/checkout-code/", "platform": "", "project_url": "https://pypi.org/project/checkout-code/", "project_urls": { "Homepage": "https://github.com/kanedo/checkout_code" }, "release_url": "https://pypi.org/project/checkout-code/0.5/", "requires_dist": [ "GitPython", "filelock", "python-dotenv" ], "requires_python": "", "summary": "Tool to checkout a specific commit to a unique location", "version": "0.5" }, "last_serial": 4794978, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "9ace5b59e52966d7cfdc0d6db4749f3f", "sha256": "82205516c8c0f50d40134fc4012280e7aa5a8e40d15a9c07cb73c3adfc6af1ca" }, "downloads": -1, "filename": "checkout_code-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "9ace5b59e52966d7cfdc0d6db4749f3f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3960, "upload_time": "2019-02-08T10:13:19", "url": "https://files.pythonhosted.org/packages/7b/31/b91d3b6640e5999b69a97e3d907a73ef640caa7308aed89637fd84e99838/checkout_code-0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7f9ff260ad7e17704cc444a7656882e5", "sha256": "814e1457a6ed2b50fff54f4473c143dd8f821076340f31c10f3f02df2bd5c0f0" }, "downloads": -1, "filename": "checkout_code-0.5.tar.gz", "has_sig": false, "md5_digest": "7f9ff260ad7e17704cc444a7656882e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3708, "upload_time": "2019-02-08T10:13:21", "url": "https://files.pythonhosted.org/packages/19/74/84cd46eadb02ad942b26b830353f6e02b23fa456784c7d58fd4a06163a40/checkout_code-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9ace5b59e52966d7cfdc0d6db4749f3f", "sha256": "82205516c8c0f50d40134fc4012280e7aa5a8e40d15a9c07cb73c3adfc6af1ca" }, "downloads": -1, "filename": "checkout_code-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "9ace5b59e52966d7cfdc0d6db4749f3f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3960, "upload_time": "2019-02-08T10:13:19", "url": "https://files.pythonhosted.org/packages/7b/31/b91d3b6640e5999b69a97e3d907a73ef640caa7308aed89637fd84e99838/checkout_code-0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7f9ff260ad7e17704cc444a7656882e5", "sha256": "814e1457a6ed2b50fff54f4473c143dd8f821076340f31c10f3f02df2bd5c0f0" }, "downloads": -1, "filename": "checkout_code-0.5.tar.gz", "has_sig": false, "md5_digest": "7f9ff260ad7e17704cc444a7656882e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3708, "upload_time": "2019-02-08T10:13:21", "url": "https://files.pythonhosted.org/packages/19/74/84cd46eadb02ad942b26b830353f6e02b23fa456784c7d58fd4a06163a40/checkout_code-0.5.tar.gz" } ] }