Skip to content

Commit 84f617a

Browse files
authored
Merge branch 'develop' into doc-improve-1
2 parents 6c18873 + f48da11 commit 84f617a

File tree

904 files changed

+20303
-27128
lines changed

Some content is hidden

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

904 files changed

+20303
-27128
lines changed

.ci/create-changes-html.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ echo '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highli
1616
echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>' >> CHANGES.html
1717
echo '<script>hljs.highlightAll();</script>' >> CHANGES.html
1818
cat >> CHANGES.html << EOF
19+
<style>
20+
p.diff a:first-child {
21+
font-weight: bold;
22+
font-size: x-large;
23+
}
24+
</style>
1925
<script>
2026
document.addEventListener('DOMContentLoaded', () => {
2127
// This URL is hardcoded in the file .github/workflows/doc-publish.yml.

.ci/write-dockerfile.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@ cat <<EOF
275275
FROM with-system-packages AS bootstrapped
276276
#:bootstrapping:
277277
RUN rm -rf /new /sage/.git
278-
$ADD Makefile VERSION.txt COPYING.txt condarc.yml README.md bootstrap bootstrap-conda configure.ac sage .homebrew-build-env tox.ini Pipfile.m4 .gitignore /new/
278+
$ADD Makefile VERSION.txt COPYING.txt condarc.yml README.md bootstrap bootstrap-conda configure.ac sage .homebrew-build-env tox.ini .gitignore /new/
279279
$ADD config/config.rpath /new/config/config.rpath
280280
$ADD src/doc/bootstrap /new/src/doc/bootstrap
281281
$ADD src/bin /new/src/bin
282-
$ADD src/Pipfile.m4 src/pyproject.toml src/requirements.txt.m4 src/setup.cfg.m4 src/VERSION.txt /new/src/
282+
$ADD src/pyproject.toml src/requirements.txt.m4 src/setup.cfg.m4 src/VERSION.txt /new/src/
283283
$ADD m4 /new/m4
284284
$ADD pkgs /new/pkgs
285285
$ADD build /new/build

.devcontainer/onCreate-conda.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
set -e
33

44
# Create conda environment
5-
conda install mamba -n base -c conda-forge -y
6-
mamba env create --file src/environment-dev-3.11-linux.yml || mamba env update --file src/environment-dev-3.11-linux.yml
5+
conda config --env --add channels conda-forge
6+
conda config --env --set channel_priority strict
7+
conda update -y --all --override-channels -c conda-forge
8+
conda install mamba=1 -n base -y
9+
mamba env create -y --file environment-dev-3.11-linux.yml || mamba env update -y --file environment-dev-3.11-linux.yml
710
conda init bash
811

912
# Build sage
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Trigger Changelog Generation
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
trigger-website-repo-workflow:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Trigger Generate Changelog Workflow in website repo
12+
if: "!github.event.release.prerelease"
13+
env:
14+
GITHUB_PAT: ${{ secrets.WEBSITE_ACCESS_TOKEN }}
15+
RELEASE_TAG: ${{ github.event.release.tag_name }}
16+
run: |
17+
curl -L \
18+
-X POST \
19+
-H "Accept: application/vnd.github+json" \
20+
-H "Authorization: Bearer $GITHUB_PAT" \
21+
-H "X-GitHub-Api-Version: 2022-11-28" \
22+
https://api.github.com/repos/sagemath/website/actions/workflows/generate_changelog.yml/dispatches \
23+
-d '{"ref":"master","inputs":{"release_tag":"'"$RELEASE_TAG"'"}}'

.github/workflows/ci-conda.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
with:
6060
path: ~/conda_pkgs_dir
6161
key:
62-
${{ runner.os }}-conda-${{ hashFiles('src/environment-3.11.yml') }}
62+
${{ runner.os }}-conda-${{ hashFiles('environment-3.11.yml') }}
6363

6464
- name: Setup Conda environment
6565
uses: conda-incubator/setup-miniconda@v3
@@ -70,7 +70,7 @@ jobs:
7070
channels: conda-forge
7171
channel-priority: true
7272
activate-environment: sage
73-
environment-file: src/${{ matrix.conda-env }}-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && (startsWith(runner.arch, 'ARM') && 'macos' || 'macos-x86_64') || 'linux' }}.yml
73+
environment-file: ${{ matrix.conda-env }}-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && (startsWith(runner.arch, 'ARM') && 'macos' || 'macos-x86_64') || 'linux' }}.yml
7474

7575
- name: Print Conda environment
7676
shell: bash -l {0}

.github/workflows/ci-linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
tox_packages_factors: >-
5151
["standard"]
5252
docker_push_repository: ghcr.io/${{ github.repository }}/
53+
logs_artifact: false
5354

5455
# All platforms. This duplicates the default platform, but why not,
5556
# it makes it more robust regarding random timeouts.

.github/workflows/ci-macos.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
- name: make dist
9696
run: |
9797
./configure --enable-download-from-upstream-url && make dist
98-
- uses: actions/upload-artifact@v3
98+
- uses: actions/upload-artifact@v4
9999
with:
100100
path: "dist/*.tar.gz"
101101
name: dist
@@ -119,7 +119,7 @@ jobs:
119119
steps:
120120
- uses: actions/checkout@v4
121121
if: "!contains(matrix.tox_system_factor, 'nobootstrap')"
122-
- uses: actions/download-artifact@v3
122+
- uses: actions/download-artifact@v4
123123
with:
124124
path: .
125125
name: dist
@@ -147,7 +147,7 @@ jobs:
147147
run: |
148148
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"
149149
if: always()
150-
- uses: actions/upload-artifact@v3
150+
- uses: actions/upload-artifact@v4
151151
with:
152152
path: artifacts
153153
name: ${{ env.LOGS_ARTIFACT_NAME }}

.github/workflows/ci-meson.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
path: ~/conda_pkgs_dir
4141
key:
42-
${{ runner.os }}-conda-${{ hashFiles('src/environment-3.11-linux.yml') }}
42+
${{ runner.os }}-conda-${{ hashFiles('environment-3.11-linux.yml') }}
4343

4444
- name: Compiler cache
4545
uses: hendrikmuhs/[email protected]
@@ -55,7 +55,7 @@ jobs:
5555
channels: conda-forge
5656
channel-priority: true
5757
activate-environment: sage
58-
environment-file: src/environment-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && (startsWith(runner.arch, 'ARM') && 'macos' || 'macos-x86_64') || 'linux' }}.yml
58+
environment-file: environment-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && (startsWith(runner.arch, 'ARM') && 'macos' || 'macos-x86_64') || 'linux' }}.yml
5959

6060
- name: Print Conda environment
6161
shell: bash -l {0}

.github/workflows/conda-lock-update.py

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,53 @@
44
import subprocess
55

66
script_dir = Path(__file__).resolve().parent
7-
root_dir = script_dir / '..' / '..'
7+
root_dir = script_dir / ".." / ".."
88

99
subprocess.run([str(root_dir / "bootstrap-conda")])
1010

1111
platforms = {
1212
"linux-64": "linux",
1313
"linux-aarch64": "linux-aarch64",
1414
"osx-64": "macos-x86_64",
15-
"osx-arm64": "macos"
16-
#"win-64": "win",
15+
"osx-arm64": "macos",
16+
# "win-64": "win",
1717
}
1818
pythons = ["3.9", "3.10", "3.11"]
1919
tags = ["", "-dev"]
20-
sources = ["", "src"]
2120

2221
for platform_key, platform_value in platforms.items():
2322
for python in pythons:
2423
for tag in tags:
25-
for src in sources:
26-
env_file = root_dir / src / f"environment{tag}-{python}.yml"
27-
lock_file = root_dir / src / f"environment{tag}-{python}-{platform_value}"
24+
env_file = root_dir / f"environment{tag}-{python}.yml"
25+
lock_file = root_dir / f"environment{tag}-{python}-{platform_value}"
26+
lock_file_gen = root_dir / f"environment{tag}-{python}-{platform_value}.yml"
2827

29-
if not env_file.exists():
30-
continue
28+
if not env_file.exists():
29+
continue
3130

32-
print(f"Updating lock file for {env_file} at {lock_file}", flush=True)
33-
subprocess.run(["conda-lock", "--channel", "conda-forge", "--kind", "env", "--platform", platform_key, "--file", str(env_file), "--lockfile", str(lock_file), "--filename-template", str(lock_file)])
31+
print(f"Updating lock file for {env_file} at {lock_file_gen}", flush=True)
32+
subprocess.run(
33+
[
34+
"conda-lock",
35+
"--mamba",
36+
"--channel",
37+
"conda-forge",
38+
"--kind",
39+
"env",
40+
"--platform",
41+
platform_key,
42+
"--file",
43+
str(env_file),
44+
"--lockfile",
45+
str(lock_file),
46+
"--filename-template",
47+
str(lock_file),
48+
],
49+
check=True,
50+
)
51+
52+
# Add conda env name to lock file at beginning
53+
with open(lock_file_gen, "r+") as f:
54+
content = f.read()
55+
f.seek(0, 0)
56+
f.write(f"name: sage{tag}\n{content}")

0 commit comments

Comments
 (0)