continuous-delivery-scripts 4.4.4__tar.gz → 4.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/LICENSE +27 -0
- {continuous_delivery_scripts-4.4.4/continuous_delivery_scripts.egg-info → continuous_delivery_scripts-4.6.0}/PKG-INFO +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/_version.py +4 -4
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/check_licence_compliance.py +6 -0
- continuous_delivery_scripts-4.6.0/continuous_delivery_scripts/describe_licence_obligations.py +34 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/generate_docs.py +93 -36
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/GOLAND.MD +27 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/golang.py +85 -6
- continuous_delivery_scripts-4.6.0/continuous_delivery_scripts/spdx_report/project_licensing.py +469 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/spdx_helpers.py +1 -2
- continuous_delivery_scripts-4.6.0/continuous_delivery_scripts/spdx_report/templates/licence_obligations_report.txt.jinja2 +24 -0
- continuous_delivery_scripts-4.6.0/continuous_delivery_scripts/sync_project_licence.py +41 -0
- continuous_delivery_scripts-4.6.0/continuous_delivery_scripts/templates/documentation_landing.html.jinja2 +7 -0
- continuous_delivery_scripts-4.6.0/continuous_delivery_scripts/templates/documentation_page.html.jinja2 +19 -0
- continuous_delivery_scripts-4.6.0/continuous_delivery_scripts/templates/llms-full.txt.jinja2 +15 -0
- continuous_delivery_scripts-4.6.0/continuous_delivery_scripts/templates/llms.txt.jinja2 +13 -0
- continuous_delivery_scripts-4.6.0/continuous_delivery_scripts/templates/robots.txt.jinja2 +3 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/configuration.py +5 -0
- continuous_delivery_scripts-4.6.0/continuous_delivery_scripts/utils/documentation_discovery.py +218 -0
- continuous_delivery_scripts-4.6.0/continuous_delivery_scripts/utils/documentation_templates.py +18 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/git_helpers.py +21 -20
- continuous_delivery_scripts-4.6.0/continuous_delivery_scripts/utils/github_helpers.py +75 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/third_party_licences.py +6 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0/continuous_delivery_scripts.egg-info}/PKG-INFO +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts.egg-info/SOURCES.txt +12 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts.egg-info/entry_points.txt +2 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/pyproject.toml +1 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/setup.py +6 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/GitPython.spdx +5 -5
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/Jinja2.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/Mako.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/Markdown.spdx +4 -4
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/MarkupSafe.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/PyYAML.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/Pygments.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/SecretStorage.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/beartype.spdx +4 -4
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/boolean.py.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/boto3.spdx +4 -4
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/botocore.spdx +4 -4
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/bracex.spdx +4 -4
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/certifi.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/cffi.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/charset-normalizer.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/click.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/continuous-delivery-scripts.spdx +198 -90
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/cryptography.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/detect-secrets.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/docutils.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/gibberish-detector.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/gitdb.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/id.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/idna.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/jaraco.classes.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/jaraco.context.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/jaraco.functools.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/jeepney.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/jellyfish.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/jmespath.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/keyring.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/license-expression.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/licenseheaders.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/markdown-it-py.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/mdurl.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/more-itertools.spdx +4 -4
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/nh3.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/packaging.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/pdoc3.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/ply.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/pyautoversion.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/pycparser.spdx +4 -4
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/pyparsing.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/python-dateutil.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/python-dotenv.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/rdflib.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/readme_renderer.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/regex.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/requests-toolbelt.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/requests.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/rfc3986.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/rich.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/s3transfer.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/semantic-version.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/semver.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/setuptools.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/six.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/smmap.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/spdx-tools.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/toml.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/towncrier.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/twine.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/uritools.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/urllib3.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/wcmatch.spdx +4 -4
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/spdx-tmp/xmltodict.spdx +1 -1
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/MANIFEST.in +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/README.md +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/assert_news.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/create_news_file.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/detect_secrets.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/generate_news.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/get_config.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/get_version.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/language_specifics.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/license_files.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/BASIC.MD +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/CI.MD +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/GITHUB_ACTIONS.MD +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/NOOP.MD +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/PYTHON.MD +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/basic.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/ci.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/docker.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/github_actions.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/noop.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/plugins/python.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/report_third_party_ip.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/data/licence_assessment.toml +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/licence_assessment.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/scancode_licence_db.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/spdx_dependency.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/spdx_document.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/spdx_file.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/spdx_package.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/spdx_project.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/spdx_summary.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/templates/third_party_IP_report.csv.jinja2 +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/templates/third_party_IP_report.html.jinja2 +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/spdx_report/templates/third_party_IP_report.txt.jinja2 +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/tag_and_release.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/update_secrets_registry.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/aws_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/changelog.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/definitions.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/filesystem_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/hash_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/language_specifics_base.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/logging.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/news_file.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/noop/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/noop/package_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/package_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/python/__init__.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/python/package_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/python/python_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/string_helpers.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts/utils/versioning.py +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts.egg-info/dependency_links.txt +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts.egg-info/requires.txt +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/continuous_delivery_scripts.egg-info/top_level.txt +0 -0
- {continuous_delivery_scripts-4.4.4 → continuous_delivery_scripts-4.6.0}/setup.cfg +0 -0
|
@@ -172,3 +172,30 @@
|
|
|
172
172
|
defend, and hold each Contributor harmless for any liability
|
|
173
173
|
incurred by, or claims asserted against, such Contributor by reason
|
|
174
174
|
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -11,8 +11,8 @@ References
|
|
|
11
11
|
This file is autogenerated, do not modify by hand.
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
|
-
__version__ = "4.
|
|
15
|
-
COMMIT = "
|
|
14
|
+
__version__ = "4.6.0"
|
|
15
|
+
COMMIT = "307ede6cfe5aa47c08855bd156d2496109cecdb6"
|
|
16
16
|
MAJOR = 4
|
|
17
|
-
MINOR =
|
|
18
|
-
PATCH =
|
|
17
|
+
MINOR = 6
|
|
18
|
+
PATCH = 0
|
|
@@ -12,6 +12,10 @@ from typing import TYPE_CHECKING
|
|
|
12
12
|
|
|
13
13
|
from continuous_delivery_scripts.language_specifics import get_language_specifics
|
|
14
14
|
from continuous_delivery_scripts.spdx_report.licence_assessment import LicenceAssessment
|
|
15
|
+
from continuous_delivery_scripts.spdx_report.project_licensing import (
|
|
16
|
+
ensure_project_licence_file_conforms,
|
|
17
|
+
has_single_project_licence_identifier,
|
|
18
|
+
)
|
|
15
19
|
from continuous_delivery_scripts.spdx_report.spdx_summary import _configured_licence_policy
|
|
16
20
|
from continuous_delivery_scripts.utils.configuration import configuration, ConfigurationVariable
|
|
17
21
|
from continuous_delivery_scripts.utils.logging import log_exception, set_log_level
|
|
@@ -100,6 +104,8 @@ def main() -> int:
|
|
|
100
104
|
set_log_level(args.verbose)
|
|
101
105
|
|
|
102
106
|
try:
|
|
107
|
+
if has_single_project_licence_identifier():
|
|
108
|
+
ensure_project_licence_file_conforms(create_if_missing=False)
|
|
103
109
|
plugin = get_language_specifics()
|
|
104
110
|
if not plugin.can_get_project_metadata():
|
|
105
111
|
raise ValueError("The selected language plugin cannot provide metadata for licence compliance checks.")
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved.
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
#
|
|
5
|
+
"""Describe project licence obligations from public SPDX and OSADL sources."""
|
|
6
|
+
|
|
7
|
+
import argparse
|
|
8
|
+
import logging
|
|
9
|
+
import sys
|
|
10
|
+
|
|
11
|
+
from continuous_delivery_scripts.spdx_report.project_licensing import (
|
|
12
|
+
describe_licence_obligations,
|
|
13
|
+
)
|
|
14
|
+
from continuous_delivery_scripts.utils.logging import log_exception, set_log_level
|
|
15
|
+
|
|
16
|
+
logger = logging.getLogger(__name__)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def main() -> int:
|
|
20
|
+
"""Create a CLI for describing project licence obligations."""
|
|
21
|
+
parser = argparse.ArgumentParser(description="Describe licence obligations from SPDX and OSADL data.")
|
|
22
|
+
parser.add_argument("-v", "--verbose", action="count", default=0, help="Increase logging verbosity.")
|
|
23
|
+
args = parser.parse_args()
|
|
24
|
+
set_log_level(args.verbose)
|
|
25
|
+
try:
|
|
26
|
+
print(describe_licence_obligations(), end="")
|
|
27
|
+
return 0
|
|
28
|
+
except Exception as error:
|
|
29
|
+
log_exception(logger, error)
|
|
30
|
+
return 1
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
if __name__ == "__main__":
|
|
34
|
+
sys.exit(main())
|
|
@@ -17,6 +17,12 @@ import markdown
|
|
|
17
17
|
|
|
18
18
|
from continuous_delivery_scripts.language_specifics import get_language_specifics
|
|
19
19
|
from continuous_delivery_scripts.utils.configuration import configuration, ConfigurationVariable
|
|
20
|
+
from continuous_delivery_scripts.utils.documentation_discovery import (
|
|
21
|
+
documentation_site_url,
|
|
22
|
+
publish_discovery_files,
|
|
23
|
+
structured_data_script,
|
|
24
|
+
)
|
|
25
|
+
from continuous_delivery_scripts.utils.documentation_templates import documentation_templates
|
|
20
26
|
from continuous_delivery_scripts.utils.logging import log_exception
|
|
21
27
|
|
|
22
28
|
logger = logging.getLogger(__name__)
|
|
@@ -27,23 +33,32 @@ def _html_guide_link(match: re.Match[str]) -> str:
|
|
|
27
33
|
return f'href="{match.group(1)}.html{match.group(2) or ""}"'
|
|
28
34
|
|
|
29
35
|
|
|
30
|
-
def _html_page(
|
|
36
|
+
def _html_page(
|
|
37
|
+
title: str,
|
|
38
|
+
description: str,
|
|
39
|
+
body: str,
|
|
40
|
+
nav_prefix: str = "..",
|
|
41
|
+
has_api_index: bool = True,
|
|
42
|
+
page_url: str | None = None,
|
|
43
|
+
schema_type: str = "TechArticle",
|
|
44
|
+
) -> str:
|
|
31
45
|
"""Wrap a task guide in a standalone, readable HTML page."""
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
return str(
|
|
47
|
+
documentation_templates()
|
|
48
|
+
.get_template("documentation_page.html.jinja2")
|
|
49
|
+
.render(
|
|
50
|
+
title=title,
|
|
51
|
+
description=description,
|
|
52
|
+
body=body,
|
|
53
|
+
nav_prefix=nav_prefix,
|
|
54
|
+
has_api_index=has_api_index,
|
|
55
|
+
structured_data=structured_data_script(title, description, page_url, schema_type) if page_url else None,
|
|
56
|
+
)
|
|
42
57
|
)
|
|
43
58
|
|
|
44
59
|
|
|
45
|
-
def
|
|
46
|
-
"""
|
|
60
|
+
def _update_api_navigation(output_directory: Path, guide_output: Path) -> None:
|
|
61
|
+
"""Preserve API index links and provide a route back to task guides."""
|
|
47
62
|
original_index = output_directory / "index.html"
|
|
48
63
|
if not original_index.is_file():
|
|
49
64
|
return
|
|
@@ -62,6 +77,27 @@ def _preserve_api_navigation(output_directory: Path, guide_output: Path) -> None
|
|
|
62
77
|
|
|
63
78
|
contents = page.read_text(encoding="utf8")
|
|
64
79
|
updated = re.sub(r'href="((?:\.\./|\./)*index\.html(?:#[^"]*)?)"', retarget, contents)
|
|
80
|
+
guide_href = (
|
|
81
|
+
"../" * len(page.parent.relative_to(output_directory).parts)
|
|
82
|
+
+ (guide_output.relative_to(output_directory) / "index.html").as_posix()
|
|
83
|
+
)
|
|
84
|
+
guide_link = f'<a href="{escape(guide_href, quote=True)}">Task guides</a>'
|
|
85
|
+
if re.search(r"<nav\b[^>]*>", updated, flags=re.IGNORECASE):
|
|
86
|
+
updated = re.sub(
|
|
87
|
+
r"(<nav\b[^>]*>)",
|
|
88
|
+
lambda match: f"{match.group(1)}{guide_link} · ",
|
|
89
|
+
updated,
|
|
90
|
+
count=1,
|
|
91
|
+
flags=re.IGNORECASE,
|
|
92
|
+
)
|
|
93
|
+
else:
|
|
94
|
+
updated = re.sub(
|
|
95
|
+
r"(<body\b[^>]*>)",
|
|
96
|
+
lambda match: f"{match.group(1)}<nav>{guide_link}</nav>",
|
|
97
|
+
updated,
|
|
98
|
+
count=1,
|
|
99
|
+
flags=re.IGNORECASE,
|
|
100
|
+
)
|
|
65
101
|
if updated != contents:
|
|
66
102
|
page.write_text(updated, encoding="utf8")
|
|
67
103
|
|
|
@@ -90,55 +126,64 @@ def _guide_settings() -> tuple[Path, Path, Path, str] | None:
|
|
|
90
126
|
return project_root, guide_sources, guide_folder, project_name
|
|
91
127
|
|
|
92
128
|
|
|
93
|
-
def _render_guide(
|
|
129
|
+
def _render_guide(
|
|
130
|
+
source: Path, destination: Path, project_name: str, nav_prefix: str, has_api_index: bool, page_url: str | None
|
|
131
|
+
) -> str:
|
|
94
132
|
"""Render one Markdown guide to an HTML page and return its title."""
|
|
95
133
|
text = source.read_text(encoding="utf8")
|
|
96
134
|
title = next((line[2:].strip() for line in text.splitlines() if line.startswith("# ")), source.stem)
|
|
97
135
|
body: str = markdown.markdown(text, extensions=["fenced_code", "tables"])
|
|
98
136
|
body = re.sub(r'href="([a-z0-9-]+)\.md(#[^"]*)?"', _html_guide_link, body)
|
|
99
137
|
description = f"{title} — {project_name}."
|
|
100
|
-
destination.write_text(_html_page(title, description, body, nav_prefix, has_api_index), encoding="utf8")
|
|
138
|
+
destination.write_text(_html_page(title, description, body, nav_prefix, has_api_index, page_url), encoding="utf8")
|
|
101
139
|
return title
|
|
102
140
|
|
|
103
141
|
|
|
104
142
|
def _render_guides(
|
|
105
143
|
guide_sources: Path, guide_output: Path, guide_folder: Path, project_name: str, has_api_index: bool
|
|
106
|
-
) -> list[str]:
|
|
144
|
+
) -> list[tuple[str, str]]:
|
|
107
145
|
"""Render all guides and return links for the documentation landing page."""
|
|
108
146
|
guide_output.mkdir(parents=True, exist_ok=True)
|
|
109
147
|
navigation_prefix = "/".join(".." for _ in guide_folder.parts)
|
|
148
|
+
site_url = documentation_site_url()
|
|
110
149
|
links = []
|
|
111
150
|
for source in sorted(guide_sources.glob("*.md")):
|
|
151
|
+
page_url = f"{site_url}{guide_folder.as_posix()}/{source.stem}.html" if site_url else None
|
|
112
152
|
title = _render_guide(
|
|
113
|
-
source, guide_output / f"{source.stem}.html", project_name, navigation_prefix, has_api_index
|
|
153
|
+
source, guide_output / f"{source.stem}.html", project_name, navigation_prefix, has_api_index, page_url
|
|
114
154
|
)
|
|
115
155
|
if source.stem != "index":
|
|
116
|
-
links.append(
|
|
117
|
-
f'<li><a href="{escape(guide_folder.as_posix())}/{escape(source.stem)}.html">{escape(title)}</a></li>'
|
|
118
|
-
)
|
|
156
|
+
links.append((title, source.stem))
|
|
119
157
|
return links
|
|
120
158
|
|
|
121
159
|
|
|
122
160
|
def _write_guide_index(
|
|
123
|
-
output_directory: Path, project_name: str, guide_folder: Path, has_api_index: bool, links: list[str]
|
|
161
|
+
output_directory: Path, project_name: str, guide_folder: Path, has_api_index: bool, links: list[tuple[str, str]]
|
|
124
162
|
) -> None:
|
|
125
163
|
"""Write the project-specific landing page for the published guides."""
|
|
126
|
-
guide_prefix = guide_folder.as_posix()
|
|
127
164
|
licence = configuration.get_value_or_default(ConfigurationVariable.FILE_LICENCE_IDENTIFIER, None)
|
|
128
|
-
licence_details = f"<p>Project licence: {escape(str(licence))}</p>" if licence else ""
|
|
129
165
|
overview = (
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
166
|
+
documentation_templates()
|
|
167
|
+
.get_template("documentation_landing.html.jinja2")
|
|
168
|
+
.render(
|
|
169
|
+
project_name=project_name,
|
|
170
|
+
guide_folder=guide_folder.as_posix(),
|
|
171
|
+
licence=licence,
|
|
172
|
+
has_api_index=has_api_index,
|
|
173
|
+
links=links,
|
|
174
|
+
)
|
|
138
175
|
)
|
|
139
176
|
site_description = f"Task guides{' and API reference' if has_api_index else ''} for {project_name}."
|
|
140
177
|
(output_directory / "index.html").write_text(
|
|
141
|
-
_html_page(
|
|
178
|
+
_html_page(
|
|
179
|
+
f"{project_name} documentation",
|
|
180
|
+
site_description,
|
|
181
|
+
overview,
|
|
182
|
+
".",
|
|
183
|
+
has_api_index,
|
|
184
|
+
documentation_site_url(),
|
|
185
|
+
"WebSite",
|
|
186
|
+
),
|
|
142
187
|
encoding="utf8",
|
|
143
188
|
)
|
|
144
189
|
|
|
@@ -152,11 +197,8 @@ def _publish_project_guides(output_directory: Path) -> None:
|
|
|
152
197
|
guide_output = output_directory / guide_folder
|
|
153
198
|
has_api_index = (output_directory / "index.html").is_file()
|
|
154
199
|
links = _render_guides(guide_sources, guide_output, guide_folder, project_name, has_api_index)
|
|
155
|
-
|
|
200
|
+
_update_api_navigation(output_directory, guide_output)
|
|
156
201
|
_write_guide_index(output_directory, project_name, guide_folder, has_api_index, links)
|
|
157
|
-
agent_index = project_root / "llms.txt"
|
|
158
|
-
if agent_index.is_file():
|
|
159
|
-
shutil.copyfile(agent_index, output_directory / "llms.txt")
|
|
160
202
|
|
|
161
203
|
|
|
162
204
|
def _clear_previous_docs(output_directory: Path) -> None:
|
|
@@ -171,6 +213,21 @@ def generate_documentation(output_directory: Path, module_to_document: str) -> N
|
|
|
171
213
|
os.makedirs(str(output_directory), exist_ok=True)
|
|
172
214
|
get_language_specifics().generate_code_documentation(output_directory, module_to_document)
|
|
173
215
|
_publish_project_guides(output_directory)
|
|
216
|
+
root = configuration.get_value_or_default(ConfigurationVariable.PROJECT_ROOT, None)
|
|
217
|
+
if root:
|
|
218
|
+
settings = _guide_settings()
|
|
219
|
+
publish_discovery_files(
|
|
220
|
+
output_directory,
|
|
221
|
+
Path(root),
|
|
222
|
+
settings[1] if settings else None,
|
|
223
|
+
settings[2] if settings else None,
|
|
224
|
+
(
|
|
225
|
+
settings[3]
|
|
226
|
+
if settings
|
|
227
|
+
else str(configuration.get_value_or_default(ConfigurationVariable.PROJECT_NAME, Path(root).name))
|
|
228
|
+
),
|
|
229
|
+
module_to_document,
|
|
230
|
+
)
|
|
174
231
|
|
|
175
232
|
|
|
176
233
|
def generate_docs(output_directory: Path, module: str) -> int:
|
|
@@ -11,6 +11,33 @@ Therefore, a `.goreleaser.yml` file must be present in the go source directory i
|
|
|
11
11
|
## Documentation
|
|
12
12
|
The plugin uses [doc2go](https://abhinav.github.io/doc2go) to generate the code reference documentation.
|
|
13
13
|
|
|
14
|
+
Set `MODULE_TO_DOCUMENT` to the Go module or package you want documented.
|
|
15
|
+
CDS uses `go.mod` and `go.work` to find the module and select the working
|
|
16
|
+
directory and package pattern for [doc2go](https://abhinav.github.io/doc2go).
|
|
17
|
+
`SOURCE_DIR` locates the project's Go source; it does not choose the
|
|
18
|
+
documentation target. For example:
|
|
19
|
+
|
|
20
|
+
```toml
|
|
21
|
+
[ProjectConfig]
|
|
22
|
+
PROJECT_ROOT = "."
|
|
23
|
+
SOURCE_DIR = "generator"
|
|
24
|
+
PROGRAMMING_LANGUAGE = "Golang"
|
|
25
|
+
MODULE_TO_DOCUMENT = "generator"
|
|
26
|
+
DOCUMENTATION_DEFAULT_OUTPUT_PATH = "local_docs"
|
|
27
|
+
DOCUMENTATION_GUIDES_DIR = "guides"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`MODULE_TO_DOCUMENT = "generator"` documents that module and its packages;
|
|
31
|
+
`"cli"` selects the CLI module instead, even when `SOURCE_DIR` is `generator`.
|
|
32
|
+
For duplicate module names, use a project-relative path such as `"tools/cli"`.
|
|
33
|
+
To document all modules in the project workspace, use `"."`. A full module
|
|
34
|
+
import path also selects all its packages. To target a package directory, use
|
|
35
|
+
its name or project-relative path, such as `"config"` or `"generator/config"`;
|
|
36
|
+
a package import path or an explicit Go package pattern also works.
|
|
37
|
+
|
|
38
|
+
Run `cd-generate-docs` to build the API pages alongside optional task guides;
|
|
39
|
+
see [the documentation guide](../../guides/generating-code-documentation.md).
|
|
40
|
+
|
|
14
41
|
## SPDX and third-party IP reporting
|
|
15
42
|
|
|
16
43
|
The Go plugin uses [go-licenses v2](https://github.com/google/go-licenses) to
|
|
@@ -53,12 +53,12 @@ GO_LICENSES_TEMPLATE = "{{range .}}{{.Name}}\t{{.Version}}\t{{.LicenseURL}}\t{{.
|
|
|
53
53
|
LICENCE_FILE_PREFIXES = ("LICENSE", "LICENCE", "COPYING")
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
def _generate_doc2go_command_list(executable: str, output_directory: Path,
|
|
56
|
+
def _generate_doc2go_command_list(executable: str, output_directory: Path, patterns: List[str]) -> List[str]:
|
|
57
57
|
return [
|
|
58
58
|
executable,
|
|
59
59
|
"-out",
|
|
60
60
|
str(output_directory),
|
|
61
|
-
|
|
61
|
+
*patterns,
|
|
62
62
|
]
|
|
63
63
|
|
|
64
64
|
|
|
@@ -329,8 +329,87 @@ def _ensure_go_tool_installed(
|
|
|
329
329
|
return _installed_go_tool_path(tool_name, env)
|
|
330
330
|
|
|
331
331
|
|
|
332
|
+
def _doc2go_target(module: str) -> tuple[Path, List[str]]:
|
|
333
|
+
"""Resolve MODULE_TO_DOCUMENT to a Go module, package or explicit pattern."""
|
|
334
|
+
requested = module.strip()
|
|
335
|
+
if not requested:
|
|
336
|
+
raise ValueError("MODULE_TO_DOCUMENT must identify the Go module or package to document")
|
|
337
|
+
|
|
338
|
+
root = ROOT_DIR.resolve()
|
|
339
|
+
source = SRC_DIR.resolve()
|
|
340
|
+
modules = list(
|
|
341
|
+
dict.fromkeys(
|
|
342
|
+
directory.resolve()
|
|
343
|
+
for directory in _candidate_go_module_directories(include_project_root=True)
|
|
344
|
+
if (directory / "go.mod").is_file()
|
|
345
|
+
)
|
|
346
|
+
)
|
|
347
|
+
|
|
348
|
+
if requested == ".":
|
|
349
|
+
workspace_modules = list(
|
|
350
|
+
dict.fromkeys(
|
|
351
|
+
directory.resolve()
|
|
352
|
+
for directory in _determine_go_work_module_directories()
|
|
353
|
+
if (directory / "go.mod").is_file() and directory.resolve().is_relative_to(root)
|
|
354
|
+
)
|
|
355
|
+
)
|
|
356
|
+
if workspace_modules:
|
|
357
|
+
return root, [
|
|
358
|
+
"./..." if directory == root else f"./{directory.relative_to(root).as_posix()}/..."
|
|
359
|
+
for directory in workspace_modules
|
|
360
|
+
]
|
|
361
|
+
if (root / "go.mod").is_file():
|
|
362
|
+
return root, ["./..."]
|
|
363
|
+
raise FileNotFoundError(f"No Go module or workspace found at {ROOT_DIR}")
|
|
364
|
+
|
|
365
|
+
matches = []
|
|
366
|
+
for directory in modules:
|
|
367
|
+
relative = directory.relative_to(root).as_posix() if directory.is_relative_to(root) else None
|
|
368
|
+
if requested in {directory.name, str(directory), relative, f"./{relative}"}:
|
|
369
|
+
matches.append(directory)
|
|
370
|
+
project_module = (root / requested).resolve()
|
|
371
|
+
if project_module.is_relative_to(root) and (project_module / "go.mod").is_file() and project_module not in matches:
|
|
372
|
+
matches.append(project_module)
|
|
373
|
+
if len(matches) > 1:
|
|
374
|
+
raise ValueError(f"MODULE_TO_DOCUMENT={requested!r} matches several Go modules; use a project-relative path")
|
|
375
|
+
if matches:
|
|
376
|
+
return matches[0], ["./..."]
|
|
377
|
+
|
|
378
|
+
# Package directories can be named relative to the project or source root.
|
|
379
|
+
package_matches = []
|
|
380
|
+
for candidate in ((root / requested).resolve(), (source / requested).resolve()):
|
|
381
|
+
if candidate.is_dir():
|
|
382
|
+
containing_modules = [directory for directory in modules if candidate.is_relative_to(directory)]
|
|
383
|
+
if containing_modules:
|
|
384
|
+
directory = max(containing_modules, key=lambda path: len(path.parts))
|
|
385
|
+
relative = candidate.relative_to(directory).as_posix()
|
|
386
|
+
result = directory, [f"./{relative}/..."]
|
|
387
|
+
if result not in package_matches:
|
|
388
|
+
package_matches.append(result)
|
|
389
|
+
if len(package_matches) > 1:
|
|
390
|
+
raise ValueError(f"MODULE_TO_DOCUMENT={requested!r} matches several Go packages; use a project-relative path")
|
|
391
|
+
if package_matches:
|
|
392
|
+
return package_matches[0]
|
|
393
|
+
|
|
394
|
+
# A source subdirectory of a module can also be selected by its short name.
|
|
395
|
+
if requested == source.name and any((parent / "go.mod").is_file() for parent in (source, *source.parents)):
|
|
396
|
+
return source, ["./..."]
|
|
397
|
+
|
|
398
|
+
# Recognise a full module path without requiring the caller to append /....
|
|
399
|
+
if "." in requested and not requested.startswith("./"):
|
|
400
|
+
env = os.environ.copy()
|
|
401
|
+
for directory in modules:
|
|
402
|
+
import_path = _go_module_name(directory, env)
|
|
403
|
+
if requested in {import_path, f"{import_path}/..."}:
|
|
404
|
+
return directory, ["./..."]
|
|
405
|
+
|
|
406
|
+
# An explicit package import path or Go package pattern is used as supplied.
|
|
407
|
+
return source, [requested]
|
|
408
|
+
|
|
409
|
+
|
|
332
410
|
def _call_doc2go(output_directory: Path, module: str) -> None:
|
|
333
411
|
"""Call doc2go for generating the docs."""
|
|
412
|
+
working_dir, patterns = _doc2go_target(module)
|
|
334
413
|
env = os.environ
|
|
335
414
|
env[ENVVAR_GO_MOD] = GO_MOD_ON_VALUE
|
|
336
415
|
executable = _ensure_go_tool_installed(
|
|
@@ -340,10 +419,10 @@ def _call_doc2go(output_directory: Path, module: str) -> None:
|
|
|
340
419
|
env=env,
|
|
341
420
|
)
|
|
342
421
|
logger.info("Creating Code documentation.")
|
|
343
|
-
logger.info("Running doc2go over [%s] in [%s].",
|
|
422
|
+
logger.info("Running doc2go over [%s] in [%s].", patterns, working_dir)
|
|
344
423
|
check_call(
|
|
345
|
-
_generate_doc2go_command_list(executable, output_directory,
|
|
346
|
-
cwd=str(
|
|
424
|
+
_generate_doc2go_command_list(executable, output_directory.resolve(), patterns),
|
|
425
|
+
cwd=str(working_dir),
|
|
347
426
|
env=env,
|
|
348
427
|
)
|
|
349
428
|
|
|
@@ -475,7 +554,7 @@ class Go(BaseLanguage):
|
|
|
475
554
|
def generate_code_documentation(self, output_directory: Path, module_to_document: str) -> None:
|
|
476
555
|
"""Generates the code documentation."""
|
|
477
556
|
super().generate_code_documentation(output_directory, module_to_document)
|
|
478
|
-
_call_doc2go(output_directory, module_to_document
|
|
557
|
+
_call_doc2go(output_directory, module_to_document)
|
|
479
558
|
|
|
480
559
|
def can_add_licence_headers(self) -> bool:
|
|
481
560
|
"""States that licence headers can be added."""
|