changelist-sort


Namechangelist-sort JSON
Version 0.4.3 PyPI version JSON
download
home_pagehttps://github.com/DK96-OS/changelist-sort/
SummaryCLI Tool for Sorting Android Studio Changelists
upload_time2025-01-02 19:09:34
maintainerNone
docs_urlNone
authorDK96-OS
requires_python>=3.10
licenseGPLv3
keywords vcs foci changelist git
VCS
bugtrack_url
requirements changelist-data
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Changelist Sort
Making Sorting Changelist Files Easy!

1. Close Android Studio (saves changelists to workspace file)
2. Open shell from project root directory (or supply workspace file path in arguments)
3. Run `changelist-sort` (or `cl-sort`) add arguments/options if necessary
4. Reopen Android Studio. Your changelists are sorted.

**Note:** Add alias to your shell environment to maximize your efficiency.

## Project Sorting Configuration
To configure a changelist sorting patterns for your project:
1. Create Directory `.changelists/`
2. Create File `sort.xml` in Directory
3. Write Sorting XML Root Tag `<sorting></sorting>`
4. Write Changelists Tags `<changelist name="" key=""></changelist>`
5. Write File Pattern Tags `<files ... /> `

### File Pattern Attributes
For each `<files />` tag, apply ONE of the following attributes:
- file_ext : Match the file extension of the file. Do not include the dot.
- first_dir : The first directory in the path. Use empty string to match root directory.
- filename_prefix : The filename startswith this prefix.
- filename_suffix : The filename endswith this prefix.
- path_start : The beginning of the parent directory path. It's usually better to exclude unnecessary slash characters. 
- path_end : The end of the parent directory path. It's usually better to exclude unnecessary slash characters. 

### Sorting Keys
The `key` attribute inside changelists is required.
- Sorting Keys are short, simple strings that identify a changelist.
- More than one Sorting Key can map to one Changelist.
- Every File pattern is associated with a Sorting Key.

## Sorting By Module (default)
Files are sorted by the name of the top level directory they are located in.
In Android projects, each directory in the project root is a module, with a few special cases.

## Sorting By Source Set (Gradle, Android)
A specialized Module Sort mode that splits changes by their source set.
Apply the `-s` flag to use this sorting mode.

### Special Changelists & Directories
There are special Changelists, and special Directories that are handled differently.
- Build Updates Changelist
- Root Directory
- Gradle Directory

**Build Updates Changelist:**
This is a changelist that is used to collect all of the files that affect the project build.
This includes all files in the gradle directory, and any file that ends with the `.gradle` file extension. There are also Gradle files that end in `.properties`, which are also sorted into the **Build Updates** Changelist.

**Root Directory:**
The Root directory is special because the file paths are really short and do not contain a module name. Often, Root directory contains `.gradle` files which are sorted into the Build Updates Changelist. Any non-Gradle files in the Root directory are sorted into a special Changelist that may be called `Root` or `Project Root`.

**Gradle Directory:**
The Gradle Directory is a direct descendant of the Root directory, and may contain `toml`, `gradle`, or `properties` files. These are all sorted into the **Build Updates** Changelist.

### Module Names and Sorting Comparisons

**Changelist Names**
The name of the changelist must match the module, ignoring letter case and removing spaces.

Otherwise, a new Changelist will be created that matches the module name.
- Underscores are replaced with spaces.
- Each Word in the Name will start with an uppercase letter.

## Remove Empty Changelists
You can remove all empty changelists after a sort has completed by adding the `-r` flag, or `--remove-empty` argument.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DK96-OS/changelist-sort/",
    "name": "changelist-sort",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "vcs, foci, changelist, git",
    "author": "DK96-OS",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/88/35/f43e1e0c4821133e6b809558e89a238a3c313524ceac350256e768f0dfe7/changelist_sort-0.4.3.tar.gz",
    "platform": null,
    "description": "# Changelist Sort\nMaking Sorting Changelist Files Easy!\n\n1. Close Android Studio (saves changelists to workspace file)\n2. Open shell from project root directory (or supply workspace file path in arguments)\n3. Run `changelist-sort` (or `cl-sort`) add arguments/options if necessary\n4. Reopen Android Studio. Your changelists are sorted.\n\n**Note:** Add alias to your shell environment to maximize your efficiency.\n\n## Project Sorting Configuration\nTo configure a changelist sorting patterns for your project:\n1. Create Directory `.changelists/`\n2. Create File `sort.xml` in Directory\n3. Write Sorting XML Root Tag `<sorting></sorting>`\n4. Write Changelists Tags `<changelist name=\"\" key=\"\"></changelist>`\n5. Write File Pattern Tags `<files ... /> `\n\n### File Pattern Attributes\nFor each `<files />` tag, apply ONE of the following attributes:\n- file_ext : Match the file extension of the file. Do not include the dot.\n- first_dir : The first directory in the path. Use empty string to match root directory.\n- filename_prefix : The filename startswith this prefix.\n- filename_suffix : The filename endswith this prefix.\n- path_start : The beginning of the parent directory path. It's usually better to exclude unnecessary slash characters. \n- path_end : The end of the parent directory path. It's usually better to exclude unnecessary slash characters. \n\n### Sorting Keys\nThe `key` attribute inside changelists is required.\n- Sorting Keys are short, simple strings that identify a changelist.\n- More than one Sorting Key can map to one Changelist.\n- Every File pattern is associated with a Sorting Key.\n\n## Sorting By Module (default)\nFiles are sorted by the name of the top level directory they are located in.\nIn Android projects, each directory in the project root is a module, with a few special cases.\n\n## Sorting By Source Set (Gradle, Android)\nA specialized Module Sort mode that splits changes by their source set.\nApply the `-s` flag to use this sorting mode.\n\n### Special Changelists & Directories\nThere are special Changelists, and special Directories that are handled differently.\n- Build Updates Changelist\n- Root Directory\n- Gradle Directory\n\n**Build Updates Changelist:**\nThis is a changelist that is used to collect all of the files that affect the project build.\nThis includes all files in the gradle directory, and any file that ends with the `.gradle` file extension. There are also Gradle files that end in `.properties`, which are also sorted into the **Build Updates** Changelist.\n\n**Root Directory:**\nThe Root directory is special because the file paths are really short and do not contain a module name. Often, Root directory contains `.gradle` files which are sorted into the Build Updates Changelist. Any non-Gradle files in the Root directory are sorted into a special Changelist that may be called `Root` or `Project Root`.\n\n**Gradle Directory:**\nThe Gradle Directory is a direct descendant of the Root directory, and may contain `toml`, `gradle`, or `properties` files. These are all sorted into the **Build Updates** Changelist.\n\n### Module Names and Sorting Comparisons\n\n**Changelist Names**\nThe name of the changelist must match the module, ignoring letter case and removing spaces.\n\nOtherwise, a new Changelist will be created that matches the module name.\n- Underscores are replaced with spaces.\n- Each Word in the Name will start with an uppercase letter.\n\n## Remove Empty Changelists\nYou can remove all empty changelists after a sort has completed by adding the `-r` flag, or `--remove-empty` argument.\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "CLI Tool for Sorting Android Studio Changelists",
    "version": "0.4.3",
    "project_urls": {
        "Homepage": "https://github.com/DK96-OS/changelist-sort/",
        "Issues": "https://github.com/DK96-OS/changelist-sort/issues",
        "Source Code": "https://github.com/DK96-OS/changelist-sort/"
    },
    "split_keywords": [
        "vcs",
        " foci",
        " changelist",
        " git"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a32785e904f46351255967e50bc6b3201feb0d4978737c5bc6781312b5f02702",
                "md5": "cd661e42437283fba360567c89e05ec7",
                "sha256": "ba022e6c79f2a85b329e0de9d10da59a938011bcc569c9665b36c58d26e3ffce"
            },
            "downloads": -1,
            "filename": "changelist_sort-0.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cd661e42437283fba360567c89e05ec7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 35084,
            "upload_time": "2025-01-02T19:09:31",
            "upload_time_iso_8601": "2025-01-02T19:09:31.847692Z",
            "url": "https://files.pythonhosted.org/packages/a3/27/85e904f46351255967e50bc6b3201feb0d4978737c5bc6781312b5f02702/changelist_sort-0.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8835f43e1e0c4821133e6b809558e89a238a3c313524ceac350256e768f0dfe7",
                "md5": "519b4c9663da022cdf24dfb0c7e579cf",
                "sha256": "d3b629b4d72cc8f58194d1daebaa12f0d65f5ae5bde1484d26431e1504912812"
            },
            "downloads": -1,
            "filename": "changelist_sort-0.4.3.tar.gz",
            "has_sig": false,
            "md5_digest": "519b4c9663da022cdf24dfb0c7e579cf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 29092,
            "upload_time": "2025-01-02T19:09:34",
            "upload_time_iso_8601": "2025-01-02T19:09:34.474528Z",
            "url": "https://files.pythonhosted.org/packages/88/35/f43e1e0c4821133e6b809558e89a238a3c313524ceac350256e768f0dfe7/changelist_sort-0.4.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-02 19:09:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DK96-OS",
    "github_project": "changelist-sort",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "changelist-data",
            "specs": [
                [
                    "~=",
                    "0.2.1"
                ]
            ]
        }
    ],
    "lcname": "changelist-sort"
}
        
Elapsed time: 0.42902s