proj-flow 0.9.3__tar.gz → 0.10.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 (156) hide show
  1. {proj_flow-0.9.3 → proj_flow-0.10.0}/.flow/config.yaml +1 -1
  2. {proj_flow-0.9.3 → proj_flow-0.10.0}/CHANGELOG.rst +22 -0
  3. {proj_flow-0.9.3 → proj_flow-0.10.0}/PKG-INFO +3 -2
  4. {proj_flow-0.9.3 → proj_flow-0.10.0}/README.md +1 -1
  5. {proj_flow-0.9.3 → proj_flow-0.10.0}/pyproject.toml +1 -0
  6. proj_flow-0.10.0/src/proj_flow/__init__.py +9 -0
  7. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/api/arg.py +47 -24
  8. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/api/ctx.py +43 -23
  9. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/api/env.py +7 -2
  10. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/api/makefile.py +1 -1
  11. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/api/step.py +3 -5
  12. proj_flow-0.10.0/src/proj_flow/base/name_list.py +19 -0
  13. proj_flow-0.10.0/src/proj_flow/base/plugins.py +48 -0
  14. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/base/registry.py +19 -4
  15. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/cli/__init__.py +2 -4
  16. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/cli/argument.py +3 -3
  17. {proj_flow-0.9.3/src/proj_flow/flow → proj_flow-0.10.0/src/proj_flow}/dependency.py +1 -1
  18. proj_flow-0.10.0/src/proj_flow/ext/cplusplus/__init__.py +10 -0
  19. proj_flow-0.10.0/src/proj_flow/ext/cplusplus/cmake/__init__.py +12 -0
  20. {proj_flow-0.9.3/src/proj_flow/plugins → proj_flow-0.10.0/src/proj_flow/ext/cplusplus}/cmake/__version__.py +5 -0
  21. {proj_flow-0.9.3/src/proj_flow/plugins → proj_flow-0.10.0/src/proj_flow/ext/cplusplus}/cmake/context.py +10 -8
  22. {proj_flow-0.9.3/src/proj_flow/plugins → proj_flow-0.10.0/src/proj_flow/ext/cplusplus}/cmake/parser.py +6 -28
  23. proj_flow-0.10.0/src/proj_flow/ext/cplusplus/cmake/steps.py +142 -0
  24. proj_flow-0.10.0/src/proj_flow/ext/cplusplus/cmake/version.py +35 -0
  25. {proj_flow-0.9.3/src/proj_flow/plugins → proj_flow-0.10.0/src/proj_flow/ext/cplusplus}/conan/__init__.py +7 -3
  26. {proj_flow-0.9.3/src/proj_flow/plugins → proj_flow-0.10.0/src/proj_flow/ext/cplusplus}/conan/_conan.py +8 -3
  27. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/ext/github/__init__.py +2 -2
  28. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/ext/github/cli.py +2 -11
  29. proj_flow-0.9.3/src/proj_flow/plugins/github.py → proj_flow-0.10.0/src/proj_flow/ext/github/switches.py +3 -3
  30. proj_flow-0.9.3/src/proj_flow/ext/markdown_changelist.py → proj_flow-0.10.0/src/proj_flow/ext/markdown_changelog.py +2 -1
  31. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/ext/python/rtdocs.py +1 -1
  32. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/ext/python/version.py +1 -2
  33. proj_flow-0.9.3/src/proj_flow/ext/re_structured_changelist.py → proj_flow-0.10.0/src/proj_flow/ext/re_structured_changelog.py +3 -1
  34. {proj_flow-0.9.3/src/proj_flow/plugins → proj_flow-0.10.0/src/proj_flow/ext}/sign/__init__.py +64 -44
  35. proj_flow-0.10.0/src/proj_flow/ext/sign/api.py +83 -0
  36. proj_flow-0.10.0/src/proj_flow/ext/sign/win32.py +152 -0
  37. proj_flow-0.9.3/src/proj_flow/plugins/store/store_packages.py → proj_flow-0.10.0/src/proj_flow/ext/store.py +51 -9
  38. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/flow/__init__.py +2 -2
  39. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/log/release.py +1 -1
  40. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/log/rich_text/markdown.py +1 -1
  41. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/log/rich_text/re_structured_text.py +1 -1
  42. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/minimal/__init__.py +2 -2
  43. {proj_flow-0.9.3/src/proj_flow/plugins → proj_flow-0.10.0/src/proj_flow/minimal}/base.py +3 -2
  44. {proj_flow-0.9.3/src/proj_flow/plugins/commands → proj_flow-0.10.0/src/proj_flow/minimal}/init.py +44 -11
  45. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/minimal/run.py +1 -2
  46. proj_flow-0.10.0/src/proj_flow/project/__init__.py +11 -0
  47. proj_flow-0.10.0/src/proj_flow/project/api.py +51 -0
  48. proj_flow-0.10.0/src/proj_flow/project/cplusplus.py +17 -0
  49. proj_flow-0.10.0/src/proj_flow/project/data.py +14 -0
  50. {proj_flow-0.9.3/src/proj_flow/flow → proj_flow-0.10.0/src/proj_flow/project}/interact.py +114 -13
  51. proj_flow-0.9.3/src/proj_flow/__init__.py +0 -4
  52. proj_flow-0.9.3/src/proj_flow/base/plugins.py +0 -83
  53. proj_flow-0.9.3/src/proj_flow/flow/init.py +0 -65
  54. proj_flow-0.9.3/src/proj_flow/plugins/__init__.py +0 -8
  55. proj_flow-0.9.3/src/proj_flow/plugins/cmake/__init__.py +0 -11
  56. proj_flow-0.9.3/src/proj_flow/plugins/cmake/build.py +0 -29
  57. proj_flow-0.9.3/src/proj_flow/plugins/cmake/config.py +0 -59
  58. proj_flow-0.9.3/src/proj_flow/plugins/cmake/pack.py +0 -37
  59. proj_flow-0.9.3/src/proj_flow/plugins/cmake/test.py +0 -29
  60. proj_flow-0.9.3/src/proj_flow/plugins/commands/__init__.py +0 -12
  61. proj_flow-0.9.3/src/proj_flow/plugins/commands/ci/__init__.py +0 -17
  62. proj_flow-0.9.3/src/proj_flow/plugins/commands/ci/changelog.py +0 -47
  63. proj_flow-0.9.3/src/proj_flow/plugins/commands/ci/matrix.py +0 -46
  64. proj_flow-0.9.3/src/proj_flow/plugins/commands/ci/release.py +0 -116
  65. proj_flow-0.9.3/src/proj_flow/plugins/sign/win32.py +0 -191
  66. proj_flow-0.9.3/src/proj_flow/plugins/store/__init__.py +0 -11
  67. proj_flow-0.9.3/src/proj_flow/plugins/store/store_both.py +0 -22
  68. proj_flow-0.9.3/src/proj_flow/plugins/store/store_tests.py +0 -21
  69. {proj_flow-0.9.3 → proj_flow-0.10.0}/.gitignore +0 -0
  70. {proj_flow-0.9.3 → proj_flow-0.10.0}/.readthedocs.yaml +0 -0
  71. {proj_flow-0.9.3 → proj_flow-0.10.0}/LICENSE +0 -0
  72. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/__main__.py +0 -0
  73. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/api/__init__.py +0 -0
  74. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/api/completers.py +0 -0
  75. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/api/init.py +0 -0
  76. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/api/release.py +0 -0
  77. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/base/__init__.py +0 -0
  78. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/base/cmd.py +0 -0
  79. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/base/inspect.py +0 -0
  80. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/base/matrix.py +0 -0
  81. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/base/uname.py +0 -0
  82. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/cli/finder.py +0 -0
  83. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/ext/__init__.py +0 -0
  84. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/ext/github/hosting.py +0 -0
  85. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/ext/python/__init__.py +0 -0
  86. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/ext/python/steps.py +0 -0
  87. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/flow/configs.py +0 -0
  88. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/flow/layer.py +0 -0
  89. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/flow/steps.py +0 -0
  90. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/log/__init__.py +0 -0
  91. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/log/commit.py +0 -0
  92. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/log/error.py +0 -0
  93. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/log/fmt.py +0 -0
  94. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/log/format.py +0 -0
  95. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/log/hosting/__init__.py +0 -0
  96. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/log/hosting/github.py +0 -0
  97. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/log/msg.py +0 -0
  98. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/log/rich_text/__init__.py +0 -0
  99. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/log/rich_text/api.py +0 -0
  100. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/minimal/bootstrap.py +0 -0
  101. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/minimal/list.py +0 -0
  102. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/minimal/system.py +0 -0
  103. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/base/.clang-format +0 -0
  104. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/base/.flow/config.yml +0 -0
  105. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/base/.flow/flow.py.mustache +0 -0
  106. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/base/.flow/matrix.yml +0 -0
  107. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/base/.flow/official.yml +0 -0
  108. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/base/.gitignore +0 -0
  109. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/base/README.md.mustache +0 -0
  110. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/base/flow +0 -0
  111. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/base/flow.cmd +0 -0
  112. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/base.json +0 -0
  113. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/.flow/cmake/common.cmake.mustache +0 -0
  114. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/.flow/extensions/wall/__init__.py.mustache +0 -0
  115. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/.flow/extensions/wall/icons/__init__.py.mustache +0 -0
  116. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/.flow/extensions/wall/icons/magick.py.mustache +0 -0
  117. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/.flow/packages/base.cmake.mustache +0 -0
  118. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/.flow/packages/config.cmake +0 -0
  119. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/.flow/packages/cpack.cmake +0 -0
  120. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/.flow/packages/wix/cpack.cmake.mustache +0 -0
  121. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/.flow/packages/wix/patches.in.wix +0 -0
  122. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/.flow/packages/wix.cmake.mustache +0 -0
  123. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/CMakeGraphVizOptions.cmake +0 -0
  124. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/CMakeLists.txt.mustache +0 -0
  125. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/CMakePresets.json +0 -0
  126. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/data/assets/appicon.ico +0 -0
  127. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/data/assets/appicon.png +0 -0
  128. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/data/assets/wix_banner.bmp +0 -0
  129. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/data/assets/wix_dialog.bmp +0 -0
  130. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/data/icons/.gitignore +0 -0
  131. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/data/icons/appicon-mask.svg +0 -0
  132. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/data/icons/appicon.svg +0 -0
  133. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/src/main.cc.mustache +0 -0
  134. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/src/version.hpp.in.mustache +0 -0
  135. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake/tests/test.cc.mustache +0 -0
  136. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/cmake.json +0 -0
  137. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/conan/.flow/cmake/libcxx_toolchain.cmake +0 -0
  138. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/conan/.flow/cmake/output_dirs_setup.cmake +0 -0
  139. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/conan/conanfile.txt +0 -0
  140. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/conan.json +0 -0
  141. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/github_actions/.github/linters/.isort.cfg +0 -0
  142. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/github_actions/.github/linters/.mypy.ini +0 -0
  143. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/github_actions/.github/workflows/build.yml +0 -0
  144. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/github_actions/.github/workflows/linter.yml +0 -0
  145. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/github_actions/CPPLINT.cfg +0 -0
  146. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/github_actions.json +0 -0
  147. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/github_social/.github/ISSUE_TEMPLATE/bug_report.md.mustache +0 -0
  148. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/github_social/.github/ISSUE_TEMPLATE/feature_request.md.mustache +0 -0
  149. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/github_social/CODE_OF_CONDUCT.md.mustache +0 -0
  150. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/github_social/CONTRIBUTING.md +0 -0
  151. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/layers/github_social.json +0 -0
  152. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/licenses/0BSD.mustache +0 -0
  153. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/licenses/MIT.mustache +0 -0
  154. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/licenses/Unlicense.mustache +0 -0
  155. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/licenses/WTFPL.mustache +0 -0
  156. {proj_flow-0.9.3 → proj_flow-0.10.0}/src/proj_flow/template/licenses/Zlib.mustache +0 -0
@@ -1,7 +1,7 @@
1
1
  extensions:
2
2
  - proj_flow.ext.python
3
3
  - proj_flow.ext.github
4
- - proj_flow.ext.re_structured_changelist
4
+ - proj_flow.ext.re_structured_changelog
5
5
 
6
6
  entry:
7
7
  build: [ Build ]
@@ -4,6 +4,28 @@ Changelog
4
4
 
5
5
  All notable changes to this project will be documented in this file.
6
6
 
7
+ `0.10.0 <https://github.com/mzdun/proj-flow/compare/v0.9.4...v0.10.0>`_ (2025-02-09)
8
+ ====================================================================================
9
+
10
+ New Features
11
+ ------------
12
+
13
+ - add ``project`` parameter to ``proj-flow init`` (`7d8c942 <https://github.com/mzdun/proj-flow/commit/7d8c942d608eea091589cebb21ca4e2c91654e4a>`_)
14
+ - add project key to init settings (`c03662a <https://github.com/mzdun/proj-flow/commit/c03662a4878d47f19d0d3f200baa335c3e7eba44>`_)
15
+ - introduce init-specific project module (`61e8710 <https://github.com/mzdun/proj-flow/commit/61e871067c79dcbbfffd121f095ac9c7ce3b69df>`_)
16
+ - evaluate command argument' properties lazily (`18ecb83 <https://github.com/mzdun/proj-flow/commit/18ecb837a584d7e4670fce689661319cf832388e>`_)
17
+
18
+ `0.9.4 <https://github.com/mzdun/proj-flow/compare/v0.9.3...v0.9.4>`_ (2025-02-09)
19
+ ==================================================================================
20
+
21
+ Bug Fixes
22
+ ---------
23
+
24
+ - remove vestiges of old plugin finder + styles (`484fec4 <https://github.com/mzdun/proj-flow/commit/484fec44107474fe765091b7754b94094395c838>`_)
25
+ - move C++ things to ext.cplusplus (`fce7318 <https://github.com/mzdun/proj-flow/commit/fce7318b614a645dd9b72854a4ab78c0c5cf7b00>`_)
26
+ - move last command to minimal (`c3f1dba <https://github.com/mzdun/proj-flow/commit/c3f1dba7c4f55fc8f62eb4d44162833991cd516f>`_)
27
+ - **docs**: cleanup the docstrings after moving (`a952ebe <https://github.com/mzdun/proj-flow/commit/a952ebe19c65cb51585dc2c69ead74bfe7fff5cc>`_)
28
+
7
29
  `0.9.3 <https://github.com/mzdun/proj-flow/compare/v0.9.2...v0.9.3>`_ (2025-02-08)
8
30
  ==================================================================================
9
31
 
@@ -1,7 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: proj-flow
3
- Version: 0.9.3
3
+ Version: 0.10.0
4
4
  Summary: C++ project maintenance, automated
5
+ Project-URL: Changelog, https://github.com/mzdun/proj-flow/blob/main/CHANGELOG.rst
5
6
  Project-URL: Documentation, https://proj-flow.readthedocs.io/en/latest/
6
7
  Project-URL: Homepage, https://pypi.org/project/proj-flow/
7
8
  Project-URL: Source Code, https://github.com/mzdun/proj-flow
@@ -75,7 +76,7 @@ From PowerShell with:
75
76
  A fresh C++ project can be created with a
76
77
 
77
78
  ```sh
78
- proj-flow init
79
+ proj-flow init cxx
79
80
  ```
80
81
 
81
82
  This command will ask multiple questions to build Mustache context for the
@@ -50,7 +50,7 @@ From PowerShell with:
50
50
  A fresh C++ project can be created with a
51
51
 
52
52
  ```sh
53
- proj-flow init
53
+ proj-flow init cxx
54
54
  ```
55
55
 
56
56
  This command will ask multiple questions to build Mustache context for the
@@ -37,6 +37,7 @@ readme = "README.md"
37
37
  requires-python = ">=3.10"
38
38
 
39
39
  [project.urls]
40
+ Changelog = "https://github.com/mzdun/proj-flow/blob/main/CHANGELOG.rst"
40
41
  Documentation = "https://proj-flow.readthedocs.io/en/latest/"
41
42
  Homepage = "https://pypi.org/project/proj-flow/"
42
43
  "Source Code" = "https://github.com/mzdun/proj-flow"
@@ -0,0 +1,9 @@
1
+ # Copyright (c) 2025 Marcin Zdun
2
+ # This code is licensed under MIT license (see LICENSE for details)
3
+
4
+ """
5
+ The **proj_flow** contains only ``__version__`` to be updated, nothing more.
6
+ This is in an attempt to make this module easy to load initially.
7
+ """
8
+
9
+ __version__ = "0.10.0"
@@ -12,48 +12,71 @@ from dataclasses import dataclass, field
12
12
 
13
13
  from proj_flow.base import inspect as _inspect
14
14
 
15
+ T = typing.TypeVar("T")
16
+ LazyArgument = typing.Union[T, typing.Callable[[], T]]
17
+
18
+
19
+ def _eval(arg: LazyArgument[T]) -> T:
20
+ if callable(arg):
21
+ return typing.cast(T, arg())
22
+ return arg
23
+
24
+
25
+ class _Completable(typing.Protocol):
26
+ completer: _inspect.Function
27
+
15
28
 
16
29
  @dataclass
17
30
  class Argument:
18
- help: str = ""
31
+ help: LazyArgument[str] = ""
19
32
  pos: bool = False
20
- names: typing.List[str] = field(default_factory=list)
21
- nargs: typing.Union[str, int, None] = None
22
- opt: typing.Optional[bool] = None
23
- meta: typing.Optional[str] = None
24
- action: typing.Union[str, argparse.Action, None] = None
25
- default: typing.Optional[typing.Any] = None
26
- choices: typing.Optional[typing.List[str]] = None
33
+ names: LazyArgument[typing.List[str]] = field(default_factory=list)
34
+ nargs: LazyArgument[typing.Union[str, int, None]] = None
35
+ opt: LazyArgument[typing.Optional[bool]] = None
36
+ meta: LazyArgument[typing.Optional[str]] = None
37
+ action: LazyArgument[typing.Union[str, argparse.Action, None]] = None
38
+ default: LazyArgument[typing.Optional[typing.Any]] = None
39
+ choices: LazyArgument[typing.Optional[typing.List[str]]] = None
27
40
  completer: typing.Optional[_inspect.Function] = None
28
41
 
29
42
  def visit(self, parser: argparse.ArgumentParser, name: str):
30
43
  kwargs = {}
31
- if self.help is not None:
32
- kwargs["help"] = self.help
33
- if self.nargs is not None:
34
- kwargs["nargs"] = self.nargs
35
- if self.meta is not None:
36
- kwargs["metavar"] = self.meta
37
- if self.default is not None:
38
- kwargs["default"] = self.default
39
- if self.action is not None:
40
- kwargs["action"] = self.action
41
- if self.choices is not None:
42
- kwargs["choices"] = self.choices
44
+
45
+ self_help = _eval(self.help)
46
+ self_names = _eval(self.names)
47
+ self_nargs = _eval(self.nargs)
48
+ self_opt = _eval(self.opt)
49
+ self_meta = _eval(self.meta)
50
+ self_action = _eval(self.action)
51
+ self_default = _eval(self.default)
52
+ self_choices = _eval(self.choices)
53
+
54
+ if self_help is not None:
55
+ kwargs["help"] = self_help
56
+ if self_nargs is not None:
57
+ kwargs["nargs"] = self_nargs
58
+ if self_meta is not None:
59
+ kwargs["metavar"] = self_meta
60
+ if self_default is not None:
61
+ kwargs["default"] = self_default
62
+ if self_action is not None:
63
+ kwargs["action"] = self_action
64
+ if self_choices is not None:
65
+ kwargs["choices"] = self_choices
43
66
 
44
67
  names = (
45
- [name] if self.pos else self.names if len(self.names) > 0 else [f"--{name}"]
68
+ [name] if self.pos else self_names if len(self_names) > 0 else [f"--{name}"]
46
69
  )
47
70
 
48
71
  if self.pos:
49
- kwargs["nargs"] = "?" if self.opt else 1
72
+ kwargs["nargs"] = "?" if self_opt else 1
50
73
  else:
51
74
  kwargs["dest"] = name
52
- kwargs["required"] = not self.opt
75
+ kwargs["required"] = not self_opt
53
76
 
54
77
  action = parser.add_argument(*names, **kwargs)
55
78
  if self.completer:
56
- action.completer = self.completer # type: ignore
79
+ typing.cast(_Completable, action).completer = self.completer
57
80
 
58
81
  return action
59
82
 
@@ -9,9 +9,10 @@ import datetime
9
9
  import inspect
10
10
  import os
11
11
  from dataclasses import dataclass
12
- from typing import Callable, Dict, Iterable, List, Optional, Union
12
+ from typing import Any, Callable, Dict, Iterable, List, Optional, Union, cast
13
13
 
14
14
  from proj_flow.base import cmd
15
+ from proj_flow.base import inspect as _inspect
15
16
 
16
17
  package_root = os.path.dirname(os.path.dirname(__file__))
17
18
  template_dir = "template"
@@ -26,32 +27,44 @@ SettingsType = Dict[str, StrOrBool]
26
27
  class Setting:
27
28
  json_key: str
28
29
  prompt: str = ""
29
- value: Union[Values, Callable[[], Values]] = ""
30
+ value: Union[Values, Callable[[], Values], Callable[[SettingsType], Values]] = ""
30
31
  fix: Optional[str] = None
31
32
  force_fix: bool = False
33
+ project: Optional[str] = None
32
34
 
33
35
  def calc_value(self, previous: SettingsType):
34
- if isinstance(self.value, Callable):
36
+ if callable(self.value):
35
37
  kwargs = {}
36
38
 
37
39
  params = inspect.signature(self.value).parameters
38
40
  if "settings" in params:
39
41
  kwargs["settings"] = previous
40
42
 
41
- return self.value(**kwargs)
43
+ return cast(_inspect.Function, self.value)(**kwargs)
42
44
 
43
45
  return self.value
44
46
 
45
47
 
46
- def register_init_setting(*setting: Setting, is_hidden=False):
48
+ def register_init_setting(*settings: Setting, is_hidden=False, project: Optional[str]):
49
+ if project is not None:
50
+ for setting in settings:
51
+ setting.project = project
52
+ (hidden if is_hidden else defaults).extend(settings)
53
+
54
+
55
+ def register_common_init_setting(*setting: Setting, is_hidden=False):
47
56
  (hidden if is_hidden else defaults).extend(setting)
48
57
 
49
58
 
50
- def register_switch(key: str, prompt: str, enabled: bool):
59
+ def register_switch(key: str, prompt: str, enabled: bool, project: Optional[str]):
60
+ switches.append(Setting(key, prompt, value=enabled, project=project))
61
+
62
+
63
+ def register_common_switch(key: str, prompt: str, enabled: bool):
51
64
  switches.append(Setting(key, prompt, value=enabled))
52
65
 
53
66
 
54
- def register_internal(key: str, value: any):
67
+ def register_internal(key: str, value: Any):
55
68
  internals[key] = value
56
69
 
57
70
 
@@ -59,17 +72,20 @@ def _git_config(name: str):
59
72
  def wrap():
60
73
  proc = cmd.run("git", "config", name, capture_output=True)
61
74
  if proc is None or proc.returncode != 0:
62
- return None
75
+ return ""
63
76
  return proc.stdout.strip()
64
77
 
65
78
  return wrap
66
79
 
67
80
 
68
- def move_to_front(preferred: str, values: Iterable[str]):
81
+ def move_to_front(preferred: str, values: Iterable[Optional[str]]):
69
82
  result: List[str] = []
70
83
 
71
84
  has_preferred = False
72
85
  for value in values:
86
+ if value is None:
87
+ continue
88
+
73
89
  if value == preferred:
74
90
  has_preferred = True
75
91
  else:
@@ -94,7 +110,7 @@ def _enum_licenses():
94
110
  root = os.path.abspath(os.path.join(package_root, template_dir, "licenses"))
95
111
  for _, dirnames, filenames in os.walk(root):
96
112
  dirnames[:] = []
97
- iter = filter(lambda x: x is not None, map(_as_mustache, filenames))
113
+ iter = map(_as_mustache, filenames)
98
114
  return move_to_front("MIT", iter)
99
115
  return []
100
116
 
@@ -114,11 +130,11 @@ def _get_nothing(_: SettingsType) -> StrOrBool:
114
130
 
115
131
 
116
132
  def _map(internal_key: str):
117
- def impl(key: str):
133
+ def impl(key: StrOrBool) -> StrOrBool:
118
134
  mapped = internals.get(internal_key)
119
135
  if not isinstance(mapped, dict):
120
- return None
121
- return mapped.get(key)
136
+ return ""
137
+ return mapped.get(key, "")
122
138
 
123
139
  return impl
124
140
 
@@ -152,12 +168,12 @@ def _build_fixup(settings: SettingsType, fixup: str):
152
168
  value = code(settings)
153
169
 
154
170
  if result:
155
- result += value
171
+ result = f"{result}{value}"
156
172
  else:
157
173
  result = value
158
174
 
159
175
  if verbose:
160
- result += verbose
176
+ result = f"{result}{verbose}"
161
177
 
162
178
  return result
163
179
 
@@ -169,7 +185,7 @@ def _fixed(fixup: str):
169
185
  return wrap
170
186
 
171
187
 
172
- internals = {}
188
+ internals: Dict[str, Any] = {}
173
189
 
174
190
  switches: List[Setting] = []
175
191
 
@@ -200,18 +216,21 @@ defaults: List[Setting] = [
200
216
  "INCLUDE_PREFIX",
201
217
  'Prefix for includes (as in #include "{PREFIX}/version.hpp")',
202
218
  _fixed("{PROJECT.NAME}"),
219
+ project="cxx",
203
220
  ),
204
221
  Setting(
205
222
  "NAME_PREFIX",
206
223
  "CMake variable name prefix",
207
224
  _fixed("{PROJECT.NAME$safe$upper}"),
225
+ project="cxx",
208
226
  ),
209
227
  Setting(
210
228
  "NAMESPACE",
211
229
  "C++ namespace for the project",
212
230
  _fixed("{PROJECT.NAME$safe}"),
231
+ project="cxx",
213
232
  ),
214
- Setting("EXT", "Extension for code files", _list_ext),
233
+ Setting("EXT", "Extension for code files", _list_ext, project="cxx"),
215
234
  Setting("SRCDIR", "Directory for code files", "src"),
216
235
  Setting(
217
236
  "INCLUDEDIR",
@@ -219,20 +238,21 @@ defaults: List[Setting] = [
219
238
  "include",
220
239
  "{INCLUDEDIR}/{INCLUDE_PREFIX}",
221
240
  force_fix=True,
241
+ project="cxx",
222
242
  ),
223
243
  ]
224
244
 
225
245
  hidden: List[Setting] = [
226
- Setting("EXT.cxx", fix="{EXT}"),
227
- Setting("EXT.hxx", fix="{EXT.cxx$header}"),
246
+ Setting("EXT.cxx", fix="{EXT}", project="cxx"),
247
+ Setting("EXT.hxx", fix="{EXT.cxx$header}", project="cxx"),
228
248
  ]
229
249
 
230
250
  _fileext = {".cc": ".hh", ".cxx": ".hxx", ".cpp": ".hpp"}
231
251
 
232
252
 
233
253
  _filters: Dict[str, Callable[[StrOrBool], StrOrBool]] = {
234
- "safe": lambda value: value.replace("-", "_"),
235
- "upper": lambda value: value.upper(),
236
- "lower": lambda value: value.lower(),
237
- "header": lambda cxx_ext: _fileext.get(cxx_ext, ".hpp"),
254
+ "safe": lambda value: str(value).replace("-", "_"),
255
+ "upper": lambda value: str(value).upper(),
256
+ "lower": lambda value: str(value).lower(),
257
+ "header": lambda cxx_ext: _fileext.get(str(cxx_ext), ".hpp"),
238
258
  }
@@ -24,7 +24,6 @@ from enum import Enum
24
24
  from typing import Any, Callable, Dict, List, Optional, Union, cast
25
25
 
26
26
  from proj_flow.base import plugins, uname
27
- from proj_flow.base.plugins import load_module_plugins
28
27
 
29
28
  platform = uname.uname()[0]
30
29
 
@@ -152,7 +151,13 @@ class FlowConfig:
152
151
  sys.path.insert(0, local_extensions)
153
152
 
154
153
  for extension in extensions:
155
- importlib.import_module(extension)
154
+ try:
155
+ importlib.import_module(extension)
156
+ except ModuleNotFoundError:
157
+ print(
158
+ f"-- error: module `{extension}` was no found, ignoring",
159
+ file=sys.stderr,
160
+ )
156
161
 
157
162
  @property
158
163
  def entry(self) -> Dict[str, dict]:
@@ -2,7 +2,7 @@
2
2
  # This code is licensed under MIT license (see LICENSE for details)
3
3
 
4
4
  """
5
- The **proj_flow.api.makefiles** exposes simple makefiles APIs, so extensions can
5
+ The **proj_flow.api.makefile** exposes simple makefile APIs, so extensions can
6
6
  easily provide run steps with multiple scripts being called.
7
7
  """
8
8
 
@@ -12,6 +12,7 @@ from typing import List, cast
12
12
  from proj_flow.api.env import Config, Runtime
13
13
  from proj_flow.base import inspect as _inspect
14
14
  from proj_flow.base import matrix
15
+ from proj_flow.base.name_list import name_list
15
16
 
16
17
 
17
18
  class Step(ABC):
@@ -111,11 +112,8 @@ def _name_list(label: str, names: List[str], template="`{}`") -> str:
111
112
  if len(names) == 0:
112
113
  return ""
113
114
 
114
- em = [template.format(name) for name in names]
115
- prefix = ", ".join(em[:-1])
116
- if prefix:
117
- prefix += " and "
118
- return f"\n:{label}: {prefix}{em[-1]}"
115
+ joined = name_list([template.format(name) for name in names])
116
+ return f"\n:{label}: {joined}"
119
117
 
120
118
 
121
119
  def _make_private(f: _inspect.Function):
@@ -0,0 +1,19 @@
1
+ # Copyright (c) 2025 Marcin Zdun
2
+ # This code is licensed under MIT license (see LICENSE for details)
3
+
4
+ """
5
+ The **proj_flow.base.name_list** provides name list helper for arguments with
6
+ choices
7
+ """
8
+
9
+ from typing import List
10
+
11
+
12
+ def name_list(names: List[str]) -> str:
13
+ if len(names) == 0:
14
+ return ""
15
+
16
+ prefix = ", ".join(names[:-1])
17
+ if prefix:
18
+ prefix += " and "
19
+ return f"{prefix}{names[-1]}"
@@ -0,0 +1,48 @@
1
+ # Copyright (c) 2025 Marcin Zdun
2
+ # This code is licensed under MIT license (see LICENSE for details)
3
+
4
+ """
5
+ The **proj_flow.base.plugins** provide the plugin enumeration helpers.
6
+ """
7
+
8
+ import json
9
+ import os
10
+ from typing import cast
11
+
12
+ import yaml
13
+
14
+
15
+ def load_yaml(filename: str):
16
+ with open(filename) as src:
17
+ return cast(dict, yaml.load(src, Loader=yaml.Loader))
18
+
19
+
20
+ def load_json(filename: str):
21
+ with open(filename) as src:
22
+ return cast(dict, json.load(src))
23
+
24
+
25
+ LOADERS = {
26
+ ".json": load_json,
27
+ ".yml": load_yaml,
28
+ ".yaml": load_yaml,
29
+ }
30
+
31
+
32
+ def load_data(filename: str):
33
+ prefix, ext = os.path.splitext(filename)
34
+ loader = LOADERS.get(ext.lower())
35
+ if loader:
36
+ try:
37
+ return loader(filename)
38
+ except Exception:
39
+ pass
40
+
41
+ for new_ext, loader in LOADERS.items():
42
+ new_filename = prefix + new_ext
43
+ try:
44
+ return loader(new_filename)
45
+ except Exception:
46
+ pass
47
+
48
+ return {}
@@ -2,10 +2,12 @@
2
2
  # This code is licensed under MIT license (see LICENSE for details)
3
3
 
4
4
  """
5
- The **proj_flow.base.registry**
5
+ The **proj_flow.base.registry** allows building extension points, with ability
6
+ to register the plugins with a decorator.
6
7
  """
7
8
 
8
9
  import typing
10
+ from collections import OrderedDict
9
11
 
10
12
  T = typing.TypeVar("T")
11
13
  K = typing.TypeVar("K")
@@ -100,6 +102,19 @@ _debug_copies: typing.List[Registry] = []
100
102
  def verbose_info():
101
103
  for registry in _debug_copies:
102
104
  for item in registry.container:
103
- print(
104
- f"-- {registry.name}: adding `{item.__module__}.{item.__class__.__name__}`"
105
- )
105
+ full_name = f"{item.__module__}.{item.__class__.__name__}"
106
+
107
+ kw = OrderedDict()
108
+
109
+ if hasattr(item, "name"):
110
+ kw["name"] = getattr(item, "name")
111
+ elif hasattr(item, "__name__"):
112
+ kw["name"] = getattr(item, "__name__")
113
+
114
+ if hasattr(item, "id"):
115
+ kw["id"] = getattr(item, "id")
116
+
117
+ items = ", ".join([f"{key}={value}" for key, value in kw.items()])
118
+ if len(items) > 0:
119
+ items = f" ({items})"
120
+ print(f"-- {registry.name}: adding `{full_name}`{items}")
@@ -10,10 +10,8 @@ The **proj_flow.cli** provides command-line entry for the *Project Flow*.
10
10
  import argparse
11
11
  import os
12
12
  import sys
13
- from pprint import pprint
14
- from typing import Dict, Optional, Tuple
15
13
 
16
- from proj_flow.api import arg, env
14
+ from proj_flow.api import env
17
15
  from proj_flow.cli import argument, finder
18
16
  from proj_flow.flow import steps
19
17
 
@@ -31,7 +29,7 @@ def main():
31
29
  def _change_dir():
32
30
  root = argparse.ArgumentParser(
33
31
  prog="proj-flow",
34
- usage="proj-flow [-h] [--version] [-C [dir]] {command} ...",
32
+ usage="proj-flow [-h] [--version] [-C [dir]] command ...",
35
33
  add_help=False,
36
34
  )
37
35
  root.add_argument("-C", dest="cd", nargs="?")
@@ -2,7 +2,7 @@
2
2
  # This code is licensed under MIT license (see LICENSE for details)
3
3
 
4
4
  """
5
- The **proj_flow.cli.arguments** provides command-line builders and runners,
5
+ The **proj_flow.cli.argument** provides command-line builders and runners,
6
6
  supporting the functions decorated with :func:`@arg.command()
7
7
  <proj_flow.api.arg.command>`.
8
8
  """
@@ -192,7 +192,7 @@ class Command:
192
192
  if len(self.children):
193
193
  subparsers = parser.add_subparsers(
194
194
  dest=f"command_{level}",
195
- metavar="{command}",
195
+ metavar="command",
196
196
  help="Known command name, see below",
197
197
  )
198
198
  subparsers.parent = parser # type: ignore
@@ -254,7 +254,7 @@ def _argparse_visit_all(
254
254
  parser.shortcuts = shortcut_configs
255
255
 
256
256
  subparsers = parser.add_subparsers(
257
- dest="command", metavar="{command}", help="Known command name, see below"
257
+ dest="command", metavar="command", help="Known command name, see below"
258
258
  )
259
259
 
260
260
  subparsers.parent = parser # type: ignore
@@ -2,7 +2,7 @@
2
2
  # This code is licensed under MIT license (see LICENSE for details)
3
3
 
4
4
  """
5
- The **proj_flow.flow.dependency** verifies availabilty of Step's external tools.
5
+ The **proj_flow.dependency** verifies availabilty of Step's external tools.
6
6
  """
7
7
 
8
8
  import re
@@ -0,0 +1,10 @@
1
+ # Copyright (c) 2025 Marcin Zdun
2
+ # This code is licensed under MIT license (see LICENSE for details)
3
+
4
+ """
5
+ The **proj_flow.ext.cplusplus** defines steps and commands for C++ projects.
6
+ """
7
+
8
+ from . import cmake, conan
9
+
10
+ __all__ = ["cmake", "conan"]
@@ -0,0 +1,12 @@
1
+ # Copyright (c) 2025 Marcin Zdun
2
+ # This code is licensed under MIT license (see LICENSE for details)
3
+
4
+ """
5
+ The **proj_flow.ext.cplusplus.cmake** provides ``"CMake"``, ``"Build"``,
6
+ ``"Pack"`` and ``"Test"`` steps, as well as CMake-specific initialization
7
+ context.
8
+ """
9
+
10
+ from . import context, parser, steps, version
11
+
12
+ __all__ = ["context", "parser", "steps", "version"]
@@ -1,5 +1,10 @@
1
1
  # Copyright (c) 2025 Marcin Zdun
2
2
  # This code is licensed under MIT license (see LICENSE for details)
3
3
 
4
+ """
5
+ The **proj_flow.ext.cplusplus.cmake.__version__** contains only the value of
6
+ expected version of CMake.
7
+ """
8
+
4
9
 
5
10
  CMAKE_VERSION = "3.28"