Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -17,27 +17,27 @@ repos:
- --use-current-year
exclude: 'idf_build_apps/vendors/'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.12.2'
rev: 'v0.14.10'
hooks:
- id: ruff-check
args: ['--fix']
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.16.1'
rev: 'v1.19.1'
hooks:
- id: mypy
args: ['--warn-unused-ignores']
additional_dependencies:
- pyparsing
- pytest
- repo: https://github.com/LilSpazJoekp/docstrfmt
rev: v1.10.0
rev: v2.0.1
hooks:
- id: docstrfmt
types: [rst]
args: ['-l', '99999999999999999999999']
- repo: https://github.com/LilSpazJoekp/docstrfmt
rev: v1.10.0
rev: v2.0.1
hooks:
- id: docstrfmt
types: [python]
Expand Down
30 changes: 18 additions & 12 deletions docs/en/api/esp_bool_parser.rst
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
esp-bool-parser Package
=======================
#########################
esp-bool-parser Package
#########################

Tools for processing boolean statements based on ESP-IDF SOC capabilities and configurations.

Main Package Module
-------------------
*********************
Main Package Module
*********************

.. automodule:: esp_bool_parser

Boolean Expression Parser
-------------------------
***************************
Boolean Expression Parser
***************************

.. automodule:: esp_bool_parser.bool_parser

Constants and IDF Information
-----------------------------
*******************************
Constants and IDF Information
*******************************

.. automodule:: esp_bool_parser.constants

SOC Header Parser
-----------------
*******************
SOC Header Parser
*******************

.. automodule:: esp_bool_parser.soc_header

Utility Functions
-----------------
*******************
Utility Functions
*******************

.. automodule:: esp_bool_parser.utils
20 changes: 12 additions & 8 deletions docs/en/api/modules.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
API Reference
=============
###############
API Reference
###############

Complete API documentation for the ``esp-bool-parser`` package.

Components
----------
************
Components
************

**Boolean Expression Parser**
Parse and evaluate boolean expressions for ESP-IDF targets and configurations
Expand All @@ -18,8 +20,9 @@ Components
**Constants and Utilities**
ESP-IDF constants and utility functions

Core Functions
--------------
****************
Core Functions
****************

``parse_bool_expr()``
Parse boolean expressions and return BoolStmt objects
Expand All @@ -30,8 +33,9 @@ Core Functions
``BoolStmt.get_value()``
Evaluate boolean expressions for specific targets

Package Documentation
---------------------
***********************
Package Documentation
***********************

.. toctree::
:maxdepth: 2
Expand Down
20 changes: 12 additions & 8 deletions docs/en/index.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
esp-bool-parser |version| Documentation
=======================================
#########################################
esp-bool-parser |version| Documentation
#########################################

esp-bool-parser processes boolean expressions based on ESP-IDF ``soc_caps`` files.

Overview
--------
**********
Overview
**********

This package parses boolean statements from ESP-IDF configurations and evaluates them against target-specific capabilities. It locates SOC header files, extracts chip capabilities, and stores them as constants for use in ``ChipAttr``.

The main entry point is ``parse_bool_expr``, which returns a ``BoolStmt`` object for evaluation.

Usage
-----
*******
Usage
*******

.. code-block:: python

Expand All @@ -20,8 +23,9 @@ Usage
stmt = parse_bool_expr('IDF_TARGET == "esp32"')
result = stmt.get_value("esp32", "config_name")

Extending ChipAttr
------------------
********************
Extending ChipAttr
********************

Register custom attributes using ``register_addition_attribute``. Custom handlers take priority over built-in attributes.

Expand Down