idf-build-apps 2.5.2__tar.gz → 2.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.pre-commit-config.yaml +4 -3
  2. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/CHANGELOG.md +19 -0
  3. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/CONTRIBUTING.md +5 -2
  4. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/PKG-INFO +4 -3
  5. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/conf_common.py +1 -0
  6. idf_build_apps-2.6.0/docs/en/references/config_file.rst +162 -0
  7. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/__init__.py +2 -2
  8. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/args.py +85 -53
  9. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/finder.py +1 -0
  10. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/junit/utils.py +1 -1
  11. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/manifest/soc_header.py +1 -1
  12. idf_build_apps-2.6.0/idf_build_apps/vendors/__init__.py +0 -0
  13. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/vendors/pydantic_sources.py +51 -34
  14. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/pyproject.toml +3 -2
  15. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/setup.py +3 -2
  16. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/tests/test_args.py +30 -1
  17. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/tests/test_cmd.py +29 -1
  18. idf_build_apps-2.6.0/tests/test_soc_caps.py +21 -0
  19. idf_build_apps-2.5.2/docs/en/references/config_file.md +0 -78
  20. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.editorconfig +0 -0
  21. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.git-blame-ignore-revs +0 -0
  22. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.gitattributes +0 -0
  23. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.github/dependabot.yml +0 -0
  24. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.github/workflows/check-pre-commit.yml +0 -0
  25. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.github/workflows/issue_comment.yml +0 -0
  26. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.github/workflows/new_issues.yml +0 -0
  27. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.github/workflows/new_prs.yml +0 -0
  28. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.github/workflows/publish-pypi.yml +0 -0
  29. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.github/workflows/test-build-docs.yml +0 -0
  30. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.github/workflows/test-build-idf-apps.yml +0 -0
  31. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.gitignore +0 -0
  32. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/.readthedocs.yml +0 -0
  33. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/LICENSE +0 -0
  34. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/README.md +0 -0
  35. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/_apidoc_templates/module.rst_t +0 -0
  36. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/_apidoc_templates/package.rst_t +0 -0
  37. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/_apidoc_templates/toc.rst_t +0 -0
  38. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/_static/espressif-logo.svg +0 -0
  39. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/_static/theme_overrides.css +0 -0
  40. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/_templates/layout.html +0 -0
  41. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/en/Makefile +0 -0
  42. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/en/conf.py +0 -0
  43. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/en/explanations/build.rst +0 -0
  44. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/en/explanations/config_rules.rst +0 -0
  45. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/en/explanations/dependency_driven_build.rst +0 -0
  46. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/en/explanations/find.rst +0 -0
  47. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/en/guides/1.x_to_2.x.md +0 -0
  48. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/en/index.rst +0 -0
  49. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/en/others/CHANGELOG.md +0 -0
  50. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/en/others/CONTRIBUTING.md +0 -0
  51. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/en/references/cli.rst +0 -0
  52. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/docs/en/references/manifest.rst +0 -0
  53. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/__main__.py +0 -0
  54. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/app.py +0 -0
  55. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/autocompletions.py +0 -0
  56. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/constants.py +0 -0
  57. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/junit/__init__.py +0 -0
  58. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/junit/report.py +0 -0
  59. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/log.py +0 -0
  60. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/main.py +0 -0
  61. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/manifest/__init__.py +0 -0
  62. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/manifest/if_parser.py +0 -0
  63. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/manifest/manifest.py +0 -0
  64. /idf_build_apps-2.5.2/idf_build_apps/vendors/__init__.py → /idf_build_apps-2.6.0/idf_build_apps/py.typed +0 -0
  65. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/session_args.py +0 -0
  66. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/utils.py +0 -0
  67. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/yaml/__init__.py +0 -0
  68. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/idf_build_apps/yaml/parser.py +0 -0
  69. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/license_header.txt +0 -0
  70. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/tests/conftest.py +0 -0
  71. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/tests/test_app.py +0 -0
  72. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/tests/test_build.py +0 -0
  73. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/tests/test_finder.py +0 -0
  74. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/tests/test_manifest.py +0 -0
  75. {idf_build_apps-2.5.2 → idf_build_apps-2.6.0}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  repos:
2
2
  - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v4.6.0
3
+ rev: v5.0.0
4
4
  hooks:
5
5
  - id: trailing-whitespace
6
6
  - id: end-of-file-fixer
@@ -17,13 +17,13 @@ repos:
17
17
  - --use-current-year
18
18
  exclude: 'idf_build_apps/vendors/'
19
19
  - repo: https://github.com/charliermarsh/ruff-pre-commit
20
- rev: 'v0.6.2'
20
+ rev: 'v0.8.4'
21
21
  hooks:
22
22
  - id: ruff
23
23
  args: ['--fix']
24
24
  - id: ruff-format
25
25
  - repo: https://github.com/pre-commit/mirrors-mypy
26
- rev: 'v1.11.2'
26
+ rev: 'v1.14.1'
27
27
  hooks:
28
28
  - id: mypy
29
29
  args: ['--warn-unused-ignores']
@@ -45,4 +45,5 @@ repos:
45
45
  files: "docs\/.+rst$"
46
46
  additional_dependencies:
47
47
  - sphinx-argparse
48
+ - sphinx-tabs
48
49
  - sphinxcontrib-mermaid
@@ -2,6 +2,25 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## v2.6.0 (2025-01-02)
6
+
7
+ ### Feat
8
+
9
+ - `manifest_rootpath` support env vars expansion
10
+
11
+ ### Fix
12
+
13
+ - DeprecationWarning: 'count' is passed as positional argument when `re.sub`
14
+ - add `py.typed` file to be used in mypy
15
+ - negative value for soc caps integer
16
+ - **config_file**: recursively load config file for TOML file
17
+
18
+ ## v2.5.3 (2024-10-04)
19
+
20
+ ### Feat
21
+
22
+ - support --manifest-filepatterns
23
+
5
24
  ## v2.5.2 (2024-09-27)
6
25
 
7
26
  ### Fix
@@ -16,12 +16,15 @@ Here's a table shows the supported ESP-IDF versions and the corresponding Python
16
16
  | 5.1 | 3.7+ | main (2.x) |
17
17
  | 5.2 | 3.7+ | main (2.x) |
18
18
  | 5.3 | 3.8+ | main (2.x) |
19
- | master (5.4) | 3.8+ | main (2.x) |
19
+ | 5.4 | 3.8+ | main (2.x) |
20
+ | master (5.5) | 3.9+ | main (2.x) |
20
21
 
21
22
  `idf-build-apps` is following the semantic versioning. The major version of `idf-build-apps` is the same as the ESP-IDF version it supports. For example, `idf-build-apps` 1.x supports ESP-IDF 4.x, and `idf-build-apps` 2.x supports ESP-IDF 5.x.
22
23
 
23
24
  In order to compatible to all 5.x ESP-IDF versions, please don't forget to keep the code compatible with python 3.7, even it's end of life on 2023-06-05.
24
25
 
26
+ Besides, pydantic dropped 3.7 support since 2.6.0. Don't rely on pydantic 2.6.0+ since we're still supporting python 3.7.
27
+
25
28
  ## Setup the Dev Environment
26
29
 
27
30
  1. Create virtual environment
@@ -65,7 +68,7 @@ pytest
65
68
  We use [sphinx][sphinx] and [autodoc][autodoc] for generating documentation and API references. Besides, we treat warnings as errors while building the documentation. Please fix them before your commits got merged.
66
69
 
67
70
  ```shell
68
- cd docs && make html
71
+ cd docs/en && make html
69
72
  ```
70
73
 
71
74
  For documentation preview, you may use any browser you prefer. The executable has to be searchable in `PATH`. For example we're using firefox here.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: idf-build-apps
3
- Version: 2.5.2
3
+ Version: 2.6.0
4
4
  Summary: Tools for building ESP-IDF related apps.
5
5
  Author-email: Fu Hanxi <fuhanxi@espressif.com>
6
6
  Requires-Python: >=3.7
@@ -27,9 +27,10 @@ Requires-Dist: sphinx_copybutton ; extra == "doc"
27
27
  Requires-Dist: myst-parser ; extra == "doc"
28
28
  Requires-Dist: sphinxcontrib-mermaid ; extra == "doc"
29
29
  Requires-Dist: sphinx-argparse ; extra == "doc"
30
+ Requires-Dist: sphinx-tabs ; extra == "doc"
30
31
  Requires-Dist: pytest ; extra == "test"
31
32
  Requires-Dist: pytest-cov ; extra == "test"
32
- Project-URL: changelog, https://github.com/espressif/idf-build-apps/blob/master/CHANGELOG.md
33
+ Project-URL: changelog, https://github.com/espressif/idf-build-apps/blob/main/CHANGELOG.md
33
34
  Project-URL: documentation, https://docs.espressif.com/projects/idf-build-apps
34
35
  Project-URL: homepage, https://github.com/espressif/idf-build-apps
35
36
  Project-URL: repository, https://github.com/espressif/idf-build-apps
@@ -30,6 +30,7 @@ extensions = [
30
30
  'myst_parser',
31
31
  'sphinxcontrib.mermaid',
32
32
  'sphinxarg.ext',
33
+ 'sphinx_tabs.tabs',
33
34
  ]
34
35
 
35
36
  templates_path = ['_templates']
@@ -0,0 +1,162 @@
1
+ #############################################
2
+ Configuration File ``.idf_build_apps.toml``
3
+ #############################################
4
+
5
+ There are many CLI options available for ``idf-build-apps``. While these options provide usage flexibility, they also make the CLI command too long and difficult to read. However, a configuration file allows defining all these options in a more readable and maintainable way.
6
+
7
+ ***********************
8
+ Config File Discovery
9
+ ***********************
10
+
11
+ ``idf-build-apps`` supports a few ways to specify the configuration file (in order of precedence):
12
+
13
+ - specify via CLI argument ``--config-file <config file path>``
14
+ - ``.idf_build_apps.toml`` in the current directory
15
+ - ``.idf_build_apps.toml`` in the parent directories, until it reaches the root of the file system
16
+ - ``pyproject.toml`` with ``[tool.idf-build-apps]`` section
17
+ - ``pyproject.toml`` in the parent directories, until it reaches the root of the file system
18
+
19
+ *******
20
+ Usage
21
+ *******
22
+
23
+ We recommend using the ``.idf_build_apps.toml`` file for non-Python projects and the ``pyproject.toml`` file for Python projects. When using the ``pyproject.toml`` file, define the configuration options in the ``[tool.idf-build-apps]`` section.
24
+
25
+ Here's a simple example of a configuration file:
26
+
27
+ .. tabs::
28
+
29
+ .. group-tab::
30
+
31
+ ``.idf_build_apps.toml``
32
+
33
+ .. code:: toml
34
+
35
+ paths = [
36
+ "components",
37
+ "examples",
38
+ ]
39
+ target = "esp32"
40
+ recursive = true
41
+
42
+ # config rules
43
+ config = [
44
+ "sdkconfig.*=",
45
+ "=default",
46
+ ]
47
+
48
+ .. group-tab::
49
+
50
+ ``pyproject.toml``
51
+
52
+ .. code:: toml
53
+
54
+ [tool.idf-build-apps]
55
+ paths = [
56
+ "components",
57
+ "examples",
58
+ ]
59
+ target = "esp32"
60
+ recursive = true
61
+
62
+ # config rules
63
+ config = [
64
+ "sdkconfig.*=",
65
+ "=default",
66
+ ]
67
+
68
+ Running ``idf-build-apps build`` with the above configuration is equivalent to the following CLI command:
69
+
70
+ .. code:: shell
71
+
72
+ idf-build-app build \
73
+ --paths components examples \
74
+ --target esp32 \
75
+ --recursive \
76
+ --config-rules "sdkconfig.*=" "=default" \
77
+ --build-dir "build_@t_@w"
78
+
79
+ `TOML <https://toml.io/en/>`__ supports native data types. In order to get the config name and type of the corresponding CLI option, you may refer to the help messages by using ``idf-build-apps find -h`` or ``idf-build-apps build -h``.
80
+
81
+ For instance, the ``--paths`` CLI option help message shows:
82
+
83
+ .. code:: text
84
+
85
+ -p PATHS [PATHS ...], --paths PATHS [PATHS ...]
86
+ One or more paths to look for apps.
87
+ - default: None
88
+ - config name: paths
89
+ - config type: list[str]
90
+
91
+ This indicates that in the configuration file, you should specify it with the name ``paths``, and the type should be a “list of strings”.
92
+
93
+ .. code:: toml
94
+
95
+ paths = [
96
+ "foo",
97
+ "bar",
98
+ ]
99
+
100
+ *************************
101
+ CLI Argument Precedence
102
+ *************************
103
+
104
+ CLI arguments take precedence over the configuration file. This helps to override the configuration file settings when required.
105
+
106
+ For example, if the configuration file has the following content:
107
+
108
+ .. tabs::
109
+
110
+ .. group-tab::
111
+
112
+ ``.idf_build_apps.toml``
113
+
114
+ .. code:: toml
115
+
116
+ target = "esp32"
117
+ config_rules = [
118
+ "sdkconfig.*=",
119
+ "=default",
120
+ ]
121
+
122
+ .. group-tab::
123
+
124
+ ``pyproject.toml``
125
+
126
+ .. code:: toml
127
+
128
+ [tool.idf-build-apps]
129
+ target = "esp32"
130
+ config_rules = [
131
+ "sdkconfig.*=",
132
+ "=default",
133
+ ]
134
+
135
+ Override String Configuration
136
+ =============================
137
+
138
+ To override the ``str`` type configuration, (e.g., ``target``), you can pass the CLI argument directly:
139
+
140
+ .. code:: shell
141
+
142
+ idf-build-apps build --target esp32s2
143
+
144
+ Override List Configuration
145
+ ===========================
146
+
147
+ To override the ``list[str]`` type configuration, (e.g., ``config_rules``), you can override it by passing the CLI argument. For example:
148
+
149
+ .. code:: shell
150
+
151
+ idf-build-apps build --config-rules "foo=bar"
152
+
153
+ Or you can unset the configuration by passing an empty string:
154
+
155
+ .. code:: shell
156
+
157
+ idf-build-apps build --config-rules ""
158
+
159
+ Override Boolean Configuration
160
+ ==============================
161
+
162
+ Not supported yet.
@@ -1,4 +1,4 @@
1
- # SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
1
+ # SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
2
2
  # SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  """
@@ -8,7 +8,7 @@ Tools for building ESP-IDF related apps.
8
8
  # ruff: noqa: E402
9
9
  # avoid circular imports
10
10
 
11
- __version__ = '2.5.2'
11
+ __version__ = '2.6.0'
12
12
 
13
13
  from .session_args import (
14
14
  SessionArgs,