semvec/pypi-packages huggingface dataset:
capov 0.1.6
Captain Obvious: Corrects all the obvious errors in a Python-script.
License: MIT
Requires Python: >=3.11

CapOv — Captain Obvious

Fixes the dumbest, most obvious Python code errors automatically.

CapOv corrects only the 100% safe stuff: missing imports, duplicate imports, unclosed brackets, and more — with zero assumptions.

---

🔧 Installation

    pip install capov

---

🚀 Example usage

    from capov.fixers import process

    code = '''
    import os
    import os
    x = [1, 2, 3,
    print(json.dumps(x)
    '''

    fixed = process(code)
    print(fixed)

Command-line:

    python -m capov your_script.py [options]

Options:
- --in-place → Overwrite the input file
- --output FILENAME → Write fixed code to a separate file
- --backup → Create a .bak backup before overwrite
- --verbose → Print debug messages
- --log FILE → Log to specified log file

---

🧪 Run tests

To verify installation and test functionality:

    python3 -m capov.tests

---

🗂 Project structure

- capov/ — main package
  - fixers.py — bug fixing logic
  - __main__.py — CLI entry point
  - example.py — example usage
  - tests/
    - test_cli_full.py — full run tests
    - test_cli_params.py — CLI parameter tests
    - test_module_usage.py — module usage tests
    - faulty_scripts/ — broken Python samples

---

CapOv is your cleanup butler. Let him sweep the dumb bugs so you don't have to.

Submit bugs or contribute: https://github.com/HansPeterRadtke/capov
psf-parser 0.2.1
A pure-python parser for Cadence's PSF format.
License: MIT
Requires Python: >=3.10
Keywords: parser, parsing, cadence, spectre, psf, psfbin, psfascii

# psf-parser

**psf-parser** is a lightweight, dependency-free Python parser for Cadence's proprietary **PSF (Parameter Storage Format)** files.
It supports both the ASCII (`psfascii`) and binary (`psfbin`) formats.

> **Note:**
> While Spectre uses psfbin as the default output format for most simulations, transient simulations typically use the psfxl format, which this parser does not support. To avoid issues, set the output format explicitly to psfbin.

---

## Installation

Install `psf-parser` directly via pip:

```bash
pip install psf-parser
```

---

## Usage

The `psf-parser` package provides a simple API for parsing and accessing PSF file contents.
It automatically detects the file format (ASCII or binary), but you can also specify it manually.

```python
from psf_parser import PsfFile

psf = PsfFile("path/to/psf")
print(psf.header, psf.sweeps, psf.traces, psf.values)
```

If you prefer lower-level access to the raw registry data, you can work directly with the parser classes:

```python
from psf_parser import PsfParser

parser = PsfParser("path/to/ascii/psf", format="ascii").parse()
print(parser.header)
print(parser.registry.types)
```

**Notes:**
- `PsfParser` acts as a factory and dispatches to the correct format-specific parser.
- `PsfAsciiParser` and `PsfBinParser` handle the ASCII and binary formats respectively (for internal or advanced usage).

---

## License

This project is licensed under the [MIT License](./LICENSE).

---

## Acknowledgements

This project was made possible by the excellent prior work of:

- [`psf_utils`](https://github.com/kenkundert/psf_utils) — a psfascii parser built with PLY.
- [`libpsf`](https://github.com/henjo/libpsf) — the original reverse-engineering project for the binary PSF format.


## Contributing

This project is still in its early stages. Since Cadence has never published a specification for the PSF format, the parser is built entirely by reverse-engineering test files and observing patterns.

Currently, the parser is verified against output from:
- Oppoint analyses
- DC sweeps
- AC simulations
- Transient simulations
- Monte Carlo
- Nested sweeps
- Various info analysis statements

If you encounter a PSF or PSFBIN file that fails to parse or produces incorrect output, please contribute by:
1. Adding the problematic file to the test suite.
2. Creating a minimal test case that demonstrates the issue.

This way, we can ensure continued support for more variations and edge cases over time.
PRs, bug reports, and examples are all welcome!