antsibull-nox 0.3.0__tar.gz → 0.4.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 (86) hide show
  1. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/.flake8 +1 -1
  2. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/.github/workflows/nox.yml +1 -1
  3. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/.pylintrc.automated +1 -0
  4. antsibull_nox-0.3.0/docs/changelog.md → antsibull_nox-0.4.0/CHANGELOG.md +62 -10
  5. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/CHANGELOG.rst +27 -0
  6. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/PKG-INFO +1 -1
  7. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/changelogs/changelog.yaml +28 -0
  8. antsibull_nox-0.3.0/CHANGELOG.md → antsibull_nox-0.4.0/docs/changelog.md +36 -29
  9. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/docs/config-file.md +51 -3
  10. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/pyproject.toml +1 -0
  11. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/__init__.py +1 -1
  12. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/ansible.py +15 -0
  13. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/collection/data.py +12 -0
  14. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/collection/install.py +194 -79
  15. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/collection/search.py +128 -30
  16. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/config.py +3 -0
  17. antsibull_nox-0.4.0/src/antsibull_nox/data/file-yamllint.py +138 -0
  18. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/data/plugin-yamllint.py +51 -24
  19. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/interpret_config.py +12 -0
  20. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/sessions/ansible_lint.py +2 -0
  21. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/sessions/ansible_test.py +4 -13
  22. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/sessions/collections.py +8 -0
  23. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/sessions/lint.py +88 -21
  24. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/tests/unit/test_collection.py +9 -3
  25. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/.github/dependabot.yml +0 -0
  26. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/.github/patchback.yml +0 -0
  27. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/.github/workflows/reusable-nox-matrix.yml +0 -0
  28. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/.github/workflows/test-gh-action.yml +0 -0
  29. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/.gitignore +0 -0
  30. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/.readthedocs.yml +0 -0
  31. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/CHANGELOG.md.license +0 -0
  32. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/CHANGELOG.rst.license +0 -0
  33. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/LICENSE +0 -0
  34. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/LICENSES/GPL-3.0-or-later.txt +0 -0
  35. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/README.md +0 -0
  36. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/REUSE.toml +0 -0
  37. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/action.yml +0 -0
  38. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/changelogs/changelog.yaml.license +0 -0
  39. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/changelogs/config.yaml +0 -0
  40. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/changelogs/fragments/.keep +0 -0
  41. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/codecov.yml +0 -0
  42. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/docs/changelog.md.license +0 -0
  43. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/docs/community.md +0 -0
  44. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/docs/getting-started.md +0 -0
  45. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/docs/index.md +0 -0
  46. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/docs/introduction.md +0 -0
  47. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/docs/nox-in-ci.md +0 -0
  48. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/docs/reference.md +0 -0
  49. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/docs/troubleshooting.md +0 -0
  50. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/docs-requirements.txt +0 -0
  51. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/mkdocs.yml +0 -0
  52. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/noxfile.py +0 -0
  53. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/_pydantic.py +0 -0
  54. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/cli.py +0 -0
  55. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/collection/__init__.py +0 -0
  56. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/collection/extract.py +0 -0
  57. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/data/action-groups.py +0 -0
  58. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/data/antsibull-nox-lint-config.py +0 -0
  59. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/data/antsibull_nox_data_util.py +0 -0
  60. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/data/license-check.py +0 -0
  61. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/data/license-check.py.license +0 -0
  62. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/data/no-unwanted-files.py +0 -0
  63. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/data_util.py +0 -0
  64. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/init.py +0 -0
  65. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/lint_config.py +0 -0
  66. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/paths.py +0 -0
  67. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/py.typed +0 -0
  68. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/python.py +0 -0
  69. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/sessions/__init__.py +0 -0
  70. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/sessions/build_import_check.py +0 -0
  71. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/sessions/docs_check.py +0 -0
  72. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/sessions/extra_checks.py +0 -0
  73. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/sessions/license_check.py +0 -0
  74. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/sessions/utils.py +0 -0
  75. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/src/antsibull_nox/utils.py +0 -0
  76. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/tests/.keep +0 -0
  77. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/tests/needs-network/test_ansible_core.py +0 -0
  78. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/tests/test-collection/antsibull-nox.toml +0 -0
  79. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/tests/test-collection/galaxy.yml +0 -0
  80. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/tests/test-collection/noxfile.py +0 -0
  81. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/tests/test-collection/plugins/modules/test.py +0 -0
  82. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/tests/unit/__init__.py +0 -0
  83. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/tests/unit/test_ansible.py +0 -0
  84. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/tests/unit/test_python.py +0 -0
  85. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/tests/unit/test_utils.py +0 -0
  86. {antsibull_nox-0.3.0 → antsibull_nox-0.4.0}/tests/unit/utils.py +0 -0
@@ -10,7 +10,7 @@ max-complexity = 20
10
10
  max-line-length = 100
11
11
  statistics = True
12
12
  # These rules conflict with black
13
- ignore = E203, W503
13
+ ignore = E203, E704, W503
14
14
 
15
15
  # Line in multi-line string is too long:
16
16
  per-file-ignores =
@@ -60,7 +60,7 @@ jobs:
60
60
  run: |
61
61
  sudo apt-get install -y ${{ matrix.packages }}
62
62
  - name: Setup nox
63
- uses: wntrblm/nox@2025.02.09
63
+ uses: wntrblm/nox@2025.05.01
64
64
  with:
65
65
  python-versions: "${{ matrix.python-versions }}"
66
66
  - name: Run nox
@@ -71,6 +71,7 @@ disable=
71
71
  too-many-lines,
72
72
  too-many-locals,
73
73
  too-many-positional-arguments,
74
+ too-many-statements,
74
75
 
75
76
  # Enable the message, report, category or checker with the given id(s). You can
76
77
  # either give multiple identifier separated by comma (,) or put this option
@@ -1,9 +1,61 @@
1
1
  # Antsibull Nox Helper Release Notes
2
2
 
3
+ **Topics**
4
+
5
+ - <a href="#v0-4-0">v0\.4\.0</a>
6
+ - <a href="#release-summary">Release Summary</a>
7
+ - <a href="#major-changes">Major Changes</a>
8
+ - <a href="#minor-changes">Minor Changes</a>
9
+ - <a href="#bugfixes">Bugfixes</a>
10
+ - <a href="#v0-3-0">v0\.3\.0</a>
11
+ - <a href="#release-summary-1">Release Summary</a>
12
+ - <a href="#minor-changes-1">Minor Changes</a>
13
+ - <a href="#removed-features-previously-deprecated">Removed Features \(previously deprecated\)</a>
14
+ - <a href="#bugfixes-1">Bugfixes</a>
15
+ - <a href="#v0-2-0">v0\.2\.0</a>
16
+ - <a href="#release-summary-2">Release Summary</a>
17
+ - <a href="#major-changes-1">Major Changes</a>
18
+ - <a href="#minor-changes-2">Minor Changes</a>
19
+ - <a href="#deprecated-features">Deprecated Features</a>
20
+ - <a href="#v0-1-0">v0\.1\.0</a>
21
+ - <a href="#release-summary-3">Release Summary</a>
22
+ - <a href="#minor-changes-3">Minor Changes</a>
23
+ - <a href="#breaking-changes--porting-guide">Breaking Changes / Porting Guide</a>
24
+ - <a href="#bugfixes-2">Bugfixes</a>
25
+ - <a href="#v0-0-1">v0\.0\.1</a>
26
+ - <a href="#release-summary-4">Release Summary</a>
27
+
28
+ <a id="v0-4-0"></a>
29
+ ## v0\.4\.0
30
+
31
+ <a id="release-summary"></a>
32
+ ### Release Summary
33
+
34
+ Feature and bugfix release\.
35
+
36
+ <a id="major-changes"></a>
37
+ ### Major Changes
38
+
39
+ * Required collections can now be installed from different sources per depending on the ansible\-core version \([https\://github\.com/ansible\-community/antsibull\-nox/pull/76](https\://github\.com/ansible\-community/antsibull\-nox/pull/76)\)\.
40
+
41
+ <a id="minor-changes"></a>
42
+ ### Minor Changes
43
+
44
+ * Capture mypy and pylint errors to report paths of files relative to collection\'s root\, instead of relative to the virtual <code>ansible\_collections</code> directory \([https\://github\.com/ansible\-community/antsibull\-nox/pull/75](https\://github\.com/ansible\-community/antsibull\-nox/pull/75)\)\.
45
+ * Make yamllint plugin check also check doc fragments \([https\://github\.com/ansible\-community/antsibull\-nox/pull/73](https\://github\.com/ansible\-community/antsibull\-nox/pull/73)\)\.
46
+ * Positional arguments passed to nox are now forwarded to <code>ansible\-lint</code> \([https\://github\.com/ansible\-community/antsibull\-nox/pull/74](https\://github\.com/ansible\-community/antsibull\-nox/pull/74)\)\.
47
+ * The yamllint session now ignores <code>RETURN</code> documentation with values <code>\#</code> and \`\` \# \`\` \([https\://github\.com/ansible\-community/antsibull\-nox/pull/71](https\://github\.com/ansible\-community/antsibull\-nox/pull/71)\)\.
48
+ * The yamllint test no longer shows all filenames in the command line \([https\://github\.com/ansible\-community/antsibull\-nox/pull/72](https\://github\.com/ansible\-community/antsibull\-nox/pull/72)\)\.
49
+
50
+ <a id="bugfixes"></a>
51
+ ### Bugfixes
52
+
53
+ * Adjust yamllint test to no longer use the user\'s global config\, but only the project\'s config \([https\://github\.com/ansible\-community/antsibull\-nox/pull/72](https\://github\.com/ansible\-community/antsibull\-nox/pull/72)\)\.
54
+
3
55
  <a id="v0-3-0"></a>
4
56
  ## v0\.3\.0
5
57
 
6
- <a id="release-summary"></a>
58
+ <a id="release-summary-1"></a>
7
59
  ### Release Summary
8
60
 
9
61
  Feature release that is stabilizing the API\.
@@ -11,7 +63,7 @@ Feature release that is stabilizing the API\.
11
63
  All noxfiles and configs using this version should still work with antsibull\-nox 1\.0\.0\,
12
64
  unless a critical problem is found that cannot be solved in any other way\.
13
65
 
14
- <a id="minor-changes"></a>
66
+ <a id="minor-changes-1"></a>
15
67
  ### Minor Changes
16
68
 
17
69
  * Add <code>antsibull\-nox init</code> command that creates a <code>noxfile\.py</code> and <code>antsibull\-nox\.tomll</code> to get started \([https\://github\.com/ansible\-community/antsibull\-nox/pull/58](https\://github\.com/ansible\-community/antsibull\-nox/pull/58)\)\.
@@ -30,7 +82,7 @@ unless a critical problem is found that cannot be solved in any other way\.
30
82
 
31
83
  * Removed all deprecated functions from <code>antsibull\_nox\.\*\*</code> that generate sessions\. The only functions left that are public API are <code>antsibull\_nox\.load\_antsibull\_nox\_toml\(\)</code>\, <code>antsibull\_nox\.add\_ansible\_test\_session\(\)</code>\, and <code>antsibull\_nox\.sessions\.prepare\_collections\(\)</code> \([https\://github\.com/ansible\-community/antsibull\-nox/pull/54](https\://github\.com/ansible\-community/antsibull\-nox/pull/54)\)\.
32
84
 
33
- <a id="bugfixes"></a>
85
+ <a id="bugfixes-1"></a>
34
86
  ### Bugfixes
35
87
 
36
88
  * Action groups extra test no longer fails if <code>action\_groups</code> does not exist in <code>meta/runtime\.yml</code>\. It can now be used to ensure that there is no action group present in <code>meta/runtime\.yml</code> \([https\://github\.com/ansible\-community/antsibull\-nox/pull/60](https\://github\.com/ansible\-community/antsibull\-nox/pull/60)\)\.
@@ -41,17 +93,17 @@ unless a critical problem is found that cannot be solved in any other way\.
41
93
  <a id="v0-2-0"></a>
42
94
  ## v0\.2\.0
43
95
 
44
- <a id="release-summary-1"></a>
96
+ <a id="release-summary-2"></a>
45
97
  ### Release Summary
46
98
 
47
99
  Major extension and overhaul with many breaking changes\. The next minor release is expected to bring more stabilization\.
48
100
 
49
- <a id="major-changes"></a>
101
+ <a id="major-changes-1"></a>
50
102
  ### Major Changes
51
103
 
52
104
  * There is now a new function <code>antsibull\_nox\.load\_antsibull\_nox\_toml\(\)</code> which loads <code>antsibull\-nox\.toml</code> and creates configuration and sessions from it\. Calling other functionality from <code>antsibull\_nox</code> in <code>noxfile\.py</code> is only necessary for creating own specialized sessions\, or ansible\-test sessions that cannot be created with the <code>antsibull\_nox\.add\_all\_ansible\_test\_\*\_test\_sessions\*\(\)</code> type functions \([https\://github\.com/ansible\-community/antsibull\-nox/pull/50](https\://github\.com/ansible\-community/antsibull\-nox/pull/50)\, [https\://github\.com/ansible\-community/antsibull\-nox/issues/34](https\://github\.com/ansible\-community/antsibull\-nox/issues/34)\)\.
53
105
 
54
- <a id="minor-changes-1"></a>
106
+ <a id="minor-changes-2"></a>
55
107
  ### Minor Changes
56
108
 
57
109
  * Add descriptions to generated sessions that are shown when running <code>nox \-\-list</code> \([https\://github\.com/ansible\-community/antsibull\-nox/pull/31](https\://github\.com/ansible\-community/antsibull\-nox/pull/31)\)\.
@@ -77,12 +129,12 @@ Major extension and overhaul with many breaking changes\. The next minor release
77
129
  <a id="v0-1-0"></a>
78
130
  ## v0\.1\.0
79
131
 
80
- <a id="release-summary-2"></a>
132
+ <a id="release-summary-3"></a>
81
133
  ### Release Summary
82
134
 
83
135
  Feature release\.
84
136
 
85
- <a id="minor-changes-2"></a>
137
+ <a id="minor-changes-3"></a>
86
138
  ### Minor Changes
87
139
 
88
140
  * A <code>build\-import\-check</code> session that builds and tries to import the collection with Galaxy Importer can be added with <code>add\_build\_import\_check\(\)</code> \([https\://github\.com/ansible\-community/antsibull\-nox/issues/15](https\://github\.com/ansible\-community/antsibull\-nox/issues/15)\, [https\://github\.com/ansible\-community/antsibull\-nox/pull/17](https\://github\.com/ansible\-community/antsibull\-nox/pull/17)\)\.
@@ -101,7 +153,7 @@ Feature release\.
101
153
 
102
154
  * The nox workflow now by default runs all sessions\, unless restricted with the <code>sessions</code> parameter \([https\://github\.com/ansible\-community/antsibull\-nox/pull/14](https\://github\.com/ansible\-community/antsibull\-nox/pull/14)\)\.
103
155
 
104
- <a id="bugfixes-1"></a>
156
+ <a id="bugfixes-2"></a>
105
157
  ### Bugfixes
106
158
 
107
159
  * Make sure that black in CI checks formatting instead of just reformatting \([https\://github\.com/ansible\-community/antsibull\-nox/pull/14](https\://github\.com/ansible\-community/antsibull\-nox/pull/14)\)\.
@@ -109,7 +161,7 @@ Feature release\.
109
161
  <a id="v0-0-1"></a>
110
162
  ## v0\.0\.1
111
163
 
112
- <a id="release-summary-3"></a>
164
+ <a id="release-summary-4"></a>
113
165
  ### Release Summary
114
166
 
115
167
  Initial alpha release\.
@@ -4,6 +4,33 @@ Antsibull Nox Helper Release Notes
4
4
 
5
5
  .. contents:: Topics
6
6
 
7
+ v0.4.0
8
+ ======
9
+
10
+ Release Summary
11
+ ---------------
12
+
13
+ Feature and bugfix release.
14
+
15
+ Major Changes
16
+ -------------
17
+
18
+ - Required collections can now be installed from different sources per depending on the ansible-core version (https://github.com/ansible-community/antsibull-nox/pull/76).
19
+
20
+ Minor Changes
21
+ -------------
22
+
23
+ - Capture mypy and pylint errors to report paths of files relative to collection's root, instead of relative to the virtual ``ansible_collections`` directory (https://github.com/ansible-community/antsibull-nox/pull/75).
24
+ - Make yamllint plugin check also check doc fragments (https://github.com/ansible-community/antsibull-nox/pull/73).
25
+ - Positional arguments passed to nox are now forwarded to ``ansible-lint`` (https://github.com/ansible-community/antsibull-nox/pull/74).
26
+ - The yamllint session now ignores ``RETURN`` documentation with values ``#`` and `` # `` (https://github.com/ansible-community/antsibull-nox/pull/71).
27
+ - The yamllint test no longer shows all filenames in the command line (https://github.com/ansible-community/antsibull-nox/pull/72).
28
+
29
+ Bugfixes
30
+ --------
31
+
32
+ - Adjust yamllint test to no longer use the user's global config, but only the project's config (https://github.com/ansible-community/antsibull-nox/pull/72).
33
+
7
34
  v0.3.0
8
35
  ======
9
36
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: antsibull-nox
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: Changelog tool for Ansible-core and Ansible collections
5
5
  Project-URL: Documentation, https://ansible.readthedocs.io/projects/antsibull-nox/
6
6
  Project-URL: Source code, https://github.com/ansible-community/antsibull-nox/
@@ -176,3 +176,31 @@ releases:
176
176
  - 65-fix.yml
177
177
  - 67-galaxy-importer.yml
178
178
  release_date: '2025-04-21'
179
+ 0.4.0:
180
+ changes:
181
+ bugfixes:
182
+ - Adjust yamllint test to no longer use the user's global config, but only
183
+ the project's config (https://github.com/ansible-community/antsibull-nox/pull/72).
184
+ major_changes:
185
+ - Required collections can now be installed from different sources per depending
186
+ on the ansible-core version (https://github.com/ansible-community/antsibull-nox/pull/76).
187
+ minor_changes:
188
+ - Capture mypy and pylint errors to report paths of files relative to collection's
189
+ root, instead of relative to the virtual ``ansible_collections`` directory
190
+ (https://github.com/ansible-community/antsibull-nox/pull/75).
191
+ - Make yamllint plugin check also check doc fragments (https://github.com/ansible-community/antsibull-nox/pull/73).
192
+ - Positional arguments passed to nox are now forwarded to ``ansible-lint``
193
+ (https://github.com/ansible-community/antsibull-nox/pull/74).
194
+ - 'The yamllint session now ignores ``RETURN`` documentation with values ``#``
195
+ and `` # `` (https://github.com/ansible-community/antsibull-nox/pull/71).'
196
+ - The yamllint test no longer shows all filenames in the command line (https://github.com/ansible-community/antsibull-nox/pull/72).
197
+ release_summary: Feature and bugfix release.
198
+ fragments:
199
+ - 0.4.0.yml
200
+ - 71-yamllint-return.yml
201
+ - 72-yamllint-config.yml
202
+ - 73-yamllint-doc-fragments.yml
203
+ - 74-ansible-lint-args.yml
204
+ - 75-mypy-pylint-errors.yml
205
+ - 76-collection-per-ansible-core-version.yml
206
+ release_date: '2025-05-06'
@@ -1,29 +1,36 @@
1
1
  # Antsibull Nox Helper Release Notes
2
2
 
3
- **Topics**
4
-
5
- - <a href="#v0-3-0">v0\.3\.0</a>
6
- - <a href="#release-summary">Release Summary</a>
7
- - <a href="#minor-changes">Minor Changes</a>
8
- - <a href="#removed-features-previously-deprecated">Removed Features \(previously deprecated\)</a>
9
- - <a href="#bugfixes">Bugfixes</a>
10
- - <a href="#v0-2-0">v0\.2\.0</a>
11
- - <a href="#release-summary-1">Release Summary</a>
12
- - <a href="#major-changes">Major Changes</a>
13
- - <a href="#minor-changes-1">Minor Changes</a>
14
- - <a href="#deprecated-features">Deprecated Features</a>
15
- - <a href="#v0-1-0">v0\.1\.0</a>
16
- - <a href="#release-summary-2">Release Summary</a>
17
- - <a href="#minor-changes-2">Minor Changes</a>
18
- - <a href="#breaking-changes--porting-guide">Breaking Changes / Porting Guide</a>
19
- - <a href="#bugfixes-1">Bugfixes</a>
20
- - <a href="#v0-0-1">v0\.0\.1</a>
21
- - <a href="#release-summary-3">Release Summary</a>
3
+ <a id="v0-4-0"></a>
4
+ ## v0\.4\.0
5
+
6
+ <a id="release-summary"></a>
7
+ ### Release Summary
8
+
9
+ Feature and bugfix release\.
10
+
11
+ <a id="major-changes"></a>
12
+ ### Major Changes
13
+
14
+ * Required collections can now be installed from different sources per depending on the ansible\-core version \([https\://github\.com/ansible\-community/antsibull\-nox/pull/76](https\://github\.com/ansible\-community/antsibull\-nox/pull/76)\)\.
15
+
16
+ <a id="minor-changes"></a>
17
+ ### Minor Changes
18
+
19
+ * Capture mypy and pylint errors to report paths of files relative to collection\'s root\, instead of relative to the virtual <code>ansible\_collections</code> directory \([https\://github\.com/ansible\-community/antsibull\-nox/pull/75](https\://github\.com/ansible\-community/antsibull\-nox/pull/75)\)\.
20
+ * Make yamllint plugin check also check doc fragments \([https\://github\.com/ansible\-community/antsibull\-nox/pull/73](https\://github\.com/ansible\-community/antsibull\-nox/pull/73)\)\.
21
+ * Positional arguments passed to nox are now forwarded to <code>ansible\-lint</code> \([https\://github\.com/ansible\-community/antsibull\-nox/pull/74](https\://github\.com/ansible\-community/antsibull\-nox/pull/74)\)\.
22
+ * The yamllint session now ignores <code>RETURN</code> documentation with values <code>\#</code> and \`\` \# \`\` \([https\://github\.com/ansible\-community/antsibull\-nox/pull/71](https\://github\.com/ansible\-community/antsibull\-nox/pull/71)\)\.
23
+ * The yamllint test no longer shows all filenames in the command line \([https\://github\.com/ansible\-community/antsibull\-nox/pull/72](https\://github\.com/ansible\-community/antsibull\-nox/pull/72)\)\.
24
+
25
+ <a id="bugfixes"></a>
26
+ ### Bugfixes
27
+
28
+ * Adjust yamllint test to no longer use the user\'s global config\, but only the project\'s config \([https\://github\.com/ansible\-community/antsibull\-nox/pull/72](https\://github\.com/ansible\-community/antsibull\-nox/pull/72)\)\.
22
29
 
23
30
  <a id="v0-3-0"></a>
24
31
  ## v0\.3\.0
25
32
 
26
- <a id="release-summary"></a>
33
+ <a id="release-summary-1"></a>
27
34
  ### Release Summary
28
35
 
29
36
  Feature release that is stabilizing the API\.
@@ -31,7 +38,7 @@ Feature release that is stabilizing the API\.
31
38
  All noxfiles and configs using this version should still work with antsibull\-nox 1\.0\.0\,
32
39
  unless a critical problem is found that cannot be solved in any other way\.
33
40
 
34
- <a id="minor-changes"></a>
41
+ <a id="minor-changes-1"></a>
35
42
  ### Minor Changes
36
43
 
37
44
  * Add <code>antsibull\-nox init</code> command that creates a <code>noxfile\.py</code> and <code>antsibull\-nox\.tomll</code> to get started \([https\://github\.com/ansible\-community/antsibull\-nox/pull/58](https\://github\.com/ansible\-community/antsibull\-nox/pull/58)\)\.
@@ -50,7 +57,7 @@ unless a critical problem is found that cannot be solved in any other way\.
50
57
 
51
58
  * Removed all deprecated functions from <code>antsibull\_nox\.\*\*</code> that generate sessions\. The only functions left that are public API are <code>antsibull\_nox\.load\_antsibull\_nox\_toml\(\)</code>\, <code>antsibull\_nox\.add\_ansible\_test\_session\(\)</code>\, and <code>antsibull\_nox\.sessions\.prepare\_collections\(\)</code> \([https\://github\.com/ansible\-community/antsibull\-nox/pull/54](https\://github\.com/ansible\-community/antsibull\-nox/pull/54)\)\.
52
59
 
53
- <a id="bugfixes"></a>
60
+ <a id="bugfixes-1"></a>
54
61
  ### Bugfixes
55
62
 
56
63
  * Action groups extra test no longer fails if <code>action\_groups</code> does not exist in <code>meta/runtime\.yml</code>\. It can now be used to ensure that there is no action group present in <code>meta/runtime\.yml</code> \([https\://github\.com/ansible\-community/antsibull\-nox/pull/60](https\://github\.com/ansible\-community/antsibull\-nox/pull/60)\)\.
@@ -61,17 +68,17 @@ unless a critical problem is found that cannot be solved in any other way\.
61
68
  <a id="v0-2-0"></a>
62
69
  ## v0\.2\.0
63
70
 
64
- <a id="release-summary-1"></a>
71
+ <a id="release-summary-2"></a>
65
72
  ### Release Summary
66
73
 
67
74
  Major extension and overhaul with many breaking changes\. The next minor release is expected to bring more stabilization\.
68
75
 
69
- <a id="major-changes"></a>
76
+ <a id="major-changes-1"></a>
70
77
  ### Major Changes
71
78
 
72
79
  * There is now a new function <code>antsibull\_nox\.load\_antsibull\_nox\_toml\(\)</code> which loads <code>antsibull\-nox\.toml</code> and creates configuration and sessions from it\. Calling other functionality from <code>antsibull\_nox</code> in <code>noxfile\.py</code> is only necessary for creating own specialized sessions\, or ansible\-test sessions that cannot be created with the <code>antsibull\_nox\.add\_all\_ansible\_test\_\*\_test\_sessions\*\(\)</code> type functions \([https\://github\.com/ansible\-community/antsibull\-nox/pull/50](https\://github\.com/ansible\-community/antsibull\-nox/pull/50)\, [https\://github\.com/ansible\-community/antsibull\-nox/issues/34](https\://github\.com/ansible\-community/antsibull\-nox/issues/34)\)\.
73
80
 
74
- <a id="minor-changes-1"></a>
81
+ <a id="minor-changes-2"></a>
75
82
  ### Minor Changes
76
83
 
77
84
  * Add descriptions to generated sessions that are shown when running <code>nox \-\-list</code> \([https\://github\.com/ansible\-community/antsibull\-nox/pull/31](https\://github\.com/ansible\-community/antsibull\-nox/pull/31)\)\.
@@ -97,12 +104,12 @@ Major extension and overhaul with many breaking changes\. The next minor release
97
104
  <a id="v0-1-0"></a>
98
105
  ## v0\.1\.0
99
106
 
100
- <a id="release-summary-2"></a>
107
+ <a id="release-summary-3"></a>
101
108
  ### Release Summary
102
109
 
103
110
  Feature release\.
104
111
 
105
- <a id="minor-changes-2"></a>
112
+ <a id="minor-changes-3"></a>
106
113
  ### Minor Changes
107
114
 
108
115
  * A <code>build\-import\-check</code> session that builds and tries to import the collection with Galaxy Importer can be added with <code>add\_build\_import\_check\(\)</code> \([https\://github\.com/ansible\-community/antsibull\-nox/issues/15](https\://github\.com/ansible\-community/antsibull\-nox/issues/15)\, [https\://github\.com/ansible\-community/antsibull\-nox/pull/17](https\://github\.com/ansible\-community/antsibull\-nox/pull/17)\)\.
@@ -121,7 +128,7 @@ Feature release\.
121
128
 
122
129
  * The nox workflow now by default runs all sessions\, unless restricted with the <code>sessions</code> parameter \([https\://github\.com/ansible\-community/antsibull\-nox/pull/14](https\://github\.com/ansible\-community/antsibull\-nox/pull/14)\)\.
123
130
 
124
- <a id="bugfixes-1"></a>
131
+ <a id="bugfixes-2"></a>
125
132
  ### Bugfixes
126
133
 
127
134
  * Make sure that black in CI checks formatting instead of just reformatting \([https\://github\.com/ansible\-community/antsibull\-nox/pull/14](https\://github\.com/ansible\-community/antsibull\-nox/pull/14)\)\.
@@ -129,7 +136,7 @@ Feature release\.
129
136
  <a id="v0-0-1"></a>
130
137
  ## v0\.0\.1
131
138
 
132
- <a id="release-summary-3"></a>
139
+ <a id="release-summary-4"></a>
133
140
  ### Release Summary
134
141
 
135
142
  Initial alpha release\.
@@ -19,10 +19,22 @@ A basic `antsibull-nox.toml` looks as follows:
19
19
 
20
20
  [collection_sources]
21
21
  # This section tells antsibull-nox how to install collections.
22
- # We want to install community.internal_test_tools and community.general
22
+ # We want to install community.internal_test_tools, community.general, and community.crypto
23
23
  # from Git and not from Galaxy.
24
24
  "community.internal_test_tools" = "git+https://github.com/ansible-collections/community.internal_test_tools.git,main"
25
25
  "community.general" = "git+https://github.com/ansible-collections/community.general.git,main"
26
+ "community.crypto" = "git+https://github.com/ansible-collections/community.crypto.git,main"
27
+
28
+ [collection_sources_per_ansible.'2.16']
29
+ # This section tells antsibull-nox how to install collections for ansible-core 2.16.
30
+ # (Note that we have to quote the ansible-core version in the section name!)
31
+ #
32
+ # If a collection is not mentioned here, the above generic section will be used.
33
+ # (And if it cannot be found there, antsibull-nox will simply get it from ansible-galaxy's default source.)
34
+ #
35
+ # We want to install community.crypto from its stable-2 branch from Git
36
+ # (the main branch only works with ansible-core 2.17+).
37
+ "community.crypto" = "git+https://github.com/ansible-collections/community.crypto.git,stable-2"
26
38
 
27
39
  [sessions]
28
40
  # The sub-sections of 'sessions' configure sessions to add.
@@ -88,6 +100,42 @@ The section `[collection_sources]` allows to configure this:
88
100
  The syntax used is explained in [the Ansible documentation on installation of collections from Git repositories](https://docs.ansible.com/ansible-core/devel/collections_guide/collections_installing.html#installing-a-collection-from-a-git-repository-at-the-command-line)
89
101
  and [the Ansible documentation on installation of older versions of a collection](https://docs.ansible.com/ansible-core/devel/collections_guide/collections_installing.html#installing-an-older-version-of-a-collection).
90
102
 
103
+ ### Specific collection sources per ansible-core version
104
+
105
+ Sometimes it is necessary to use different sources for different ansible-core versions.
106
+
107
+ For example, your collection might support ansible-core 2.16+.
108
+ For testing, you need a collection that you want to install from Git.
109
+ Unfortunately, the `main` branch only works with ansible-core 2.17+,
110
+ so you need to use another branch for ansible-core 2.16.
111
+
112
+ In the following example, community.crypto is such a collection.
113
+ Its `main` branch needs ansible-core 2.17+,
114
+ but its `stable-2` branch also supports ansible-core 2.16 and before.
115
+
116
+ You can tell antsibull-nox to use the `stable-2` branch with ansible-core 2.16
117
+ by adding a `[collection_sources_per_ansible.'2.16']` section (note the quotes!).
118
+ ```toml
119
+ [collection_sources]
120
+ # This section tells antsibull-nox how to install collections.
121
+ # We want to install community.internal_test_tools, community.general, and community.crypto
122
+ # from Git and not from Galaxy.
123
+ "community.internal_test_tools" = "git+https://github.com/ansible-collections/community.internal_test_tools.git,main"
124
+ "community.general" = "git+https://github.com/ansible-collections/community.general.git,main"
125
+ "community.crypto" = "git+https://github.com/ansible-collections/community.crypto.git,main"
126
+
127
+ [collection_sources_per_ansible.'2.16']
128
+ # This section tells antsibull-nox how to install collections for ansible-core 2.16.
129
+ # (Note that we have to quote the ansible-core version in the section name!)
130
+ #
131
+ # If a collection is not mentioned here, the above generic section will be used.
132
+ # (And if it cannot be found there, antsibull-nox will simply get it from ansible-galaxy's default source.)
133
+ #
134
+ # We want to install community.crypto from its stable-2 branch from Git
135
+ # (the main branch only works with ansible-core 2.17+).
136
+ "community.crypto" = "git+https://github.com/ansible-collections/community.crypto.git,stable-2"
137
+ ```
138
+
91
139
  ## Basic linting sessions
92
140
 
93
141
  The basic linting session, `lint`, comes with three sessions it depends on:
@@ -384,9 +432,9 @@ It accepts the following options:
384
432
  * `run_license_check: bool` (default `true`):
385
433
  Whether a custom check script should be run that validates the following conditions:
386
434
 
387
- 1. All Python code in `plugins/` except module utils, modules, and docs fragments must be `GPL-3.0-or-later` licensed.
435
+ 1. All Python code in `plugins/` except module utils, modules, and docs fragments must be `GPL-3.0-or-later` licensed.
388
436
 
389
- 2. Every non-empty file has an allowed license. (This is similar to what `reuse lint` checks.)
437
+ 2. Every non-empty file has an allowed license. (This is similar to what `reuse lint` checks.)
390
438
 
391
439
  * `license_check_extra_ignore_paths: list[str]` (default `[]`):
392
440
  Allows to specify more paths that are ignored.
@@ -113,6 +113,7 @@ module = [
113
113
  "pytest",
114
114
  "semantic_version",
115
115
  "yamllint",
116
+ "yamllint.cli",
116
117
  "yamllint.config",
117
118
  "yamllint.linter",
118
119
  ]
@@ -17,7 +17,7 @@ from .config import (
17
17
  from .interpret_config import interpret_config
18
18
  from .sessions.ansible_test import add_ansible_test_session
19
19
 
20
- __version__ = "0.3.0"
20
+ __version__ = "0.4.0"
21
21
 
22
22
 
23
23
  def load_antsibull_nox_toml() -> None:
@@ -253,8 +253,23 @@ def get_supported_core_versions(
253
253
  return result
254
254
 
255
255
 
256
+ def parse_ansible_core_version(
257
+ version: str | AnsibleCoreVersion,
258
+ ) -> AnsibleCoreVersion:
259
+ """
260
+ Coerce a string or a AnsibleCoreVersion to a AnsibleCoreVersion.
261
+ """
262
+ if version in ("devel", "milestone"):
263
+ # For some reason mypy doesn't notice that
264
+ return t.cast(AnsibleCoreVersion, version)
265
+ if isinstance(version, Version):
266
+ return version
267
+ return Version.parse(version)
268
+
269
+
256
270
  __all__ = [
257
271
  "AnsibleCoreInfo",
258
272
  "get_ansible_core_info",
259
273
  "get_ansible_core_package_name",
274
+ "parse_ansible_core_version",
260
275
  ]
@@ -10,6 +10,8 @@ Data types for collections.
10
10
 
11
11
  from __future__ import annotations
12
12
 
13
+ import base64
14
+ import hashlib
13
15
  from dataclasses import dataclass
14
16
  from pathlib import Path
15
17
 
@@ -98,6 +100,16 @@ class CollectionSource:
98
100
  )
99
101
  return source
100
102
 
103
+ def identifier(self) -> str:
104
+ """
105
+ Compute a source identifier.
106
+ """
107
+ hasher = hashlib.sha256()
108
+ hasher.update(self.name.encode("utf-8"))
109
+ hasher.update(b"::")
110
+ hasher.update(self.source.encode("utf-8"))
111
+ return base64.b32encode(hasher.digest())[:16].decode("ascii")
112
+
101
113
 
102
114
  __all__ = [
103
115
  "CollectionData",