great-scott


Namegreat-scott JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/goreckim/great-scott
SummaryAutomatically reverses Django migrations when changing git branches
upload_time2023-06-11 14:34:17
maintainerMarcin Górecki
docs_urlNone
authorMarcin Górecki
requires_python>=3.8,<4.0
licenseMIT
keywords django migrations git
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# great-scott

`great-scott` is a tool that can automatically reverse migrations in a Django project, when switching between different GIT branches.

[Installation](#installation) •
[Usage](#usage) •
[Removing GIT hooks](#removing-git-hooks)

![doc](img/doc.jpeg)

</div>


## Installation

`great-scott` can be installed in 2 easy steps:

1. **Install the tool**
 
   I recommend installing via [pipx](https://github.com/pypa/pipx):
   ```sh
   pipx install great-scott
   ```

   Alternatively, having the project's virtual-env activated, you can of course install the tool directly into virtual-env:
   ```sh
   python -m pip install great-scott
   ```

2. **Setup GIT hooks**

   After successful installation, while in the GIT-managed project folder and with virtual-env activated, execute:
   ```sh
   great-scott install
   ```


## Usage

Reversing migrations should simply work when the GIT branch is changed:

```sh
$ git checkout mig-test
Switched to branch 'main'
👀 Looking for migrations to reverse on mig-test...
⚠️ reversing migrations for importer (up to 0015)
⚠️ reversing migrations for permissions (up to 0018)
⚠️ reversing migrations for subscriptions (up to 0044)
I have reversed migrations for 3 apps!
```

👉 If you use GIT integration in any of the popular IDEs, such as PyCharm or VSCode, don't forget to properly configure the appropriate python environment there so that automatic reversing of migrations is possible.


## Removing GIT hooks

To remove the GIT hooks, execute the command (while in the project directory and with virtual-env activated):
```sh
great-scott uninstall
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/goreckim/great-scott",
    "name": "great-scott",
    "maintainer": "Marcin G\u00f3recki",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "marcin.gorecki@hey.com",
    "keywords": "Django,migrations,git",
    "author": "Marcin G\u00f3recki",
    "author_email": "marcin.gorecki@hey.com",
    "download_url": "https://files.pythonhosted.org/packages/92/be/4669a39ce3438a24ffbec2bc15e835d0a0512c17c1464bff90e2279c2e74/great_scott-0.1.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n# great-scott\n\n`great-scott` is a tool that can automatically reverse migrations in a Django project, when switching between different GIT branches.\n\n[Installation](#installation) \u2022\n[Usage](#usage) \u2022\n[Removing GIT hooks](#removing-git-hooks)\n\n![doc](img/doc.jpeg)\n\n</div>\n\n\n## Installation\n\n`great-scott` can be installed in 2 easy steps:\n\n1. **Install the tool**\n \n   I recommend installing via [pipx](https://github.com/pypa/pipx):\n   ```sh\n   pipx install great-scott\n   ```\n\n   Alternatively, having the project's virtual-env activated, you can of course install the tool directly into virtual-env:\n   ```sh\n   python -m pip install great-scott\n   ```\n\n2. **Setup GIT hooks**\n\n   After successful installation, while in the GIT-managed project folder and with virtual-env activated, execute:\n   ```sh\n   great-scott install\n   ```\n\n\n## Usage\n\nReversing migrations should simply work when the GIT branch is changed:\n\n```sh\n$ git checkout mig-test\nSwitched to branch 'main'\n\ud83d\udc40 Looking for migrations to reverse on mig-test...\n\u26a0\ufe0f reversing migrations for importer (up to 0015)\n\u26a0\ufe0f reversing migrations for permissions (up to 0018)\n\u26a0\ufe0f reversing migrations for subscriptions (up to 0044)\nI have reversed migrations for 3 apps!\n```\n\n\ud83d\udc49 If you use GIT integration in any of the popular IDEs, such as PyCharm or VSCode, don't forget to properly configure the appropriate python environment there so that automatic reversing of migrations is possible.\n\n\n## Removing GIT hooks\n\nTo remove the GIT hooks, execute the command (while in the project directory and with virtual-env activated):\n```sh\ngreat-scott uninstall\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Automatically reverses Django migrations when changing git branches",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/goreckim/great-scott",
        "Repository": "https://github.com/goreckim/great-scott"
    },
    "split_keywords": [
        "django",
        "migrations",
        "git"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f41ce28231585747a211f1641192ab26810c68e93a9387c0a5d82f0d23e4a28",
                "md5": "03834292fde270f85ec5c14f15f43207",
                "sha256": "453c196175f30109b939649547e3b7771e6c226f662d01501ce628642e3411e4"
            },
            "downloads": -1,
            "filename": "great_scott-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "03834292fde270f85ec5c14f15f43207",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 7768,
            "upload_time": "2023-06-11T14:34:16",
            "upload_time_iso_8601": "2023-06-11T14:34:16.018967Z",
            "url": "https://files.pythonhosted.org/packages/1f/41/ce28231585747a211f1641192ab26810c68e93a9387c0a5d82f0d23e4a28/great_scott-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92be4669a39ce3438a24ffbec2bc15e835d0a0512c17c1464bff90e2279c2e74",
                "md5": "0433aa4aedd4953c0ffb4e61e1f6953c",
                "sha256": "d638c8fd69e15742865c3f5f260c54475c79ad4203bda371caab3d6abc739f1b"
            },
            "downloads": -1,
            "filename": "great_scott-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0433aa4aedd4953c0ffb4e61e1f6953c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 6246,
            "upload_time": "2023-06-11T14:34:17",
            "upload_time_iso_8601": "2023-06-11T14:34:17.731598Z",
            "url": "https://files.pythonhosted.org/packages/92/be/4669a39ce3438a24ffbec2bc15e835d0a0512c17c1464bff90e2279c2e74/great_scott-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-11 14:34:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "goreckim",
    "github_project": "great-scott",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "great-scott"
}
        
Elapsed time: 0.07686s