Metadata-Version: 2.4
Name: clean-py
Version: 1.0.0
Summary: CLI tool for automated Python code cleanup and standardization
Author-email: Sam Hardy <samhardyhey@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Sam Hardy
        Copyright (c) 2019 Kwat Medetgul-Ernar (original clean_ipynb project)
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/samhardyhey/clean-py
Project-URL: Repository, https://github.com/samhardyhey/clean-py.git
Project-URL: Issues, https://github.com/samhardyhey/clean-py/issues
Keywords: python,code-formatting,jupyter,notebook,black,isort,autoflake
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: black==25.1.0
Requires-Dist: isort==6.0.1
Requires-Dist: jupyter==1.1.1
Requires-Dist: autoflake==2.3.1
Requires-Dist: notebook<7.0.0
Requires-Dist: jupyter_contrib_nbextensions==0.7.0
Requires-Dist: nbconvert<7.0.0
Requires-Dist: pytest==8.3.5
Requires-Dist: pytest-cov==4.1.0
Requires-Dist: typer[all]==0.9.0
Provides-Extra: dev
Requires-Dist: build==1.2.2.post1; extra == "dev"
Requires-Dist: tox==4.24.2; extra == "dev"
Requires-Dist: twine==6.1.0; extra == "dev"
Requires-Dist: setuptools_scm==8.0.0; extra == "dev"
Requires-Dist: tox==4.24.2; extra == "dev"
Requires-Dist: pypi-cleanup==0.1.8; extra == "dev"
Dynamic: license-file

# Clean-Py 🧹

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

CLI tool for automated Python code cleanup and standardization. Formats both `.py` and `.ipynb` files using industry-standard tools.

## Features
- 🔄 Import optimization (autoflake)
- 📝 Import sorting (isort)
- ✨ Code formatting (black)
- 📓 Notebook cleanup
  - Clear cell outputs
  - Reset execution counts
  - Format code cells

## Installation
```bash
# Via pip
pip install clean-py

# Or from source
git clone https://github.com/samhardyhey/clean_py
cd clean_py
pip install .
```


## Usage
```bash
# Clean single file
clean_py notebook.ipynb
clean_py script.py

# Clean directory
clean_py path/to/dir

# Selective cleaning
clean_py path/to/dir -py True -isort True -black False -autoflake False
```

## Development
### Development Workflow
1. Create a new branch from `dev` for your feature/fix
2. Make your changes and ensure tests pass
3. Submit a pull request to `dev`
4. After review and approval, merge to `dev`
5. When ready for release, create a pull request from `dev` to `main`

### Project Structure
- `src/clean_py/` - Main package code
- `tests/` - Test files

### Common Development Commands
See the Makefile for common, useful dev commands.

## Credits
This project is a fork of [clean_ipynb](https://github.com/KwatME/clean_ipynb) by Kwat Medetgul-Ernar, with significant modifications and improvements. We gratefully acknowledge the original work that made this project possible.
