-
Notifications
You must be signed in to change notification settings - Fork 5
feat: PyOpenMagnetics FREE version with TAS format #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Complete FREE version including: - Fluent Design API (Design.flyback(), Design.buck(), etc.) - Basic examples (flyback_design.py, buck_inductor.py) - TAS interchange format for basic DC-DC converters - Simple optimization and reporting - Documentation and architect tools TAS features: - Basic modulation types (PWM, PFM, Hysteretic) - Simple control modes (Voltage/Current mode) - Component models: inductors, capacitors, switches, diodes - 4 DC-DC examples: buck, boost, buck-boost, flyback Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a FREE version of PyOpenMagnetics with comprehensive TAS (Topology Agnostic Structure) format support for basic DC-DC converters. It includes extensive test coverage, enhanced C++ header documentation, design API improvements, and architectural tools.
Changes:
- Added TAS interchange format with models for waveforms, inputs, outputs, and components supporting basic DC-DC topologies
- Added 9 new test files covering wire, winding, utils, simulation, settings, plotting, losses, design builder, and bobbin functionality
- Enhanced C++ headers with comprehensive Doxygen documentation for all 11 binding modules
- Added documentation infrastructure (MkDocs, contributing guide, examples, installation guide)
- Added software architect tools for code analysis and pattern documentation
- Added pre-commit scripts and push blocker for managing FREE/PRO split
Reviewed changes
Copilot reviewed 73 out of 75 changed files in this pull request and generated 27 comments.
Show a summary per file
| File | Description |
|---|---|
| tas/models/* | TAS format models for topology-agnostic converter design |
| tas/examples/*.json | Example TAS documents for buck, boost, buck-boost, flyback converters |
| tests/test_*.py | Comprehensive test coverage for PyOpenMagnetics functionality |
| src/*.h, src/module.cpp | Enhanced C++ header documentation with Doxygen comments |
| scripts/*.sh | Pre-commit check and push blocker scripts |
| docs/* | MkDocs documentation with installation, examples, contributing guides |
| api/models/* | Dataclass models for topology, specs, operating points |
| api/architect/* | Code analysis and pattern documentation tools |
| notebooks/*.ipynb | Updated Jupyter notebooks with corrected Unicode characters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| scatter = ax.scatter(core_losses, copper_losses, s=sizes, c=colors, | ||
| edgecolors='black', linewidths=1, alpha=0.8) |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable scatter is not used.
| scatter = ax.scatter(core_losses, copper_losses, s=sizes, c=colors, | |
| edgecolors='black', linewidths=1, alpha=0.8) | |
| ax.scatter(core_losses, copper_losses, s=sizes, c=colors, | |
| edgecolors='black', linewidths=1, alpha=0.8) |
| power calculations, and reflected waveform transformations. | ||
| """ | ||
| import pytest | ||
| import math |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'math' is not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
| from dataclasses import dataclass | ||
| from typing import List | ||
| from enum import Enum | ||
| import math |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'math' is not used.
| if tree.body and isinstance(tree.body[0], ast.Expr): | ||
| if isinstance(tree.body[0].value, ast.Constant): | ||
| has_docstring = True | ||
| except SyntaxError: |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except SyntaxError: | |
| except SyntaxError: | |
| # Ignore syntax errors here; docstring detection is best-effort. | |
| # Full syntax error handling is performed when analyzing the module below. |
| for py_file in path.rglob("*.py"): | ||
| try: | ||
| results.append(analyze_module(str(py_file))) | ||
| except Exception: |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except Exception: | |
| except Exception: | |
| # Intentionally ignore errors for individual modules so that analysis | |
| # can continue for the rest of the package. |
| except ImportError: | ||
| pass |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except ImportError: | |
| pass | |
| except ImportError as e: | |
| if verbose: | |
| print(f"[Pareto plot skipped - plotting dependency not installed: {e}]") |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Complete FREE version including:
TAS features: