Metadata-Version: 2.4
Name: changelist-init
Version: 0.4
Summary: Initialize and update Changelists information.
Home-page: https://github.com/DK96-OS/changelist-init/
Author: DK96-OS
License: GPLv3
Project-URL: Issues, https://github.com/DK96-OS/changelist-init/issues
Project-URL: Source Code, https://github.com/DK96-OS/changelist-init/
Keywords: vcs,foci,changelist,git
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: changelist-data<0.4,>=0.2.5
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Changelist-Init
Manage your Git Repo file trees and Commit messages with Changelist powered workflows!

### Requirements
- Python 3.10 or higher.
- pip (or similar package manager).
- cli or bash capabilities.

## Introduction
Changelist-Init is a command-line tool (CLI) in an ecosystem of Changelist CLI tools.
It plays the role of adding file changes from **git** into the project changelist data file.
- Sync changelists with **git**.
- Creates new changelists data file if necessary.

The related packages `changelist-sort` and `changelist-foci` serve other changelist management functions by reading, and writing to, the project changelist data file.

### Related Packages
The package [`changelist-sort`](https://github.com/DK96-OS/changelist-sort) is for organizing the files in your Changelists.
- Sorts files into Changelists by directory

The package [`changelist-foci`](https://github.com/DK96-OS/changelist-foci) (File Oriented Commit Information) prints a commit message template for your Changelists.
- Various File Name and Path formatting options

The package [`changelist-data`](https://github.com/DK96-OS/changelist-data) is a dependency of all Changelist packages.
- Provides read and write access to data files
- Contains common data classes, handles data serialization

## CLI Arguments
The following arguments are optional.
- `--changelist_file` : The relative path to the changelists data file.
- `--workspace_file` : The relative path to the workspace data file.
- `--include_untracked` or `-u`: Asks git to include untracked files in changelists.

## Package Details

### Changelist Init (Main) Package
The root package init module provides high level methods:
- `initialize_file_changes() -> list[FileChange]`: Get updated FileChange information from Git.
- `merge_file_changes() -> bool`: Merge updated FileChange information into Changelists.

### Input Package
The high-level package method `validate_input`, converts CLI program arguments into an `InputData` object.
- Parsing is handled by internal package modules, and the argparse library.
- Validation methods from the `changelist-data` package are used.

#### InputData
- storage: The ChangelistData Storage object.
- include_untracked: Whether untracked files are added to changelists. false by default.

### Git Package
Use the `get_status_lists()` method to obtain updated file information from git.

#### Data Collection
**Git Status Lists**: A Collection of Data processed from Git Status operation.
- `get_list(GitTrackingStatus) -> list[GitFileStatus]`
- `add_file_status(GitFileStatus)`

#### Enum Class

**Git Tracking Status**:
- UNTRACKED
- UNSTAGED
- STAGED
- PARTIAL_STAGE

#### Internal Modules

**Status Runner**:
- `run_git_status() -> str`: Runs a Git Status Porcelain V1 operation, returns the stdout.
- `run_untracked_status() -> str`: Runs a sequence of Git operations to include untracked files in the Git Status output.

**Status Reader**:
- `read_git_status_output(str) -> GitStatusLists`: Read Git Status Porcelain V1 stdout.
- `read_git_status_line(str) -> GitFileStatus | None`: Read a single line of Git Status Porcelain V1. Ignores Directory lines.

**Status Codes**:
- `get_status_code_change_map(str) -> Callable[]`: Construct a FileChange map function for a Git Status code.
