Skip to content

Commit 4489e39

Browse files
committed
🚀 releasing version 2.0.0 @ 2020-11-30 12:04
[skip ci]
1 parent 171e960 commit 4489e39

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2952
-468
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,27 @@ This project was forked from version 1.7.4 of [mbed-tools-ci-scripts](https://gi
1313

1414
[//]: # (begin_release_notes)
1515

16+
"2.0.0" (2020-11-30)
17+
====================
18+
19+
Major changes
20+
-------------
21+
22+
- Implemented a plugin system for programming language specific actions. (#20201127193355)
23+
24+
25+
Features
26+
--------
27+
28+
- Added a Docker plugin (#20201130101020)
29+
30+
31+
Bugfixes
32+
--------
33+
34+
- Changed News files name granularity to the minute rather than second (#20201130095841)
35+
36+
1637
"1.0.1" (2020-11-27)
1738
====================
1839

continuous_delivery_scripts/_version.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
1111
This file is autogenerated, do not modify by hand.
1212
"""
13-
__version__ = "1.0.1"
14-
COMMIT = "6511ce861c1f6e738ecc6af28d98ba601b6b0010"
15-
MAJOR = 1
13+
__version__ = "2.0.0"
14+
COMMIT = "171e960cf9c9d05ba888b7788265a930930c3ec4"
15+
MAJOR = 2
1616
MINOR = 0
17-
PATCH = 1
17+
PATCH = 0

docs/assert_news.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h1 class="title">Module <code>continuous_delivery_scripts.assert_news</code></h
3232
<span>Expand source code</span>
3333
</summary>
3434
<pre><code class="python">#
35-
# Copyright (C) 2020 Arm Mbed. All rights reserved.
35+
# Copyright (C) 2020 Arm. All rights reserved.
3636
# SPDX-License-Identifier: Apache-2.0
3737
#
3838
&#34;&#34;&#34;Checks if valid news files are created for changes in the project.&#34;&#34;&#34;

docs/create_news_file.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h2 id="usage">Usage</h2>
3434
<span>Expand source code</span>
3535
</summary>
3636
<pre><code class="python">#
37-
# Copyright (C) 2020 Arm Mbed. All rights reserved.
37+
# Copyright (C) 2020 Arm. All rights reserved.
3838
# SPDX-License-Identifier: Apache-2.0
3939
#
4040
&#34;&#34;&#34;Easy news files generation.
@@ -96,7 +96,7 @@ <h2 id="usage">Usage</h2>
9696

9797

9898
def _determine_todays_news_file_name() -&gt; str:
99-
return datetime.now().strftime(&#34;%Y%m%d%H%M%S&#34;)
99+
return datetime.now().strftime(&#34;%Y%m%d%H%M&#34;)
100100

101101

102102
def main() -&gt; int:

docs/generate_docs.html

Lines changed: 12 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
1010
<meta name="generator" content="pdoc 0.9.2" />
1111
<title>continuous_delivery_scripts.generate_docs API documentation</title>
12-
<meta name="description" content="Generates documentation using Pdoc." />
12+
<meta name="description" content="Generates documentation." />
1313
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
1414
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/typography.min.css" integrity="sha256-7l/o7C8jubJiy74VsKTidCy1yBkRtiUGbVkYBylBqUg=" crossorigin>
1515
<link rel="stylesheet preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/github.min.css" crossorigin>
@@ -26,28 +26,25 @@
2626
<h1 class="title">Module <code>continuous_delivery_scripts.generate_docs</code></h1>
2727
</header>
2828
<section id="section-intro">
29-
<p>Generates documentation using Pdoc.</p>
29+
<p>Generates documentation.</p>
3030
<details class="source">
3131
<summary>
3232
<span>Expand source code</span>
3333
</summary>
3434
<pre><code class="python">#
35-
# Copyright (C) 2020 Arm Mbed. All rights reserved.
35+
# Copyright (C) 2020 Arm. All rights reserved.
3636
# SPDX-License-Identifier: Apache-2.0
3737
#
38-
&#34;&#34;&#34;Generates documentation using Pdoc.&#34;&#34;&#34;
38+
&#34;&#34;&#34;Generates documentation.&#34;&#34;&#34;
39+
import argparse
40+
import logging
3941
import os
4042
import shutil
4143
import sys
42-
43-
import argparse
44-
import logging
4544
from pathlib import Path
46-
from subprocess import check_call
47-
from typing import List
4845

46+
from continuous_delivery_scripts.language_specifics import get_language_specifics
4947
from continuous_delivery_scripts.utils.configuration import configuration, ConfigurationVariable
50-
from continuous_delivery_scripts.utils.filesystem_helpers import TemporaryDirectory
5148
from continuous_delivery_scripts.utils.logging import log_exception
5249

5350
logger = logging.getLogger(__name__)
@@ -59,40 +56,11 @@ <h1 class="title">Module <code>continuous_delivery_scripts.generate_docs</code><
5956
shutil.rmtree(str(output_directory))
6057

6158

62-
def _generate_pdoc_command_list(output_directory: Path, module: str) -&gt; List[str]:
63-
return [
64-
&#34;pdoc&#34;,
65-
&#34;--html&#34;,
66-
f&#34;{module}&#34;,
67-
&#34;--output-dir&#34;,
68-
f&#34;{str(output_directory)}&#34;,
69-
&#34;--force&#34;,
70-
&#34;--config&#34;,
71-
&#34;show_type_annotations=True&#34;,
72-
]
73-
74-
7559
def generate_documentation(output_directory: Path, module_to_document: str) -&gt; None:
76-
&#34;&#34;&#34;Ensures the documentation is in the correct location.
77-
78-
Pdoc nests its docs output in a folder with the module&#39;s name.
79-
This process removes this unwanted folder.
80-
&#34;&#34;&#34;
60+
&#34;&#34;&#34;Generates the documentation.&#34;&#34;&#34;
8161
_clear_previous_docs(output_directory)
8262
os.makedirs(str(output_directory), exist_ok=True)
83-
with TemporaryDirectory() as temp_dir:
84-
_call_pdoc(temp_dir, module_to_document)
85-
docs_contents_dir = temp_dir.joinpath(module_to_document)
86-
if docs_contents_dir.exists() and docs_contents_dir.is_dir():
87-
for element in docs_contents_dir.iterdir():
88-
shutil.move(str(element), str(output_directory))
89-
90-
91-
def _call_pdoc(output_directory: Path, module: str) -&gt; None:
92-
&#34;&#34;&#34;Calls Pdoc for generating the docs.&#34;&#34;&#34;
93-
logger.info(&#34;Creating Pdoc documentation.&#34;)
94-
command_list = _generate_pdoc_command_list(output_directory, module)
95-
check_call(command_list)
63+
get_language_specifics().generate_code_documentation(output_directory, module_to_document)
9664

9765

9866
def generate_docs(output_directory: Path, module: str) -&gt; int:
@@ -153,27 +121,16 @@ <h2 class="section-title" id="header-functions">Functions</h2>
153121
<span>def <span class="ident">generate_documentation</span></span>(<span>output_directory: pathlib.Path, module_to_document: str) ‑> NoneType</span>
154122
</code></dt>
155123
<dd>
156-
<div class="desc"><p>Ensures the documentation is in the correct location.</p>
157-
<p>Pdoc nests its docs output in a folder with the module's name.
158-
This process removes this unwanted folder.</p></div>
124+
<div class="desc"><p>Generates the documentation.</p></div>
159125
<details class="source">
160126
<summary>
161127
<span>Expand source code</span>
162128
</summary>
163129
<pre><code class="python">def generate_documentation(output_directory: Path, module_to_document: str) -&gt; None:
164-
&#34;&#34;&#34;Ensures the documentation is in the correct location.
165-
166-
Pdoc nests its docs output in a folder with the module&#39;s name.
167-
This process removes this unwanted folder.
168-
&#34;&#34;&#34;
130+
&#34;&#34;&#34;Generates the documentation.&#34;&#34;&#34;
169131
_clear_previous_docs(output_directory)
170132
os.makedirs(str(output_directory), exist_ok=True)
171-
with TemporaryDirectory() as temp_dir:
172-
_call_pdoc(temp_dir, module_to_document)
173-
docs_contents_dir = temp_dir.joinpath(module_to_document)
174-
if docs_contents_dir.exists() and docs_contents_dir.is_dir():
175-
for element in docs_contents_dir.iterdir():
176-
shutil.move(str(element), str(output_directory))</code></pre>
133+
get_language_specifics().generate_code_documentation(output_directory, module_to_document)</code></pre>
177134
</details>
178135
</dd>
179136
<dt id="continuous_delivery_scripts.generate_docs.main"><code class="name flex">

docs/generate_news.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h1 class="title">Module <code>continuous_delivery_scripts.generate_news</code><
3232
<span>Expand source code</span>
3333
</summary>
3434
<pre><code class="python">#
35-
# Copyright (C) 2020 Arm Mbed. All rights reserved.
35+
# Copyright (C) 2020 Arm. All rights reserved.
3636
# SPDX-License-Identifier: Apache-2.0
3737
#
3838
&#34;&#34;&#34;Handles usage of towncrier for automated changelog generation and pyautoversion for versioning.&#34;&#34;&#34;

docs/get_config.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h1 class="title">Module <code>continuous_delivery_scripts.get_config</code></h1
3232
<span>Expand source code</span>
3333
</summary>
3434
<pre><code class="python">#
35-
# Copyright (C) 2020 Arm Mbed. All rights reserved.
35+
# Copyright (C) 2020 Arm. All rights reserved.
3636
# SPDX-License-Identifier: Apache-2.0
3737
#
3838
&#34;&#34;&#34;Retrieves configuration values.&#34;&#34;&#34;

docs/index.html

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h1 class="title">Package <code>continuous_delivery_scripts</code></h1>
3232
<span>Expand source code</span>
3333
</summary>
3434
<pre><code class="python">#
35-
# Copyright (C) 2020 Arm Mbed. All rights reserved.
35+
# Copyright (C) 2020 Arm. All rights reserved.
3636
# SPDX-License-Identifier: Apache-2.0
3737
#
3838
&#34;&#34;&#34;Scripts and utilities used by the CI pipeline.&#34;&#34;&#34;
@@ -52,7 +52,7 @@ <h2 class="section-title" id="header-submodules">Sub-modules</h2>
5252
</dd>
5353
<dt><code class="name"><a title="continuous_delivery_scripts.generate_docs" href="generate_docs.html">continuous_delivery_scripts.generate_docs</a></code></dt>
5454
<dd>
55-
<div class="desc"><p>Generates documentation using Pdoc.</p></div>
55+
<div class="desc"><p>Generates documentation.</p></div>
5656
</dd>
5757
<dt><code class="name"><a title="continuous_delivery_scripts.generate_news" href="generate_news.html">continuous_delivery_scripts.generate_news</a></code></dt>
5858
<dd>
@@ -62,10 +62,18 @@ <h2 class="section-title" id="header-submodules">Sub-modules</h2>
6262
<dd>
6363
<div class="desc"><p>Retrieves configuration values.</p></div>
6464
</dd>
65+
<dt><code class="name"><a title="continuous_delivery_scripts.language_specifics" href="language_specifics.html">continuous_delivery_scripts.language_specifics</a></code></dt>
66+
<dd>
67+
<div class="desc"><p>Language plugins Loader.</p></div>
68+
</dd>
6569
<dt><code class="name"><a title="continuous_delivery_scripts.license_files" href="license_files.html">continuous_delivery_scripts.license_files</a></code></dt>
6670
<dd>
6771
<div class="desc"><p>Apply copyright and licensing to all source files present in a project …</p></div>
6872
</dd>
73+
<dt><code class="name"><a title="continuous_delivery_scripts.plugins" href="plugins/index.html">continuous_delivery_scripts.plugins</a></code></dt>
74+
<dd>
75+
<div class="desc"><p>Language specific actions.</p></div>
76+
</dd>
6977
<dt><code class="name"><a title="continuous_delivery_scripts.report_third_party_ip" href="report_third_party_ip.html">continuous_delivery_scripts.report_third_party_ip</a></code></dt>
7078
<dd>
7179
<div class="desc"><p>Script providing information about licensing and third party IP in order to comply with OpenChain …</p></div>
@@ -104,7 +112,9 @@ <h1>Index</h1>
104112
<li><code><a title="continuous_delivery_scripts.generate_docs" href="generate_docs.html">continuous_delivery_scripts.generate_docs</a></code></li>
105113
<li><code><a title="continuous_delivery_scripts.generate_news" href="generate_news.html">continuous_delivery_scripts.generate_news</a></code></li>
106114
<li><code><a title="continuous_delivery_scripts.get_config" href="get_config.html">continuous_delivery_scripts.get_config</a></code></li>
115+
<li><code><a title="continuous_delivery_scripts.language_specifics" href="language_specifics.html">continuous_delivery_scripts.language_specifics</a></code></li>
107116
<li><code><a title="continuous_delivery_scripts.license_files" href="license_files.html">continuous_delivery_scripts.license_files</a></code></li>
117+
<li><code><a title="continuous_delivery_scripts.plugins" href="plugins/index.html">continuous_delivery_scripts.plugins</a></code></li>
108118
<li><code><a title="continuous_delivery_scripts.report_third_party_ip" href="report_third_party_ip.html">continuous_delivery_scripts.report_third_party_ip</a></code></li>
109119
<li><code><a title="continuous_delivery_scripts.spdx_report" href="spdx_report/index.html">continuous_delivery_scripts.spdx_report</a></code></li>
110120
<li><code><a title="continuous_delivery_scripts.tag_and_release" href="tag_and_release.html">continuous_delivery_scripts.tag_and_release</a></code></li>

0 commit comments

Comments
 (0)