Skip to content

Commit bb75775

Browse files
IBMalokGitHub Enterprise
authored and
GitHub Enterprise
committed
Release 2.13.5
1 parent f0fa1b2 commit bb75775

Some content is hidden

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

45 files changed

+1576
-318
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# CHANGELOG
22

3+
## 2.13.5
4+
5+
### Content
6+
7+
#### Defect Fixes
8+
9+
* IBM Python SDK aligned with AWS Python SDK - Boto3(v1.34.39), Botocore(v1.34.39) and S3transfer(v0.10.0)
10+
* Update dependencies
11+
312
## 2.13.4
413

514
### Content

docs/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
#
33

44
# You can set these variables from the command line.
5-
SPHINXOPTS =
5+
SPHINXOPTS = -j auto
66
SPHINXBUILD = sphinx-build
77
PAPER =
88
BUILDDIR = build
9+
SERVICESDIR = source/reference/services
910

1011
# Internal variables.
1112
PAPEROPT_a4 = -D latex_paper_size=a4
@@ -40,6 +41,8 @@ help:
4041

4142
clean:
4243
-rm -rf $(BUILDDIR)/*
44+
# Clears out the source directory (excluding 'index.rst').
45+
find $(SERVICESDIR) -depth 1 ! -name 'index.rst' -exec rm -rf '{}' \+
4346

4447
html:
4548
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

docs/source/_static/css/custom.css

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
/* Prevents two-dimensional scrolling and content loss. */
2+
h1, code, li {
3+
overflow-wrap: break-word;
4+
}
5+
/* Provides padding to push down the "breadcrumb" navigation in nested pages. */
6+
.content{
7+
padding: 1em 3em;
8+
}
9+
/* Improves spacing around custom sidebar section*/
10+
.sidebar-div{
11+
margin: var(--sidebar-caption-space-above) 0 0 0;
12+
padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);
13+
}
14+
/* Custom sidebar heading text. Example: Feedback Section heading. */
15+
.sidebar-heading{
16+
color: var(--color-sidebar-caption-text);
17+
font-size: var(--font-size--normal);
18+
font-weight: 700;
19+
}
20+
/* Improves text used in custom sidebar section. Example: Feedback section content.*/
21+
.sidebar-text{
22+
color: var(--color-sidebar-caption-text);
23+
font-size: var(--sidebar-item-font-size);
24+
line-height: 1.4;
25+
}
26+
/* Removes empty space above the sidebar-tree (under "Feedback" section) */
27+
.sidebar-tree{
28+
margin-top: 0px;
29+
}
30+
/* Adds padding around AWS Logo in the left sidebar. */
31+
.sidebar-logo{
32+
padding: 20% 15%;
33+
}
34+
/* Hides a div by default. */
35+
.show-div-sm {
36+
display: none;
37+
}
38+
/* Hides a div by default. */
39+
.show-div-md {
40+
display: none;
41+
}
42+
/* Positions items starting from the right. */
43+
.justify-content-right {
44+
justify-content: right;
45+
}
46+
/* Positions items starting from the left. */
47+
.justify-content-left {
48+
justify-content: left;
49+
}
50+
/* Hides the sidebar and prevents keyboard users from focusing on elements. */
51+
.hide-sidebar {
52+
visibility: hidden;
53+
}
54+
/* Hides the icon by default and applies relevant styling. */
55+
.nav-close-icon{
56+
color: var(--color-foreground-secondary);
57+
display: flex;
58+
align-items: center;
59+
justify-content: center;
60+
cursor: pointer;
61+
}
62+
/* Safeguard for ensuring menus are always visible on larger screens. */
63+
@media (min-width: 82em) {
64+
.hide-sidebar {
65+
visibility: visible;
66+
}
67+
}
68+
/* We only want to show the close-icon on medium-small screens. */
69+
@media (max-width: 67em) {
70+
/* Displays a div on a small screen. */
71+
.show-div-sm {
72+
display: flex;
73+
}
74+
}
75+
@media (max-width: 82em) {
76+
/* Displays a div on a medium screen. */
77+
.show-div-md {
78+
display: flex;
79+
}
80+
}
81+
/* Apply furo styled admonition titles for <h3>. */
82+
h3.admonition-title {
83+
position: relative;
84+
margin: 0 -0.5rem 0.5rem;
85+
padding-left: 2.5rem;
86+
padding-right: .5rem;
87+
padding-top: .4rem;
88+
padding-bottom: .4rem;
89+
font-weight: 700;
90+
font-size: 1.5em;
91+
line-height: 1.25;
92+
border-radius: unset;
93+
background-color: var(--color-admonition-title-background);
94+
}
95+
/* Apply furo styled admonition icons before <h3>. */
96+
h3.admonition-title::before {
97+
content: "";
98+
position: absolute;
99+
left: 0.5rem;
100+
width: 1.5rem;
101+
height: 1.5rem;
102+
background-color: var(--color-admonition-title);
103+
mask-image: var(--icon-admonition-default);
104+
mask-repeat: no-repeat;
105+
}

docs/source/_static/js/custom.js

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
/*
2+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License").
5+
You may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
const nonResourceSubHeadings = [
17+
'client',
18+
'waiters',
19+
'paginators',
20+
'resources',
21+
'examples'
22+
];
23+
// Checks if an html doc name matches a service class name.
24+
function isValidServiceName(serviceClassName) {
25+
const pageTitle = document.getElementsByTagName('h1')[0];
26+
const newDocName = pageTitle.innerText.replace('#', '');
27+
return newDocName.toLowerCase() === serviceClassName;
28+
}
29+
// Checks if all elements of the split fragment are valid.
30+
// Fragment items should only contain alphanumerics, hyphens, & underscores.
31+
// A fragment should also only be redirected if it contain 3-5 items.
32+
function isValidFragment(splitFragment) {
33+
const regex = /^[a-z0-9-_]+$/i;
34+
for (index in splitFragment) {
35+
if (!regex.test(splitFragment[index])) {
36+
return false;
37+
}
38+
}
39+
return splitFragment.length >= 1 && splitFragment.length < 5;
40+
}
41+
// Checks if a name is a possible resource name.
42+
function isValidResource(name, serviceDocName) {
43+
return name !== serviceDocName.replaceAll('-', '') && !nonResourceSubHeadings.includes(name);
44+
}
45+
// Reroutes previously existing links to the new path.
46+
// Old: <root_url>/reference/services/s3.html#S3.Client.delete_bucket
47+
// New: <root_url>/reference/services/s3/client/delete_bucket.html
48+
// This must be done client side since the fragment (#S3.Client.delete_bucket) is never
49+
// passed to the server.
50+
(function () {
51+
const currentPath = window.location.pathname.split('/');
52+
const fragment = window.location.hash.substring(1);
53+
const splitFragment = fragment.split('.').map(part => part.replace(/serviceresource/i, 'service-resource'));
54+
// Only redirect when viewing a top-level service page.
55+
if (isValidFragment(splitFragment) && currentPath[currentPath.length - 2] === 'services') {
56+
const serviceDocName = currentPath[currentPath.length - 1].replace('.html', '');
57+
if (splitFragment.length > 1) {
58+
splitFragment[0] = splitFragment[0].toLowerCase();
59+
splitFragment[1] = splitFragment[1].toLowerCase();
60+
}
61+
let newPath;
62+
if (splitFragment.length >= 3 && isValidServiceName(splitFragment[0])) {
63+
splitFragment[0] = serviceDocName;
64+
newPath = `${ splitFragment.slice(0, 3).join('/') }.html#${ splitFragment.length > 3 ? fragment : '' }`;
65+
} else if (splitFragment.length == 2 && isValidResource(splitFragment[1].toLowerCase(), serviceDocName)) {
66+
newPath = `${ splitFragment.join('/') }/index.html#${ fragment }`;
67+
} else if (splitFragment.length == 1 && isValidResource(splitFragment[0], serviceDocName)) {
68+
newPath = `${ serviceDocName }/${ splitFragment.join('/') }/index.html`;
69+
} else {
70+
return;
71+
}
72+
window.location.assign(newPath);
73+
}
74+
}());
75+
// Given a service name, we apply the html classes which indicate a current page to the corresponsing list item.
76+
// Before: <li class="toctree-l2"><a class="reference internal" href="../../acm.html">ACM</a></li>
77+
// After: <li class="toctree-l2 current current-page"><a class="reference internal" href="../../acm.html">ACM</a></li>
78+
function makeServiceLinkCurrent(serviceName) {
79+
const servicesSection = [...document.querySelectorAll('a')].find(
80+
e => e.innerHTML.includes('Available Services')
81+
).parentElement;
82+
var linkElement = servicesSection.querySelectorAll(`a[href*="../${ serviceName }.html"]`);
83+
if (linkElement.length === 0) {
84+
linkElement = servicesSection.querySelectorAll(`a[href="#"]`)[0];
85+
} else {
86+
linkElement = linkElement[0];
87+
}
88+
let linkParent = linkElement.parentElement;
89+
linkParent.classList.add('current');
90+
linkParent.classList.add('current-page');
91+
}
92+
const currentPagePath = window.location.pathname.split('/');
93+
const codeBlockSelector = 'div.highlight pre';
94+
// Expands the "Available Services" sub-menu in the side-bar when viewing
95+
// nested doc pages and highlights the corresponding service list item.
96+
function expandSubMenu() {
97+
if (currentPagePath.includes('services')) {
98+
document.getElementById('toctree-checkbox-11').checked = true;
99+
// Example Nested Path: /reference/services/<service_name>/client/<operation_name>.html
100+
const serviceNameIndex = currentPagePath.indexOf('services') + 1;
101+
const serviceName = currentPagePath[serviceNameIndex];
102+
makeServiceLinkCurrent(serviceName);
103+
}
104+
}
105+
// Allows code blocks to be scrollable by keyboard only users.
106+
function makeCodeBlocksScrollable() {
107+
const codeCells = document.querySelectorAll(codeBlockSelector);
108+
codeCells.forEach(codeCell => {
109+
codeCell.tabIndex = 0;
110+
});
111+
}
112+
// Determines which of the two table-of-contents menu labels is visible.
113+
function determineVisibleTocOpenMenu() {
114+
const mediaQuery = window.matchMedia('(max-width: 67em)');
115+
return mediaQuery.matches ? 'toc-menu-open-sm' : 'toc-menu-open-md';
116+
}
117+
118+
// A mapping of current to next focus id's. For example, We want a corresponsing
119+
// menu's close button to be highlighted after a menu is opened with a keyboard.
120+
const NEXT_FOCUS_ID_MAP = {
121+
'nav-menu-open': 'nav-menu-close',
122+
'nav-menu-close': 'nav-menu-open',
123+
'toc-menu-open-sm': 'toc-menu-close',
124+
'toc-menu-open-md': 'toc-menu-close',
125+
'toc-menu-close': determineVisibleTocOpenMenu(),
126+
};
127+
128+
// Toggles the visibility of a sidebar menu to prevent keyboard focus on hidden elements.
129+
function toggleSidebarMenuVisibility(elementQuery, inputQuery) {
130+
const sidebarElement = document.querySelector(elementQuery);
131+
const sidebarInput = document.querySelector(inputQuery);
132+
sidebarInput.addEventListener('change', () => {
133+
setTimeout(
134+
() => {
135+
sidebarElement.classList.toggle('hide-sidebar', !sidebarInput.checked);
136+
},
137+
sidebarInput.checked ? 0 : 250,
138+
);
139+
});
140+
window.matchMedia('(max-width: 67em)').addEventListener('change', (event) => {
141+
NEXT_FOCUS_ID_MAP['toc-menu-close'] = determineVisibleTocOpenMenu();
142+
if (!event.matches) {
143+
document
144+
.querySelector('.sidebar-drawer')
145+
.classList.remove('hide-sidebar');
146+
}
147+
});
148+
window.matchMedia('(max-width: 82em)').addEventListener('change', (event) => {
149+
if (!event.matches) {
150+
document.querySelector('.toc-drawer').classList.remove('hide-sidebar');
151+
}
152+
});
153+
}
154+
155+
// Activates labels when a user focuses on them and clicks "Enter".
156+
// Also highlights the next appropriate input label.
157+
function activateLabelOnEnter() {
158+
const labels = document.querySelectorAll('label');
159+
labels.forEach((element) => {
160+
element.setAttribute('tabindex', '0');
161+
element.addEventListener('keypress', (event) => {
162+
if (event.key === 'Enter') {
163+
const targetId = element.getAttribute('for');
164+
document.getElementById(targetId).click();
165+
const nextFocusId = NEXT_FOCUS_ID_MAP[element.id];
166+
if (nextFocusId) {
167+
// Timeout is needed to let the label become visible.
168+
setTimeout(() => {
169+
document.getElementById(nextFocusId).focus();
170+
}, 250);
171+
}
172+
}
173+
});
174+
});
175+
}
176+
177+
// Improves accessibility for keyboard-only users.
178+
function setupKeyboardFriendlyNavigation() {
179+
activateLabelOnEnter();
180+
toggleSidebarMenuVisibility('.toc-drawer', '#__toc');
181+
toggleSidebarMenuVisibility('.sidebar-drawer', '#__navigation');
182+
}
183+
// Functions to run after the DOM loads.
184+
function runAfterDOMLoads() {
185+
expandSubMenu();
186+
makeCodeBlocksScrollable();
187+
setupKeyboardFriendlyNavigation();
188+
}
189+
// Run a function after the DOM loads.
190+
function ready(fn) {
191+
if (document.readyState !== 'loading') {
192+
fn();
193+
} else {
194+
document.addEventListener('DOMContentLoaded', fn);
195+
}
196+
}
197+
ready(runAfterDOMLoads);

0 commit comments

Comments
 (0)