cfengine 0.14.0__tar.gz → 0.16.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 (175) hide show
  1. {cfengine-0.14.0 → cfengine-0.16.0}/.github/dependabot.yml +5 -2
  2. cfengine-0.16.0/.github/workflows/lint-policy-in-other-repos.yml +55 -0
  3. cfengine-0.16.0/.github/workflows/stale.yml +25 -0
  4. {cfengine-0.14.0 → cfengine-0.16.0}/Makefile +4 -0
  5. {cfengine-0.14.0 → cfengine-0.16.0}/PKG-INFO +32 -2
  6. {cfengine-0.14.0 → cfengine-0.16.0}/README.md +28 -0
  7. {cfengine-0.14.0 → cfengine-0.16.0}/pyproject.toml +4 -2
  8. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine.egg-info/PKG-INFO +32 -2
  9. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine.egg-info/SOURCES.txt +70 -55
  10. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine.egg-info/requires.txt +2 -0
  11. cfengine-0.16.0/src/cfengine_cli/changelog.py +426 -0
  12. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/commands.py +25 -1
  13. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/dev.py +3 -0
  14. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/docs.py +49 -17
  15. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/format.py +93 -33
  16. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/lint.py +74 -66
  17. cfengine-0.16.0/src/cfengine_cli/lint_csv.py +52 -0
  18. cfengine-0.16.0/src/cfengine_cli/lint_yml.py +25 -0
  19. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/main.py +46 -0
  20. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/masterfiles/analyze.py +2 -2
  21. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/masterfiles/check_download_matches_git.py +1 -1
  22. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/paths.py +30 -5
  23. cfengine-0.16.0/src/cfengine_cli/up.py +221 -0
  24. cfengine-0.16.0/src/cfengine_cli/validate.py +137 -0
  25. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/version.py +2 -5
  26. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/002_basics.expected.cf +5 -0
  27. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/002_basics.input.cf +1 -0
  28. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/003_wrapping.expected.cf +1 -1
  29. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/003_wrapping.input.cf +1 -1
  30. cfengine-0.16.0/tests/format/004_comments.expected.cf +146 -0
  31. cfengine-0.16.0/tests/format/004_comments.input.cf +135 -0
  32. cfengine-0.16.0/tests/format/005_bundle_comments.expected.cf +106 -0
  33. cfengine-0.16.0/tests/format/005_bundle_comments.input.cf +103 -0
  34. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/011_macros.expected.cf +13 -3
  35. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/011_macros.input.cf +13 -0
  36. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/011_promises.expected.cf +14 -0
  37. cfengine-0.16.0/tests/lint/002_deprecations.expected.txt +17 -0
  38. cfengine-0.14.0/tests/lint/002_ifvarclass.x.cf → cfengine-0.16.0/tests/lint/002_deprecations.x.cf +4 -0
  39. cfengine-0.16.0/tests/lint/003_name_lowercase.cf +16 -0
  40. cfengine-0.16.0/tests/lint/003_name_lowercase.expected.txt +16 -0
  41. cfengine-0.16.0/tests/lint/003_name_lowercase.x.cf +16 -0
  42. cfengine-0.16.0/tests/lint/004_block_type.cf +11 -0
  43. cfengine-0.16.0/tests/lint/004_block_type.expected.txt +11 -0
  44. cfengine-0.16.0/tests/lint/004_block_type.x.cf +11 -0
  45. cfengine-0.16.0/tests/lint/005_syntax_error.expected.txt +7 -0
  46. cfengine-0.16.0/tests/lint/006_empty_file.expected.txt +3 -0
  47. cfengine-0.14.0/tests/lint/008_namespace.expected.txt → cfengine-0.16.0/tests/lint/007_namespace.expected.txt +2 -2
  48. cfengine-0.14.0/tests/lint/009_bundle_shadows_function.expected.txt → cfengine-0.16.0/tests/lint/008_bundle_shadows_function.expected.txt +2 -2
  49. cfengine-0.14.0/tests/lint/010_unknown_function_inside_vars.expected.txt → cfengine-0.16.0/tests/lint/009_unknown_function_inside_vars.expected.txt +3 -3
  50. cfengine-0.14.0/tests/lint/011_mutually_exclusive_types_vars.expected.txt → cfengine-0.16.0/tests/lint/010_mutually_exclusive_types_vars.expected.txt +3 -3
  51. cfengine-0.14.0/tests/lint/012_invalid_attributes.expected.txt → cfengine-0.16.0/tests/lint/011_invalid_attributes.expected.txt +3 -3
  52. cfengine-0.14.0/tests/lint/013_function_call_arg_count.expected.txt → cfengine-0.16.0/tests/lint/012_function_call_arg_count.expected.txt +3 -3
  53. cfengine-0.14.0/tests/lint/014_num_args_body.expected.txt → cfengine-0.16.0/tests/lint/013_num_args_body.expected.txt +7 -7
  54. cfengine-0.14.0/tests/lint/014_num_args_bundle.expected.txt → cfengine-0.16.0/tests/lint/013_num_args_bundle.expected.txt +7 -7
  55. cfengine-0.14.0/tests/lint/015_variadic_func_arg_count.expected.txt → cfengine-0.16.0/tests/lint/014_variadic_func_arg_count.expected.txt +3 -3
  56. cfengine-0.14.0/tests/lint/016_macro_multi_def_bundle.cf → cfengine-0.16.0/tests/lint/015_macro_multi_def_bundle.cf +2 -5
  57. cfengine-0.16.0/tests/lint/015_macro_multi_def_bundle.expected.txt +14 -0
  58. cfengine-0.14.0/tests/lint/017_half_promises.expected.txt → cfengine-0.16.0/tests/lint/016_half_promises.expected.txt +4 -4
  59. cfengine-0.14.0/tests/lint/018_implies_body.cf → cfengine-0.16.0/tests/lint/017_implies_body.cf +1 -2
  60. cfengine-0.14.0/tests/lint/018_implies_body.expected.txt → cfengine-0.16.0/tests/lint/017_implies_body.expected.txt +9 -9
  61. cfengine-0.14.0/tests/lint/019_nested_calls.cf → cfengine-0.16.0/tests/lint/018_nested_calls.cf +4 -4
  62. cfengine-0.14.0/tests/lint/019_nested_calls.expected.txt → cfengine-0.16.0/tests/lint/018_nested_calls.expected.txt +5 -5
  63. cfengine-0.16.0/tests/run-up-validate-tests.sh +48 -0
  64. cfengine-0.16.0/tests/shell/005-lint.sh +54 -0
  65. cfengine-0.16.0/tests/unit/test_changelog.py +147 -0
  66. cfengine-0.16.0/tests/unit/test_lint_csv.py +73 -0
  67. cfengine-0.16.0/tests/unit/test_lint_yml.py +54 -0
  68. cfengine-0.16.0/tests/unit/test_paths.py +32 -0
  69. cfengine-0.16.0/tests/up-validate/001_complex_config.yaml +71 -0
  70. cfengine-0.16.0/tests/up-validate/002_version.x.yaml +16 -0
  71. cfengine-0.16.0/tests/up-validate/003_box.x.yaml +16 -0
  72. cfengine-0.16.0/tests/up-validate/004_count.x.yaml +16 -0
  73. cfengine-0.16.0/tests/up-validate/mocks/cloud_config.json +10 -0
  74. cfengine-0.16.0/tests/up-validate/mocks/vagrant +11 -0
  75. {cfengine-0.14.0 → cfengine-0.16.0}/uv.lock +241 -21
  76. cfengine-0.14.0/tests/format/004_comments.expected.cf +0 -47
  77. cfengine-0.14.0/tests/format/004_comments.input.cf +0 -45
  78. cfengine-0.14.0/tests/format/005_bundle_comments.expected.cf +0 -54
  79. cfengine-0.14.0/tests/format/005_bundle_comments.input.cf +0 -52
  80. cfengine-0.14.0/tests/lint/002_ifvarclass.expected.txt +0 -7
  81. cfengine-0.14.0/tests/lint/003_deprecated_promise_type.cf +0 -5
  82. cfengine-0.14.0/tests/lint/003_deprecated_promise_type.expected.txt +0 -7
  83. cfengine-0.14.0/tests/lint/003_deprecated_promise_type.x.cf +0 -5
  84. cfengine-0.14.0/tests/lint/004_bundle_name_lowercase.cf +0 -5
  85. cfengine-0.14.0/tests/lint/004_bundle_name_lowercase.expected.txt +0 -6
  86. cfengine-0.14.0/tests/lint/004_bundle_name_lowercase.x.cf +0 -5
  87. cfengine-0.14.0/tests/lint/005_bundle_type.cf +0 -5
  88. cfengine-0.14.0/tests/lint/005_bundle_type.expected.txt +0 -6
  89. cfengine-0.14.0/tests/lint/005_bundle_type.x.cf +0 -5
  90. cfengine-0.14.0/tests/lint/006_syntax_error.expected.txt +0 -7
  91. cfengine-0.14.0/tests/lint/007_empty_file.expected.txt +0 -3
  92. cfengine-0.14.0/tests/lint/016_macro_multi_def_bundle.expected.txt +0 -14
  93. cfengine-0.14.0/tests/unit/test_paths.py +0 -19
  94. {cfengine-0.14.0 → cfengine-0.16.0}/.github/workflows/make-check.yml +0 -0
  95. {cfengine-0.14.0 → cfengine-0.16.0}/.github/workflows/pypi-publish.yml +0 -0
  96. {cfengine-0.14.0 → cfengine-0.16.0}/.github/workflows/update-syntax-description.yml +0 -0
  97. {cfengine-0.14.0 → cfengine-0.16.0}/.gitignore +0 -0
  98. {cfengine-0.14.0 → cfengine-0.16.0}/.python-version +0 -0
  99. {cfengine-0.14.0 → cfengine-0.16.0}/CLAUDE.md +0 -0
  100. {cfengine-0.14.0 → cfengine-0.16.0}/HACKING.md +0 -0
  101. {cfengine-0.14.0 → cfengine-0.16.0}/LICENSE +0 -0
  102. {cfengine-0.14.0 → cfengine-0.16.0}/ci/01-install.sh +0 -0
  103. {cfengine-0.14.0 → cfengine-0.16.0}/ci/02-safe-tests.sh +0 -0
  104. {cfengine-0.14.0 → cfengine-0.16.0}/ci/03-unsafe-tests.sh +0 -0
  105. {cfengine-0.14.0 → cfengine-0.16.0}/setup.cfg +0 -0
  106. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine.egg-info/dependency_links.txt +0 -0
  107. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine.egg-info/entry_points.txt +0 -0
  108. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine.egg-info/top_level.txt +0 -0
  109. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/__init__.py +0 -0
  110. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/__main__.py +0 -0
  111. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/deptool-README.md +0 -0
  112. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/deptool.py +0 -0
  113. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/masterfiles/__init__.py +0 -0
  114. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/masterfiles/download.py +0 -0
  115. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/masterfiles/generate_git_tags.py +0 -0
  116. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/masterfiles/generate_release_information.py +0 -0
  117. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/masterfiles/generate_vcf_download.py +0 -0
  118. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/masterfiles/generate_vcf_git_checkout.py +0 -0
  119. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/profile.py +0 -0
  120. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/shell.py +0 -0
  121. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/syntax-description.json +0 -0
  122. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/syntax_tree.py +0 -0
  123. {cfengine-0.14.0 → cfengine-0.16.0}/src/cfengine_cli/utils.py +0 -0
  124. {cfengine-0.14.0 → cfengine-0.16.0}/tests/README.md +0 -0
  125. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/001_hello_world.expected.cf +0 -0
  126. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/001_hello_world.input.cf +0 -0
  127. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/006_remove_empty_comments.expected.cf +0 -0
  128. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/006_remove_empty_comments.input.cf +0 -0
  129. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/007_class_guarded_empty_lines.expected.cf +0 -0
  130. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/007_class_guarded_empty_lines.input.cf +0 -0
  131. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/008_long_string.expected.cf +0 -0
  132. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/008_long_string.input.cf +0 -0
  133. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/009_single_line.expected.cf +0 -0
  134. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/009_single_line.input.cf +0 -0
  135. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/010_stakeholder.expected.cf +0 -0
  136. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/010_stakeholder.input.cf +0 -0
  137. {cfengine-0.14.0 → cfengine-0.16.0}/tests/format/011_promises.input.cf +0 -0
  138. {cfengine-0.14.0 → cfengine-0.16.0}/tests/lint/001_hello_world.cf +0 -0
  139. /cfengine-0.14.0/tests/lint/006_syntax_error.cf → /cfengine-0.16.0/tests/lint/005_syntax_error.cf +0 -0
  140. /cfengine-0.14.0/tests/lint/006_syntax_error.x.cf → /cfengine-0.16.0/tests/lint/005_syntax_error.x.cf +0 -0
  141. /cfengine-0.14.0/tests/lint/007_empty_file.x.cf → /cfengine-0.16.0/tests/lint/006_empty_file.x.cf +0 -0
  142. /cfengine-0.14.0/tests/lint/008_namespace.cf → /cfengine-0.16.0/tests/lint/007_namespace.cf +0 -0
  143. /cfengine-0.14.0/tests/lint/008_namespace.x.cf → /cfengine-0.16.0/tests/lint/007_namespace.x.cf +0 -0
  144. /cfengine-0.14.0/tests/lint/009_bundle_shadows_function.cf → /cfengine-0.16.0/tests/lint/008_bundle_shadows_function.cf +0 -0
  145. /cfengine-0.14.0/tests/lint/009_bundle_shadows_function.x.cf → /cfengine-0.16.0/tests/lint/008_bundle_shadows_function.x.cf +0 -0
  146. /cfengine-0.14.0/tests/lint/010_unknown_function_inside_vars.cf → /cfengine-0.16.0/tests/lint/009_unknown_function_inside_vars.cf +0 -0
  147. /cfengine-0.14.0/tests/lint/010_unknown_function_inside_vars.x.cf → /cfengine-0.16.0/tests/lint/009_unknown_function_inside_vars.x.cf +0 -0
  148. /cfengine-0.14.0/tests/lint/011_mutually_exclusive_types_vars.cf → /cfengine-0.16.0/tests/lint/010_mutually_exclusive_types_vars.cf +0 -0
  149. /cfengine-0.14.0/tests/lint/011_mutually_exclusive_types_vars.x.cf → /cfengine-0.16.0/tests/lint/010_mutually_exclusive_types_vars.x.cf +0 -0
  150. /cfengine-0.14.0/tests/lint/012_invalid_attributes.x.cf → /cfengine-0.16.0/tests/lint/011_invalid_attributes.x.cf +0 -0
  151. /cfengine-0.14.0/tests/lint/013_function_call_arg_count.cf → /cfengine-0.16.0/tests/lint/012_function_call_arg_count.cf +0 -0
  152. /cfengine-0.14.0/tests/lint/013_function_call_arg_count.x.cf → /cfengine-0.16.0/tests/lint/012_function_call_arg_count.x.cf +0 -0
  153. /cfengine-0.14.0/tests/lint/014_num_args_body.x.cf → /cfengine-0.16.0/tests/lint/013_num_args_body.x.cf +0 -0
  154. /cfengine-0.14.0/tests/lint/014_num_args_bundle.x.cf → /cfengine-0.16.0/tests/lint/013_num_args_bundle.x.cf +0 -0
  155. /cfengine-0.14.0/tests/lint/014_num_args_bundle_body.cf → /cfengine-0.16.0/tests/lint/013_num_args_bundle_body.cf +0 -0
  156. /cfengine-0.14.0/tests/lint/015_variadic_func_arg_count.cf → /cfengine-0.16.0/tests/lint/014_variadic_func_arg_count.cf +0 -0
  157. /cfengine-0.14.0/tests/lint/015_variadic_func_arg_count.x.cf → /cfengine-0.16.0/tests/lint/014_variadic_func_arg_count.x.cf +0 -0
  158. /cfengine-0.14.0/tests/lint/016_macro_multi_def_bundle.x.cf → /cfengine-0.16.0/tests/lint/015_macro_multi_def_bundle.x.cf +0 -0
  159. /cfengine-0.14.0/tests/lint/017_half_promises.cf → /cfengine-0.16.0/tests/lint/016_half_promises.cf +0 -0
  160. /cfengine-0.14.0/tests/lint/017_half_promises.x.cf → /cfengine-0.16.0/tests/lint/016_half_promises.x.cf +0 -0
  161. /cfengine-0.14.0/tests/lint/018_implies_body.x.cf → /cfengine-0.16.0/tests/lint/017_implies_body.x.cf +0 -0
  162. /cfengine-0.14.0/tests/lint/019_nested_calls.x.cf → /cfengine-0.16.0/tests/lint/018_nested_calls.x.cf +0 -0
  163. /cfengine-0.14.0/tests/lint/020_bundle_name_expansion.cf → /cfengine-0.16.0/tests/lint/019_bundle_name_expansion.cf +0 -0
  164. {cfengine-0.14.0 → cfengine-0.16.0}/tests/run-format-tests.sh +0 -0
  165. {cfengine-0.14.0 → cfengine-0.16.0}/tests/run-lint-tests.sh +0 -0
  166. {cfengine-0.14.0 → cfengine-0.16.0}/tests/run-shell-tests.sh +0 -0
  167. {cfengine-0.14.0 → cfengine-0.16.0}/tests/shell/001-help.sh +0 -0
  168. {cfengine-0.14.0 → cfengine-0.16.0}/tests/shell/002-version.sh +0 -0
  169. {cfengine-0.14.0 → cfengine-0.16.0}/tests/shell/003-format.sh +0 -0
  170. {cfengine-0.14.0 → cfengine-0.16.0}/tests/shell/004-format-check.sh +0 -0
  171. {cfengine-0.14.0 → cfengine-0.16.0}/tests/unit/__init__.py +0 -0
  172. {cfengine-0.14.0 → cfengine-0.16.0}/tests/unit/test_deps.py +0 -0
  173. {cfengine-0.14.0 → cfengine-0.16.0}/tests/unit/test_format.py +0 -0
  174. {cfengine-0.14.0 → cfengine-0.16.0}/tests/unit/test_utils.py +0 -0
  175. {cfengine-0.14.0 → cfengine-0.16.0}/tests/unit/test_version.py +0 -0
@@ -3,15 +3,18 @@
3
3
 
4
4
  version: 2
5
5
  updates:
6
- - package-ecosystem: "pip"
6
+ - package-ecosystem: "uv"
7
7
  directory: "/"
8
8
  schedule:
9
9
  interval: "weekly"
10
- prefix: "pip"
10
+ reviewers:
11
+ - "larsewi"
12
+ - "olehermanse"
11
13
  - package-ecosystem: "github-actions"
12
14
  directory: "/"
13
15
  schedule:
14
16
  interval: "weekly"
15
17
  reviewers:
18
+ - "larsewi"
16
19
  - "olehermanse"
17
20
  prefix: "GitHub Actions"
@@ -0,0 +1,55 @@
1
+ # This workflow checks that linting works on real policy in other repos
2
+ # and ensures we fix errors in policy before merging new linting rules
3
+ # to CFEngine CLI
4
+
5
+ name: Lint policy in other repos
6
+ on:
7
+ push:
8
+ branches: [main]
9
+ pull_request:
10
+ branches: [main]
11
+ workflow_dispatch:
12
+ permissions:
13
+ contents: read
14
+ jobs:
15
+ lint:
16
+ runs-on: ubuntu-24.04
17
+ steps:
18
+ - name: Checkout cfengine-cli
19
+ uses: actions/checkout@v4
20
+ with:
21
+ path: cfengine-cli
22
+ - name: Checkout masterfiles
23
+ uses: actions/checkout@v4
24
+ with:
25
+ repository: cfengine/masterfiles
26
+ path: masterfiles
27
+ - name: Checkout documentation
28
+ uses: actions/checkout@v4
29
+ with:
30
+ repository: cfengine/documentation
31
+ path: documentation
32
+ - name: Checkout modules
33
+ uses: actions/checkout@v4
34
+ with:
35
+ repository: cfengine/modules
36
+ path: modules
37
+ - name: Set up Python
38
+ uses: actions/setup-python@v5
39
+ with:
40
+ python-version: "3.13"
41
+ - name: Install dependencies
42
+ working-directory: cfengine-cli
43
+ run: |
44
+ python -m pip install --upgrade pip
45
+ python -m pip install uv
46
+ make install
47
+ - name: Run cfengine lint
48
+ working-directory: cfengine-cli
49
+ run: |
50
+ uv run cfengine lint --strict no ../masterfiles
51
+ uv run cfengine lint --strict no ../modules
52
+ uv run cfengine lint --strict no ../documentation
53
+ # TODO: Add core when ready
54
+ # TODO: Do all of them together, with strict, when ready;
55
+ # uv run cfengine lint ../core ../masterfiles ../documentation ../modules
@@ -0,0 +1,25 @@
1
+ # For more information, see:
2
+ # https://github.com/actions/stale
3
+ name: Label and close stale pull requests
4
+
5
+ on:
6
+ schedule:
7
+ - cron: "31 19 * * *"
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ stale:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ pull-requests: write
15
+ issues: read
16
+
17
+ steps:
18
+ - uses: actions/stale@v5
19
+ with:
20
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
21
+ stale-pr-message: "Marking this PR as stale due to inactivity; it will be closed in 7 days."
22
+ stale-pr-label: "stale"
23
+ days-before-stale: 30
24
+ days-before-close: 7
25
+ close-pr-message: "Closing PR due to inactivity. Feel free to open a new PR if necessary."
@@ -9,12 +9,15 @@ venv:
9
9
  format: venv
10
10
  uv tool run black . --target-version py310
11
11
  prettier . --write
12
+ uv run cfengine format ./
12
13
 
13
14
  lint: venv
14
15
  uv tool run black --check . --fast
15
16
  uv tool run flake8 src/ --ignore=E203,W503,E722,E731 --max-complexity=100 --max-line-length=160
16
17
  uv tool run pyflakes src/
17
18
  uv tool run pyright src/
19
+ uv run cfengine lint --strict=no ./
20
+ uv run cfengine format --check
18
21
 
19
22
  install:
20
23
  pipx install --force --editable .
@@ -24,3 +27,4 @@ check: venv format lint
24
27
  uv run bash tests/run-lint-tests.sh
25
28
  uv run bash tests/run-format-tests.sh
26
29
  uv run bash tests/run-shell-tests.sh
30
+ uv run bash tests/run-up-validate-tests.sh
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cfengine
3
- Version: 0.14.0
4
- Summary: Human-oriented CLI for interacting with CFEngine tools
3
+ Version: 0.16.0
4
+ Summary: Human-oriented CLI for interacting with CFEngine policy language, projects, and other CFEngine tools
5
5
  License: GNU GENERAL PUBLIC LICENSE
6
6
  Version 3, 29 June 2007
7
7
 
@@ -699,6 +699,8 @@ Requires-Dist: cfbs>=5.5.0
699
699
  Requires-Dist: tree-sitter-cfengine>=1.1.12
700
700
  Requires-Dist: tree-sitter>=0.25
701
701
  Requires-Dist: markdown-it-py>=3.0.0
702
+ Requires-Dist: pyyaml>=6.0.3
703
+ Requires-Dist: pydantic>=2.12.5
702
704
 
703
705
  # CFEngine command line interface (CLI)
704
706
 
@@ -779,6 +781,34 @@ cfengine build
779
781
 
780
782
  (This is equivalent to running `cfbs build`).
781
783
 
784
+ ### Spawn and install cfengine from a config
785
+
786
+ **this feature is still a work in progress**
787
+
788
+ Given a yaml config:
789
+
790
+ ```yaml
791
+ templates:
792
+ ubuntu:
793
+ provider: vagrant
794
+ vagrant:
795
+ box: ubuntu/focal64
796
+
797
+ groups:
798
+ myhub:
799
+ role: hub
800
+ source:
801
+ count: 1
802
+ mode: spawn
803
+ spawn: ubuntu
804
+ ```
805
+
806
+ up will spawn the necessary VMs and install cfengine using cf-remote
807
+
808
+ ```
809
+ cfengine up config.yaml
810
+ ```
811
+
782
812
  ## Supported platforms and versions
783
813
 
784
814
  This tool will only support a limited number of platforms, it is not intended to run everywhere CFEngine runs.
@@ -77,6 +77,34 @@ cfengine build
77
77
 
78
78
  (This is equivalent to running `cfbs build`).
79
79
 
80
+ ### Spawn and install cfengine from a config
81
+
82
+ **this feature is still a work in progress**
83
+
84
+ Given a yaml config:
85
+
86
+ ```yaml
87
+ templates:
88
+ ubuntu:
89
+ provider: vagrant
90
+ vagrant:
91
+ box: ubuntu/focal64
92
+
93
+ groups:
94
+ myhub:
95
+ role: hub
96
+ source:
97
+ count: 1
98
+ mode: spawn
99
+ spawn: ubuntu
100
+ ```
101
+
102
+ up will spawn the necessary VMs and install cfengine using cf-remote
103
+
104
+ ```
105
+ cfengine up config.yaml
106
+ ```
107
+
80
108
  ## Supported platforms and versions
81
109
 
82
110
  This tool will only support a limited number of platforms, it is not intended to run everywhere CFEngine runs.
@@ -1,11 +1,11 @@
1
1
  [build-system]
2
- requires = ["setuptools>=64", "setuptools-scm>=8"]
2
+ requires = ["setuptools>=82.0.1", "setuptools-scm>=10.0.5"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cfengine"
7
7
  dynamic = ["version"]
8
- description = "Human-oriented CLI for interacting with CFEngine tools"
8
+ description = "Human-oriented CLI for interacting with CFEngine policy language, projects, and other CFEngine tools"
9
9
  readme = "README.md"
10
10
  license = {file = "LICENSE"}
11
11
  requires-python = ">=3.10"
@@ -15,6 +15,8 @@ dependencies = [
15
15
  "tree-sitter-cfengine>=1.1.12",
16
16
  "tree-sitter>=0.25",
17
17
  "markdown-it-py>=3.0.0",
18
+ "pyyaml>=6.0.3",
19
+ "pydantic>=2.12.5",
18
20
  ]
19
21
  classifiers = [
20
22
  "Development Status :: 3 - Alpha",
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cfengine
3
- Version: 0.14.0
4
- Summary: Human-oriented CLI for interacting with CFEngine tools
3
+ Version: 0.16.0
4
+ Summary: Human-oriented CLI for interacting with CFEngine policy language, projects, and other CFEngine tools
5
5
  License: GNU GENERAL PUBLIC LICENSE
6
6
  Version 3, 29 June 2007
7
7
 
@@ -699,6 +699,8 @@ Requires-Dist: cfbs>=5.5.0
699
699
  Requires-Dist: tree-sitter-cfengine>=1.1.12
700
700
  Requires-Dist: tree-sitter>=0.25
701
701
  Requires-Dist: markdown-it-py>=3.0.0
702
+ Requires-Dist: pyyaml>=6.0.3
703
+ Requires-Dist: pydantic>=2.12.5
702
704
 
703
705
  # CFEngine command line interface (CLI)
704
706
 
@@ -779,6 +781,34 @@ cfengine build
779
781
 
780
782
  (This is equivalent to running `cfbs build`).
781
783
 
784
+ ### Spawn and install cfengine from a config
785
+
786
+ **this feature is still a work in progress**
787
+
788
+ Given a yaml config:
789
+
790
+ ```yaml
791
+ templates:
792
+ ubuntu:
793
+ provider: vagrant
794
+ vagrant:
795
+ box: ubuntu/focal64
796
+
797
+ groups:
798
+ myhub:
799
+ role: hub
800
+ source:
801
+ count: 1
802
+ mode: spawn
803
+ spawn: ubuntu
804
+ ```
805
+
806
+ up will spawn the necessary VMs and install cfengine using cf-remote
807
+
808
+ ```
809
+ cfengine up config.yaml
810
+ ```
811
+
782
812
  ## Supported platforms and versions
783
813
 
784
814
  This tool will only support a limited number of platforms, it is not intended to run everywhere CFEngine runs.
@@ -8,8 +8,10 @@ README.md
8
8
  pyproject.toml
9
9
  uv.lock
10
10
  .github/dependabot.yml
11
+ .github/workflows/lint-policy-in-other-repos.yml
11
12
  .github/workflows/make-check.yml
12
13
  .github/workflows/pypi-publish.yml
14
+ .github/workflows/stale.yml
13
15
  .github/workflows/update-syntax-description.yml
14
16
  ci/01-install.sh
15
17
  ci/02-safe-tests.sh
@@ -22,6 +24,7 @@ src/cfengine.egg-info/requires.txt
22
24
  src/cfengine.egg-info/top_level.txt
23
25
  src/cfengine_cli/__init__.py
24
26
  src/cfengine_cli/__main__.py
27
+ src/cfengine_cli/changelog.py
25
28
  src/cfengine_cli/commands.py
26
29
  src/cfengine_cli/deptool-README.md
27
30
  src/cfengine_cli/deptool.py
@@ -29,13 +32,17 @@ src/cfengine_cli/dev.py
29
32
  src/cfengine_cli/docs.py
30
33
  src/cfengine_cli/format.py
31
34
  src/cfengine_cli/lint.py
35
+ src/cfengine_cli/lint_csv.py
36
+ src/cfengine_cli/lint_yml.py
32
37
  src/cfengine_cli/main.py
33
38
  src/cfengine_cli/paths.py
34
39
  src/cfengine_cli/profile.py
35
40
  src/cfengine_cli/shell.py
36
41
  src/cfengine_cli/syntax-description.json
37
42
  src/cfengine_cli/syntax_tree.py
43
+ src/cfengine_cli/up.py
38
44
  src/cfengine_cli/utils.py
45
+ src/cfengine_cli/validate.py
39
46
  src/cfengine_cli/version.py
40
47
  src/cfengine_cli/masterfiles/__init__.py
41
48
  src/cfengine_cli/masterfiles/analyze.py
@@ -49,6 +56,7 @@ tests/README.md
49
56
  tests/run-format-tests.sh
50
57
  tests/run-lint-tests.sh
51
58
  tests/run-shell-tests.sh
59
+ tests/run-up-validate-tests.sh
52
60
  tests/format/001_hello_world.expected.cf
53
61
  tests/format/001_hello_world.input.cf
54
62
  tests/format/002_basics.expected.cf
@@ -74,67 +82,74 @@ tests/format/011_macros.input.cf
74
82
  tests/format/011_promises.expected.cf
75
83
  tests/format/011_promises.input.cf
76
84
  tests/lint/001_hello_world.cf
77
- tests/lint/002_ifvarclass.expected.txt
78
- tests/lint/002_ifvarclass.x.cf
79
- tests/lint/003_deprecated_promise_type.cf
80
- tests/lint/003_deprecated_promise_type.expected.txt
81
- tests/lint/003_deprecated_promise_type.x.cf
82
- tests/lint/004_bundle_name_lowercase.cf
83
- tests/lint/004_bundle_name_lowercase.expected.txt
84
- tests/lint/004_bundle_name_lowercase.x.cf
85
- tests/lint/005_bundle_type.cf
86
- tests/lint/005_bundle_type.expected.txt
87
- tests/lint/005_bundle_type.x.cf
88
- tests/lint/006_syntax_error.cf
89
- tests/lint/006_syntax_error.expected.txt
90
- tests/lint/006_syntax_error.x.cf
91
- tests/lint/007_empty_file.expected.txt
92
- tests/lint/007_empty_file.x.cf
93
- tests/lint/008_namespace.cf
94
- tests/lint/008_namespace.expected.txt
95
- tests/lint/008_namespace.x.cf
96
- tests/lint/009_bundle_shadows_function.cf
97
- tests/lint/009_bundle_shadows_function.expected.txt
98
- tests/lint/009_bundle_shadows_function.x.cf
99
- tests/lint/010_unknown_function_inside_vars.cf
100
- tests/lint/010_unknown_function_inside_vars.expected.txt
101
- tests/lint/010_unknown_function_inside_vars.x.cf
102
- tests/lint/011_mutually_exclusive_types_vars.cf
103
- tests/lint/011_mutually_exclusive_types_vars.expected.txt
104
- tests/lint/011_mutually_exclusive_types_vars.x.cf
105
- tests/lint/012_invalid_attributes.expected.txt
106
- tests/lint/012_invalid_attributes.x.cf
107
- tests/lint/013_function_call_arg_count.cf
108
- tests/lint/013_function_call_arg_count.expected.txt
109
- tests/lint/013_function_call_arg_count.x.cf
110
- tests/lint/014_num_args_body.expected.txt
111
- tests/lint/014_num_args_body.x.cf
112
- tests/lint/014_num_args_bundle.expected.txt
113
- tests/lint/014_num_args_bundle.x.cf
114
- tests/lint/014_num_args_bundle_body.cf
115
- tests/lint/015_variadic_func_arg_count.cf
116
- tests/lint/015_variadic_func_arg_count.expected.txt
117
- tests/lint/015_variadic_func_arg_count.x.cf
118
- tests/lint/016_macro_multi_def_bundle.cf
119
- tests/lint/016_macro_multi_def_bundle.expected.txt
120
- tests/lint/016_macro_multi_def_bundle.x.cf
121
- tests/lint/017_half_promises.cf
122
- tests/lint/017_half_promises.expected.txt
123
- tests/lint/017_half_promises.x.cf
124
- tests/lint/018_implies_body.cf
125
- tests/lint/018_implies_body.expected.txt
126
- tests/lint/018_implies_body.x.cf
127
- tests/lint/019_nested_calls.cf
128
- tests/lint/019_nested_calls.expected.txt
129
- tests/lint/019_nested_calls.x.cf
130
- tests/lint/020_bundle_name_expansion.cf
85
+ tests/lint/002_deprecations.expected.txt
86
+ tests/lint/002_deprecations.x.cf
87
+ tests/lint/003_name_lowercase.cf
88
+ tests/lint/003_name_lowercase.expected.txt
89
+ tests/lint/003_name_lowercase.x.cf
90
+ tests/lint/004_block_type.cf
91
+ tests/lint/004_block_type.expected.txt
92
+ tests/lint/004_block_type.x.cf
93
+ tests/lint/005_syntax_error.cf
94
+ tests/lint/005_syntax_error.expected.txt
95
+ tests/lint/005_syntax_error.x.cf
96
+ tests/lint/006_empty_file.expected.txt
97
+ tests/lint/006_empty_file.x.cf
98
+ tests/lint/007_namespace.cf
99
+ tests/lint/007_namespace.expected.txt
100
+ tests/lint/007_namespace.x.cf
101
+ tests/lint/008_bundle_shadows_function.cf
102
+ tests/lint/008_bundle_shadows_function.expected.txt
103
+ tests/lint/008_bundle_shadows_function.x.cf
104
+ tests/lint/009_unknown_function_inside_vars.cf
105
+ tests/lint/009_unknown_function_inside_vars.expected.txt
106
+ tests/lint/009_unknown_function_inside_vars.x.cf
107
+ tests/lint/010_mutually_exclusive_types_vars.cf
108
+ tests/lint/010_mutually_exclusive_types_vars.expected.txt
109
+ tests/lint/010_mutually_exclusive_types_vars.x.cf
110
+ tests/lint/011_invalid_attributes.expected.txt
111
+ tests/lint/011_invalid_attributes.x.cf
112
+ tests/lint/012_function_call_arg_count.cf
113
+ tests/lint/012_function_call_arg_count.expected.txt
114
+ tests/lint/012_function_call_arg_count.x.cf
115
+ tests/lint/013_num_args_body.expected.txt
116
+ tests/lint/013_num_args_body.x.cf
117
+ tests/lint/013_num_args_bundle.expected.txt
118
+ tests/lint/013_num_args_bundle.x.cf
119
+ tests/lint/013_num_args_bundle_body.cf
120
+ tests/lint/014_variadic_func_arg_count.cf
121
+ tests/lint/014_variadic_func_arg_count.expected.txt
122
+ tests/lint/014_variadic_func_arg_count.x.cf
123
+ tests/lint/015_macro_multi_def_bundle.cf
124
+ tests/lint/015_macro_multi_def_bundle.expected.txt
125
+ tests/lint/015_macro_multi_def_bundle.x.cf
126
+ tests/lint/016_half_promises.cf
127
+ tests/lint/016_half_promises.expected.txt
128
+ tests/lint/016_half_promises.x.cf
129
+ tests/lint/017_implies_body.cf
130
+ tests/lint/017_implies_body.expected.txt
131
+ tests/lint/017_implies_body.x.cf
132
+ tests/lint/018_nested_calls.cf
133
+ tests/lint/018_nested_calls.expected.txt
134
+ tests/lint/018_nested_calls.x.cf
135
+ tests/lint/019_bundle_name_expansion.cf
131
136
  tests/shell/001-help.sh
132
137
  tests/shell/002-version.sh
133
138
  tests/shell/003-format.sh
134
139
  tests/shell/004-format-check.sh
140
+ tests/shell/005-lint.sh
135
141
  tests/unit/__init__.py
142
+ tests/unit/test_changelog.py
136
143
  tests/unit/test_deps.py
137
144
  tests/unit/test_format.py
145
+ tests/unit/test_lint_csv.py
146
+ tests/unit/test_lint_yml.py
138
147
  tests/unit/test_paths.py
139
148
  tests/unit/test_utils.py
140
- tests/unit/test_version.py
149
+ tests/unit/test_version.py
150
+ tests/up-validate/001_complex_config.yaml
151
+ tests/up-validate/002_version.x.yaml
152
+ tests/up-validate/003_box.x.yaml
153
+ tests/up-validate/004_count.x.yaml
154
+ tests/up-validate/mocks/cloud_config.json
155
+ tests/up-validate/mocks/vagrant
@@ -3,3 +3,5 @@ cfbs>=5.5.0
3
3
  tree-sitter-cfengine>=1.1.12
4
4
  tree-sitter>=0.25
5
5
  markdown-it-py>=3.0.0
6
+ pyyaml>=6.0.3
7
+ pydantic>=2.12.5