Skip to content

Commit 49e68c6

Browse files
authored
Merge branch 'develop' into requirements-update
2 parents 927831a + b0f09d9 commit 49e68c6

File tree

860 files changed

+14965
-7646
lines changed

Some content is hidden

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

860 files changed

+14965
-7646
lines changed

.ci/create-changes-html.sh

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/bin/sh
22
if [ $# != 2 ]; then
3-
echo >&2 "usage: $0 BASE_DOC_COMMIT DOC_REPO"
4-
echo >&2 "creates CHANGES.html in the current directory"
5-
echo >&2 "for the diffs of DOC_REPO against BASE_DOC_COMMIT"
3+
echo >&2 "Usage: $0 DIFF_TEXT DOC_REPO"
4+
echo >&2 "This script generates a CHANGES.html file in the current directory"
5+
echo >&2 "and adds anchor targets in the documents within DOC_REPO"
6+
echo >&2 "based on the diff hunks in the DIFF_TEXT file."
67
exit 1
78
fi
8-
BASE_DOC_COMMIT="$1"
9+
DIFF_TEXT="$1"
910
DOC_REPOSITORY="$2"
1011

1112
# Create CHANGES.html
@@ -52,11 +53,10 @@ diffParagraphs.forEach(paragraph => {
5253
EOF
5354
echo '</head>' >> CHANGES.html
5455
echo '<body>' >> CHANGES.html
55-
(cd $DOC_REPOSITORY && git diff $BASE_DOC_COMMIT -- "*.html") > diff.txt
5656
python3 - << EOF
5757
import os, re, html
5858
from itertools import chain
59-
with open('diff.txt', 'r') as f:
59+
with open('$DIFF_TEXT', 'r') as f:
6060
diff_text = f.read()
6161
diff_blocks = re.split(r'^(?=diff --git)', diff_text, flags=re.MULTILINE)
6262
out_blocks = []
@@ -83,12 +83,21 @@ for block in diff_blocks:
8383
hunk_lines = []
8484
search_result = re.search(r'@@ -(\d+),(\d+) \+(\d+),(\d+)', line)
8585
if search_result:
86-
line_number = int(search_result.group(3))
86+
line_number = int(search_result.group(3)) - 1
8787
span = int(search_result.group(4))
8888
for i in chain(range(line_number, line_number + span), range(line_number - 1, -1, -1)):
89-
if content[i].startswith('<') and not content[i].startswith('</'):
89+
try:
90+
ln = content[i]
91+
except IndexError:
92+
continue
93+
for idx, char in enumerate(ln):
94+
if not char.isspace():
95+
break
96+
else:
97+
idx = len(ln)
98+
if ln.startswith('<', idx) and not ln.startswith('</', idx):
9099
count += 1
91-
content[i] = f'<span id="hunk{count}" style="visibility: hidden;"></span>' + content[i]
100+
content[i] = ln[:idx] + f'<span id="hunk{count}" style="visibility: hidden;"></span>' + ln[idx:]
92101
hunks.append(f'<p class="hunk"><a href="{path}#hunk{count}" class="hunk" target="_blank">hunk #{count}</a></p>')
93102
break
94103
hunk_lines.append(line)
@@ -107,4 +116,4 @@ EOF
107116
cat diff.html >> CHANGES.html
108117
echo '</body>' >> CHANGES.html
109118
echo '</html>' >> CHANGES.html
110-
rm diff.txt diff.html
119+
rm diff.html

.ci/retrofit-worktree.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ git worktree add --detach $WORKTREE_NAME
4343
rm -rf $WORKTREE_DIRECTORY/.git && mv $WORKTREE_NAME/.git $WORKTREE_DIRECTORY/
4444
rm -rf $WORKTREE_NAME && ln -s $WORKTREE_DIRECTORY $WORKTREE_NAME
4545
if [ ! -f $WORKTREE_NAME/.gitignore ]; then cp .gitignore $WORKTREE_NAME/; fi
46-
(cd $WORKTREE_NAME && git add -A && git commit --quiet --allow-empty -m "old" -a && git tag -f old && git checkout new && git status)
46+
(cd $WORKTREE_NAME && git add -A && git commit --quiet --allow-empty -m "old" -a && git tag -f old && git checkout -f new && git clean -fd && git status)

.ci/write-dockerfile.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ $ADD .upstream.d /new/.upstream.d
283283
ADD .ci /.ci
284284
RUN if [ -d /sage ]; then \
285285
echo "### Incremental build from \$(cat /sage/VERSION.txt)" && \
286-
printf '/src\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /sage/.gitignore && \
287-
printf '/src\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /new/.gitignore && \
286+
printf '/src/*\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /sage/.gitignore && \
287+
printf '/src/*\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /new/.gitignore && \
288288
if ! (cd /new && /.ci/retrofit-worktree.sh worktree-image /sage); then \
289289
echo "retrofit-worktree.sh failed, falling back to replacing /sage"; \
290290
for a in local logs; do \

.devcontainer/portability-centos-stream-9-python3.9-minimal/devcontainer.json renamed to .devcontainer/portability-centos-stream-9-minimal/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
// from .devcontainer/portability-devcontainer.json.in
44
// See https://aka.ms/devcontainer.json for format details.
55
{
6-
"name": "centos-stream-9-python3.9-minimal (≥ 8-core)",
6+
"name": "centos-stream-9-minimal (≥ 8-core)",
77
"build": {
88
"dockerfile": "portability-Dockerfile",
99
// See tox.ini for definitions
1010
"args": {
11-
"SYSTEM_FACTOR": "centos-stream-9-python3.9",
11+
"SYSTEM_FACTOR": "centos-stream-9",
1212
"PACKAGE_FACTOR": "minimal",
1313
"DOCKER_TARGET": "with-targets",
1414
"DOCKER_TAG": "dev"
File renamed without changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// The command "tox -e update_docker_platforms"
2+
// creates .devcontainer/portability-*-*/devcontainer.json
3+
// from .devcontainer/portability-devcontainer.json.in
4+
// See https://aka.ms/devcontainer.json for format details.
5+
{
6+
"name": "centos-stream-9-python3.12-minimal (≥ 8-core)",
7+
"build": {
8+
"dockerfile": "portability-Dockerfile",
9+
// See tox.ini for definitions
10+
"args": {
11+
"SYSTEM_FACTOR": "centos-stream-9-python3.12",
12+
"PACKAGE_FACTOR": "minimal",
13+
"DOCKER_TARGET": "with-targets",
14+
"DOCKER_TAG": "dev"
15+
}
16+
},
17+
"containerEnv": {
18+
"MAKE": "make -j4"
19+
},
20+
"onCreateCommand": ".devcontainer/onCreate.sh",
21+
"updateContentCommand": ".devcontainer/portability-updateContent.sh",
22+
"extensions": [
23+
"ms-python.python"
24+
]
25+
}
File renamed without changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// The command "tox -e update_docker_platforms"
2+
// creates .devcontainer/portability-*-*/devcontainer.json
3+
// from .devcontainer/portability-devcontainer.json.in
4+
// See https://aka.ms/devcontainer.json for format details.
5+
{
6+
"name": "centos-stream-9-python3.12-standard (≥ 8-core)",
7+
"build": {
8+
"dockerfile": "portability-Dockerfile",
9+
// See tox.ini for definitions
10+
"args": {
11+
"SYSTEM_FACTOR": "centos-stream-9-python3.12",
12+
"PACKAGE_FACTOR": "standard",
13+
"DOCKER_TARGET": "with-targets",
14+
"DOCKER_TAG": "dev"
15+
}
16+
},
17+
"containerEnv": {
18+
"MAKE": "make -j4"
19+
},
20+
"onCreateCommand": ".devcontainer/onCreate.sh",
21+
"updateContentCommand": ".devcontainer/portability-updateContent.sh",
22+
"extensions": [
23+
"ms-python.python"
24+
]
25+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../portability-Dockerfile
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
// from .devcontainer/portability-devcontainer.json.in
44
// See https://aka.ms/devcontainer.json for format details.
55
{
6-
"name": "centos-stream-9-python3.9-standard (≥ 8-core)",
6+
"name": "centos-stream-9-standard (≥ 8-core)",
77
"build": {
88
"dockerfile": "portability-Dockerfile",
99
// See tox.ini for definitions
1010
"args": {
11-
"SYSTEM_FACTOR": "centos-stream-9-python3.9",
11+
"SYSTEM_FACTOR": "centos-stream-9",
1212
"PACKAGE_FACTOR": "standard",
1313
"DOCKER_TARGET": "with-targets",
1414
"DOCKER_TAG": "dev"

0 commit comments

Comments
 (0)