Skip to content

Commit a37efc6

Browse files
authored
Merge branch 'develop' into nb_7_packages_m4
2 parents 5c3c332 + 30b3d78 commit a37efc6

File tree

2,192 files changed

+595355
-23030
lines changed

Some content is hidden

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

2,192 files changed

+595355
-23030
lines changed

.ci/create-changes-html.sh

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,27 @@ for block in diff_blocks:
6262
match = re.search(r'^diff --git a/(.*) b/\1', block, flags=re.MULTILINE)
6363
if match:
6464
doc = match.group(1)
65-
path = 'html/' + doc
6665
file_path = os.path.join('$DOC_REPOSITORY', doc)
67-
with open(file_path, 'r') as file:
68-
content = file.readlines()
66+
try:
67+
with open(file_path, 'r') as file:
68+
content = file.readlines()
69+
except FileNotFoundError:
70+
content = []
6971
count = 0
7072
for line in block.splitlines():
7173
if line.startswith('@@ -'):
72-
line_number = int(re.search(r'@@ -(\d+)', line).group(1))
73-
for i in range(line_number, -1, -1):
74-
if content[i].startswith('<'):
75-
count += 1
76-
content[i] = f'<span id="hunk{count}" style="visibility: hidden;"></span>' + content[i]
77-
break
78-
with open(file_path, 'w') as file:
79-
file.writelines(content)
74+
search_result = re.search(r'@@ -(\d+),(\d+) \+(\d+),(\d+)', line)
75+
if search_result:
76+
line_number = int(search_result.group(3))
77+
for i in range(line_number - 1, -1, -1):
78+
if content[i].startswith('<'):
79+
count += 1
80+
content[i] = f'<span id="hunk{count}" style="visibility: hidden;"></span>' + content[i]
81+
break
82+
if content:
83+
with open(file_path, 'w') as file:
84+
file.writelines(content)
85+
path = 'html/' + doc
8086
hunks = '&nbsp;'.join(f'<a href="{path}#hunk{i+1}" class="hunk" target="_blank">#{i + 1}</a>' for i in range(count))
8187
out_blocks.append(f'<p class="diff"><a href="{path}">{doc}</a>&nbsp;' + hunks + '&emsp;</p>'
8288
+ '\n<pre><code class="language-diff">'

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"remoteUser": "vscode",
99

1010
// Setup conda environment
11-
"onCreateCommand": ".devcontainer/onCreate-conda.sh",
11+
"onCreateCommand": ".devcontainer/onCreate-conda.sh || true",
1212

1313
// Install additional features.
1414
"features": {

.devcontainer/downstream-archlinux-latest/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "archlinux:latest downstream Sage",
44
"image": "archlinux:latest",
55
// Create an empty bashrc to avoid the error "No such file or directory" when opening a terminal.
6-
"onCreateCommand": "EXTRA_SYSTEM_PACKAGES='sagemath sagemath-doc' EXTRA_SAGE_PACKAGES='notebook pip' .devcontainer/onCreate.sh && touch ~/.bashrc",
6+
"onCreateCommand": "sed -i '/^NoExtract/d' /etc/pacman.conf; EXTRA_SYSTEM_PACKAGES='sagemath sagemath-doc' EXTRA_SAGE_PACKAGES='notebook pip' .devcontainer/onCreate.sh && touch ~/.bashrc",
77
// There's no SAGE_LOCAL, so remove the symlink 'prefix'.
88
"updateContentCommand": "rm -f prefix && ln -sf /usr venv",
99
"extensions": [

.devcontainer/onCreate-conda.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
set -e
33

44
# Create conda environment
5-
./bootstrap-conda
65
conda install mamba -n base -c conda-forge -y
7-
mamba env create --file src/environment-dev-3.11.yml || mamba env update --file src/environment-dev-3.11.yml
6+
mamba env create --file src/environment-dev-3.11-linux.yml || mamba env update --file src/environment-dev-3.11-linux.yml
87
conda init bash
98

109
# Build sage
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": "almalinux-8-python3.9-minimal (≥ 8-core)",
7+
"build": {
8+
"dockerfile": "portability-Dockerfile",
9+
// See tox.ini for definitions
10+
"args": {
11+
"SYSTEM_FACTOR": "almalinux-8-python3.9",
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+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../portability-Dockerfile
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": "almalinux-8-python3.9-standard (≥ 8-core)",
7+
"build": {
8+
"dockerfile": "portability-Dockerfile",
9+
// See tox.ini for definitions
10+
"args": {
11+
"SYSTEM_FACTOR": "almalinux-8-python3.9",
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: 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": "almalinux-9-python3.11-minimal (≥ 8-core)",
7+
"build": {
8+
"dockerfile": "portability-Dockerfile",
9+
// See tox.ini for definitions
10+
"args": {
11+
"SYSTEM_FACTOR": "almalinux-9-python3.11",
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+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../portability-Dockerfile

0 commit comments

Comments
 (0)