# Changelist Data
Data Management for Changelists CLI Tools.
## Usage Scenarios
This package is designed for the purpose of serving other changelist packages, and reducing code duplication.
### Storage Scenarios
There are two storage options for Changelists.
- The first is the `.idea/workspace.xml` file associated with popular IDEs.
- The second is a dedicated `.changelists/data.xml` file managed by changelist-data on behalf of other changelist tools.
Each changelist tool must be compatible with both storage options. The goal of this package is to provide access to both storage options, and support the file reading and writing needs of all changelist tools.
#### Changelist Tools
The Data Storage needs of the Changelist Tools:
- Changelist Init
- Find & Update Existing Storage File
- Create New Changelists File
- ChangeList Sort
- Find, Load & Update Existing Storage File
- ChangeList FOCI
- Find & Read Existing Storage File
## Package Structure
Call the public methods of the appropriate package for the level of detail required.
- `changelist_data/` contains shared data classes.
- `changelist_data/storage/` contains storage methods for read and write access.
- `changelist_data/xml/` contains some xml tree abstractions and modules.
- `changelist_data/xml/changelists/` changelists data xml management.
- `changelist_data/xml/workspace/` workspace xml management.
### Changelist Data
The highest level package does not import anything during initialization, or provide package level methods.
It contains the common data classes shared by Changelist packages.
#### Common Data Classes
`class FileChange` : Individual Files
- before_path: str | None = None
- before_dir: bool | None = None
- after_path: str | None = None
- after_dir: bool | None = None
`class Changelist` : Lists of Files
- id: str
- name: str
- changes: list[FileChange] = field(default_factory=lambda: [])
- comment: str = ""
- is_default: bool = False
### Storage Package
This package contains modules for both workspace and changelist storage options.
The storage option is passed in as an enum. Sensible default values are included.
- `read_storage(StorageType, Path) -> list[Changelist]`
- `load_storage(StorageType, Path) -> ChangelistsDataStorage`
**Storage File Management**:
- Find Existing Storage File and Read or Load it (Default is Changelists data xml)
- Search for Storage File via Argument (workspace file argument backwards compatibility)
- Create Changelists Data File if not exists
**Read-Only Changelist Requirements**:
- Find and Read the Workspace File into a List of Changelist data objects
- Find and Read the Changelists Data File into a List of Changelist data objects
**Loading Changelist Data Tree Structures**:
- Existing File is Loaded into one of the two Tree classes
- Tree classes handle updates to the storage data file
#### File Validation Module
This module determines if a storage option is already in use (one of those files exists).
- Check if `.idea/workspace.xml` exists
- Check if `.changelists/data.xml` exists
- Check given workspace_xml or data_xml file argument exists
- Validate the Input File, prevent loading any file over 32MB
#### XML Changelists Package
This package provides all the methods one may need for processing Changelists XML.
- `read_xml(changelists_xml: str) -> list[Changelist]`
- `load_tree(changelists_xml: str) -> ChangelistsTree`
- `new_tree() -> ChangelistsTree`
The `new_tree` method is a shortcut for creating a Changelists XML Tree.
This is to be used when initializing changelist workflows for the first time in a project.
#### XML Workspace Package
This package provides methods for processing Workspace XML.
- `read_xml(workspace_xml: str) -> list[Changelist]`
- `load_tree(workspace_xml: str) -> WorkspaceTree`
Raw data
{
"_id": null,
"home_page": "https://github.com/DK96-OS/changelist-data/",
"name": "changelist-data",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "changelist, vcs",
"author": "DK96-OS",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/22/00/b733def62c61b942fc814283d9bcd1d81646a8fd3209a9c95aa909248165/changelist_data-0.2.1.tar.gz",
"platform": null,
"description": "# Changelist Data\nData Management for Changelists CLI Tools.\n\n## Usage Scenarios\nThis package is designed for the purpose of serving other changelist packages, and reducing code duplication.\n\n### Storage Scenarios\nThere are two storage options for Changelists.\n- The first is the `.idea/workspace.xml` file associated with popular IDEs.\n- The second is a dedicated `.changelists/data.xml` file managed by changelist-data on behalf of other changelist tools.\n\nEach changelist tool must be compatible with both storage options. The goal of this package is to provide access to both storage options, and support the file reading and writing needs of all changelist tools.\n\n#### Changelist Tools\nThe Data Storage needs of the Changelist Tools:\n- Changelist Init\n - Find & Update Existing Storage File\n - Create New Changelists File\n- ChangeList Sort\n - Find, Load & Update Existing Storage File\n- ChangeList FOCI\n - Find & Read Existing Storage File\n\n## Package Structure\nCall the public methods of the appropriate package for the level of detail required.\n- `changelist_data/` contains shared data classes.\n- `changelist_data/storage/` contains storage methods for read and write access.\n- `changelist_data/xml/` contains some xml tree abstractions and modules.\n- `changelist_data/xml/changelists/` changelists data xml management.\n- `changelist_data/xml/workspace/` workspace xml management.\n\n### Changelist Data\nThe highest level package does not import anything during initialization, or provide package level methods.\nIt contains the common data classes shared by Changelist packages.\n\n#### Common Data Classes\n`class FileChange` : Individual Files\n- before_path: str | None = None\n- before_dir: bool | None = None\n- after_path: str | None = None\n- after_dir: bool | None = None\n\n`class Changelist` : Lists of Files\n- id: str\n- name: str\n- changes: list[FileChange] = field(default_factory=lambda: [])\n- comment: str = \"\"\n- is_default: bool = False\n\n### Storage Package\nThis package contains modules for both workspace and changelist storage options.\nThe storage option is passed in as an enum. Sensible default values are included.\n- `read_storage(StorageType, Path) -> list[Changelist]`\n- `load_storage(StorageType, Path) -> ChangelistsDataStorage`\n\n**Storage File Management**:\n- Find Existing Storage File and Read or Load it (Default is Changelists data xml)\n- Search for Storage File via Argument (workspace file argument backwards compatibility)\n- Create Changelists Data File if not exists\n\n**Read-Only Changelist Requirements**:\n- Find and Read the Workspace File into a List of Changelist data objects\n- Find and Read the Changelists Data File into a List of Changelist data objects\n\n**Loading Changelist Data Tree Structures**: \n- Existing File is Loaded into one of the two Tree classes\n- Tree classes handle updates to the storage data file\n\n#### File Validation Module\nThis module determines if a storage option is already in use (one of those files exists).\n- Check if `.idea/workspace.xml` exists\n- Check if `.changelists/data.xml` exists\n- Check given workspace_xml or data_xml file argument exists\n- Validate the Input File, prevent loading any file over 32MB\n\n#### XML Changelists Package\nThis package provides all the methods one may need for processing Changelists XML.\n- `read_xml(changelists_xml: str) -> list[Changelist]`\n- `load_tree(changelists_xml: str) -> ChangelistsTree`\n- `new_tree() -> ChangelistsTree`\n\nThe `new_tree` method is a shortcut for creating a Changelists XML Tree.\nThis is to be used when initializing changelist workflows for the first time in a project.\n\n#### XML Workspace Package\nThis package provides methods for processing Workspace XML.\n- `read_xml(workspace_xml: str) -> list[Changelist]`\n- `load_tree(workspace_xml: str) -> WorkspaceTree`\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "Data package for Changelists CLI Tools",
"version": "0.2.1",
"project_urls": {
"Homepage": "https://github.com/DK96-OS/changelist-data/",
"Issues": "https://github.com/DK96-OS/changelist-data/issues",
"Source Code": "https://github.com/DK96-OS/changelist-data/"
},
"split_keywords": [
"changelist",
" vcs"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "57502976e28c05ea179562c795a1a272a7baa4bca7a7d4e155e4f72084ba6af6",
"md5": "70e39845f563c73d4ec05ed9f91c6850",
"sha256": "ca2f9aa9ab00c1ccd489ad54dc7089e81f8901c7b811748de727b25e42031b43"
},
"downloads": -1,
"filename": "changelist_data-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "70e39845f563c73d4ec05ed9f91c6850",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 33523,
"upload_time": "2025-01-02T18:36:42",
"upload_time_iso_8601": "2025-01-02T18:36:42.384586Z",
"url": "https://files.pythonhosted.org/packages/57/50/2976e28c05ea179562c795a1a272a7baa4bca7a7d4e155e4f72084ba6af6/changelist_data-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2200b733def62c61b942fc814283d9bcd1d81646a8fd3209a9c95aa909248165",
"md5": "a9fdaf50a4e173e33027aab7c9c5d668",
"sha256": "448c981369512e4130f49a492ce209f7b6cc28f929b5d8380fdd620ae75f8a62"
},
"downloads": -1,
"filename": "changelist_data-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "a9fdaf50a4e173e33027aab7c9c5d668",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 26167,
"upload_time": "2025-01-02T18:36:44",
"upload_time_iso_8601": "2025-01-02T18:36:44.735250Z",
"url": "https://files.pythonhosted.org/packages/22/00/b733def62c61b942fc814283d9bcd1d81646a8fd3209a9c95aa909248165/changelist_data-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-02 18:36:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DK96-OS",
"github_project": "changelist-data",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "changelist-data"
}