changelist-sort


Namechangelist-sort JSON
Version 0.4.6 PyPI version JSON
download
home_pagehttps://github.com/DK96-OS/changelist-sort/
SummaryCLI Tool for Sorting Android Studio Changelists
upload_time2025-09-01 17:48:41
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. Changelist-Init
2. Changelist-Sort
3. Changelist-FOCI

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

## Project Sorting Configuration
To configure a changelist sorting patterns for your project:
1. Run: `cl-sort --generate_sort_xml` to create `.changelists/sort.xml`
2. Edit Changelist Sorting Patterns

### 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 integrated directly with sorting. When defining your sorting configuration, prefer the `name` attribute, only use key when necessary.
- 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 Modes
There are two built-in sorting modes in addition to the sorting configuration (sort.xml).
 - When sort.xml is provided, it takes precedence over the Module SortMode.
 - The SourceSet SortMode is activated by a flag, only if config not provided.

### Sorting By Module (default)
Files are sorted by the name of the top level directory they are located in.
- In Android-Gradle projects, each directory in the project root is a module, with a few exception cases.
- Often, projects contain support tools and frameworks in top level dirs.
  - These get their own changelist if not gitignored.

### Sorting By Source Set (Gradle, Android)
A specialized SortMode that splits Gradle Modules by their Source Sets.
 - Add the `-s` flag or `--sourceset-sort` to use this mode.
 - This mode is not compatible with SortXML Config.
   - It is a quick and useful default for Gradle projects (beyond the Module).

### 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/27/e8/9e631007ec2b45b7a15e6f4b10c6f53071435e76a946e1f3d94a404d540a/changelist_sort-0.4.6.tar.gz",
    "platform": null,
    "description": "# Changelist Sort\nMaking Sorting Changelist Files Easy!\n\n1. Changelist-Init\n2. Changelist-Sort\n3. Changelist-FOCI\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. Run: `cl-sort --generate_sort_xml` to create `.changelists/sort.xml`\n2. Edit Changelist Sorting Patterns\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 integrated directly with sorting. When defining your sorting configuration, prefer the `name` attribute, only use key when necessary.\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 Modes\nThere are two built-in sorting modes in addition to the sorting configuration (sort.xml).\n - When sort.xml is provided, it takes precedence over the Module SortMode.\n - The SourceSet SortMode is activated by a flag, only if config not provided.\n\n### Sorting By Module (default)\nFiles are sorted by the name of the top level directory they are located in.\n- In Android-Gradle projects, each directory in the project root is a module, with a few exception cases.\n- Often, projects contain support tools and frameworks in top level dirs.\n  - These get their own changelist if not gitignored.\n\n### Sorting By Source Set (Gradle, Android)\nA specialized SortMode that splits Gradle Modules by their Source Sets.\n - Add the `-s` flag or `--sourceset-sort` to use this mode.\n - This mode is not compatible with SortXML Config.\n   - It is a quick and useful default for Gradle projects (beyond the Module).\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.6",
    "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": null,
            "digests": {
                "blake2b_256": "0a624b808149581b28686acd7cb8596dc78e2aed6e4f81a49041c554ff674c1f",
                "md5": "f301d91d89a0a0906a86140ef9d6eeaf",
                "sha256": "cfb6cfd9ab53c9412468424da72f1750ae13c89035e0c3f61763206c06a43d07"
            },
            "downloads": -1,
            "filename": "changelist_sort-0.4.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f301d91d89a0a0906a86140ef9d6eeaf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 38949,
            "upload_time": "2025-09-01T17:48:40",
            "upload_time_iso_8601": "2025-09-01T17:48:40.182823Z",
            "url": "https://files.pythonhosted.org/packages/0a/62/4b808149581b28686acd7cb8596dc78e2aed6e4f81a49041c554ff674c1f/changelist_sort-0.4.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "27e89e631007ec2b45b7a15e6f4b10c6f53071435e76a946e1f3d94a404d540a",
                "md5": "49d079e2077cc98645da6ab46d40a4fa",
                "sha256": "e98b5ba3d0ffbdada599ee347f60fdc11a5d74588616a98b9deb894531a83197"
            },
            "downloads": -1,
            "filename": "changelist_sort-0.4.6.tar.gz",
            "has_sig": false,
            "md5_digest": "49d079e2077cc98645da6ab46d40a4fa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 32201,
            "upload_time": "2025-09-01T17:48:41",
            "upload_time_iso_8601": "2025-09-01T17:48:41.207915Z",
            "url": "https://files.pythonhosted.org/packages/27/e8/9e631007ec2b45b7a15e6f4b10c6f53071435e76a946e1f3d94a404d540a/changelist_sort-0.4.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-01 17:48:41",
    "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.4"
                ]
            ]
        }
    ],
    "lcname": "changelist-sort"
}
        
Elapsed time: 0.99918s