Metadata-Version: 2.4
Name: wdg-lab
Version: 0.1.0
Summary: Winding Lab: Your powerful winding design assistant
Author-email: Mingyang Bao <mingyangbob@gmail.com>
Maintainer-email: Mingyang Bao <mingyangbob@gmail.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/DawnEver/wdg-lab
Project-URL: Documentation, https://github.com/DawnEver/wdg-lab
Project-URL: Repository, https://github.com/DawnEver/wdg-lab
Project-URL: Issues, https://github.com/DawnEver/wdg-lab/issues
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: matplotlib>=3.10.6
Requires-Dist: numpy>=2.2.6
Requires-Dist: pydantic>=2.12.4
Requires-Dist: pint>=0.25.2
Requires-Dist: rtoml>=0.13.0
Requires-Dist: bokeh
Requires-Dist: pyside6-essentials>=6.10.1
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest-mock; extra == "dev"
Requires-Dist: pytest-xdist; extra == "dev"
Requires-Dist: coverage[toml]; extra == "dev"
Requires-Dist: pdoc; extra == "dev"
Requires-Dist: commitizen; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Provides-Extra: web
Requires-Dist: fastapi; extra == "web"
Requires-Dist: uvicorn; extra == "web"
Requires-Dist: httpx; extra == "web"

# WDG Lab — Winding Design Laboratory
WDG Lab is a concise, developer-friendly toolkit for designing, analyzing, and visualizing electrical windings. It focuses on practical outputs for design validation, documentation, and quick iteration.

## Table of contents
- [Key features](#key-features)
- [Quick links](#quick-links)
- [Installation](#installation)
- [Quick start](#quick-start)
- [Project layout](#project-layout)
- [Contributing](#contributing)
- [License](#license)
- [Contact](#contact)

## Key features

- Stranded and hairpin winding generators
- Magnetic calculations: MMF, harmonics, and winding factors
- Slot current distribution and pin/connection details
- 2D visualization utilities for winding layouts and reports
- Example scripts and a lightweight web UI (see Quick links)

## Quick links

- Documentation: [docs/](docs/)
- Examples: [examples/](examples/)
- Web UI (optional): https://github.com/DawnEver/wdg-lab-webui

## Installation

Recommended: install from source (development mode).

1. Clone the repository

```bash
git clone https://github.com/your-org/wdg-lab.git
cd wdg-lab
```

2. Create and activate a virtual environment, uv is recommanded:
```bash
uv venv
# or use venv
pip -m venv .venv
```

3. Install the package
```bash
uv pip install -e . # for normal user
uv pip install -e ".[web]" # for web user
uv pip install -e ".[dev,web]" # for developer
```

## Quick start

- Generate a winding from parameters (examples include basic parameter sets):

```bash
python examples/gen_winding_from_params.py
```

- Generate a winding from winding configuration files:
```bash
python examples/gen_winding_from_toml.py
```

## Project layout

- `wdg_lab/` — core library modules and APIs
- `examples/` — runnable examples and small utilities
- `tests/` — unit tests and validation cases

## Contributing

Contributions, bug reports, and feature requests are welcome. To contribute:

1. Open an issue to discuss large changes.
2. Fork the repo and create a feature branch.
3. Add tests where applicable and follow the existing code style.
4. Open a pull request describing your change.

## License

This project is licensed under the Apache License, Version 2.0. See the full license in the LICENSE file or at https://www.apache.org/licenses/LICENSE-2.0

## Contact

For questions or collaboration, open an issue or contact the maintainers through the repository.
