Skip to content

Commit ed5b3f5

Browse files
authored
Merge branch 'develop' into magma_series_rings
2 parents c7381d7 + 5188024 commit ed5b3f5

File tree

2,017 files changed

+47043
-45885
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,017 files changed

+47043
-45885
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: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ STRIP_COMMENTS="sed s/#.*//;"
3535
SAGE_ROOT=.
3636
export PATH="$SAGE_ROOT"/build/bin:$PATH
3737
SYSTEM_PACKAGES=$EXTRA_SYSTEM_PACKAGES
38-
SYSTEM_CONFIGURE_ARGS="--enable-option-checking "
38+
SYSTEM_CONFIGURE_ARGS=" --enable-option-checking"
3939
for SPKG in $(sage-package list --has-file=spkg-configure.m4 $SAGE_PACKAGE_LIST_ARGS) $EXTRA_SAGE_PACKAGES; do
4040
SYSTEM_PACKAGE=$(sage-get-system-packages $SYSTEM $SPKG)
4141
if [ -n "${SYSTEM_PACKAGE}" ]; then
@@ -45,13 +45,20 @@ for SPKG in $(sage-package list --has-file=spkg-configure.m4 $SAGE_PACKAGE_LIST_
4545
# shell-quote package if necessary
4646
SYSTEM_PACKAGES+=$(printf " %q" "$a")
4747
done
48-
SYSTEM_CONFIGURE_ARGS+="--with-system-${SPKG}=${WITH_SYSTEM_SPKG} "
48+
# Check if SPKG is not a dummy package
49+
if [[ $SPKG != _* ]]; then
50+
SYSTEM_CONFIGURE_ARGS+=" --with-system-${SPKG}=${WITH_SYSTEM_SPKG}"
51+
fi
4952
fi
5053
done
5154
echo "# Automatically generated by SAGE_ROOT/.ci/write-dockerfile.sh"
5255
echo "# the :comments: separate the generated file into sections"
5356
echo "# to simplify writing scripts that customize this file"
54-
ADD="ADD $__CHOWN"
57+
if [ -z "$__CHOWN" ]; then
58+
ADD="ADD"
59+
else
60+
ADD="ADD $__CHOWN"
61+
fi
5562
RUN=RUN
5663
cat <<EOF
5764
ARG BASE_IMAGE=$(eval echo "${FULL_BASE_IMAGE_AND_TAG}")
@@ -86,10 +93,7 @@ case $SYSTEM in
8693
# we remove the unminimize binary here after it has done its job.
8794
#
8895
cat <<EOF
89-
RUN if command -v unminimize > /dev/null; then \
90-
(yes | unminimize) || echo "(ignored)"; \
91-
rm -f "\$(command -v unminimize)"; \
92-
fi
96+
RUN if command -v unminimize > /dev/null; then (yes | unminimize) || echo "(ignored)"; rm -f "\$(command -v unminimize)"; fi
9397
EOF
9498
if [ -n "$DIST_UPGRADE" ]; then
9599
cat <<EOF
@@ -254,10 +258,10 @@ case ${DOCKER_BUILDKIT-0} in
254258
# With buildkit we cannot retrieve failed builds.
255259
# So we do not allow the main step of a build stage to fail.
256260
# Instead we record the exit code in the file STATUS.
257-
THEN_SAVE_STATUS='; echo $? > STATUS'
261+
THEN_SAVE_STATUS=' ; echo $? > STATUS'
258262
# ... and at the beginning of the next build stage,
259263
# we check the status and exit with an error status.
260-
CHECK_STATUS_THEN='STATUS=$(cat STATUS 2>/dev/null); case "$STATUS" in ""|0) ;; *) exit $STATUS;; esac; '
264+
CHECK_STATUS_THEN=' STATUS=$(cat STATUS 2>/dev/null); case "$STATUS" in ""|0) ;; *) exit $STATUS;; esac;'
261265
esac
262266

263267
if [ -n "$GITHUB_ACTIONS" ]; then
@@ -271,48 +275,47 @@ cat <<EOF
271275
FROM with-system-packages AS bootstrapped
272276
#:bootstrapping:
273277
RUN rm -rf /new /sage/.git
274-
$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 configure.ac sage .homebrew-build-env tox.ini .gitignore /new/
275279
$ADD config/config.rpath /new/config/config.rpath
276280
$ADD src/doc/bootstrap /new/src/doc/bootstrap
277281
$ADD src/bin /new/src/bin
278-
$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/
279283
$ADD m4 /new/m4
280284
$ADD pkgs /new/pkgs
281285
$ADD build /new/build
282286
$ADD .upstream.d /new/.upstream.d
283287
ADD .ci /.ci
284-
RUN if [ -d /sage ]; then \
285-
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 && \
288-
if ! (cd /new && /.ci/retrofit-worktree.sh worktree-image /sage); then \
289-
echo "retrofit-worktree.sh failed, falling back to replacing /sage"; \
290-
for a in local logs; do \
291-
if [ -d /sage/\$a ]; then mv /sage/\$a /new/; fi; \
292-
done; \
293-
rm -rf /sage; \
294-
mv /new /sage; \
295-
fi; \
296-
else \
297-
mv /new /sage; \
288+
RUN if [ -d /sage ]; then \\
289+
echo "### Incremental build from \$(cat /sage/VERSION.txt)" && \\
290+
printf '/src/*\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /sage/.gitignore && \\
291+
printf '/src/*\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /new/.gitignore && \\
292+
if ! (cd /new && /.ci/retrofit-worktree.sh worktree-image /sage); then \\
293+
echo "retrofit-worktree.sh failed, falling back to replacing /sage"; \\
294+
for a in local logs; do \\
295+
if [ -d /sage/\$a ]; then mv /sage/\$a /new/; fi; \\
296+
done; \\
297+
rm -rf /sage; \\
298+
mv /new /sage; \\
299+
fi; \\
300+
else \\
301+
mv /new /sage; \\
298302
fi
299303
WORKDIR /sage
300-
301304
ARG BOOTSTRAP="${BOOTSTRAP-./bootstrap}"
302-
$RUN sh -x -c "\${BOOTSTRAP}" $ENDRUN $THEN_SAVE_STATUS
305+
$RUN sh -x -c "\${BOOTSTRAP}"$ENDRUN$THEN_SAVE_STATUS
303306
304307
FROM bootstrapped AS configured
305308
#:configuring:
306-
RUN $CHECK_STATUS_THEN mkdir -p logs/pkgs; rm -f config.log; ln -s logs/pkgs/config.log config.log
309+
RUN$CHECK_STATUS_THEN mkdir -p logs/pkgs; rm -f config.log; ln -s logs/pkgs/config.log config.log
307310
ARG CONFIGURE_ARGS="${CONFIGURE_ARGS:---enable-build-as-root}"
308311
EOF
309312
if [ ${WITH_SYSTEM_SPKG} = "force" ]; then
310313
cat <<EOF
311-
$RUN ./configure $SYSTEM_CONFIGURE_ARGS \${CONFIGURE_ARGS} || (echo "::group::config.log"; cat config.log; echo "::endgroup::"; echo "********** configuring without forcing ***********"; ./configure \${CONFIGURE_ARGS}; echo "::group::config.log"; cat config.log; echo "::endgroup::"; exit 1) $ENDRUN $THEN_SAVE_STATUS
314+
$RUN ./configure $SYSTEM_CONFIGURE_ARGS \${CONFIGURE_ARGS} || (echo "::group::config.log"; cat config.log; echo "::endgroup::"; echo "********** configuring without forcing ***********"; ./configure \${CONFIGURE_ARGS}; echo "::group::config.log"; cat config.log; echo "::endgroup::"; exit 1)$ENDRUN$THEN_SAVE_STATUS
312315
EOF
313316
else
314317
cat <<EOF
315-
$RUN ./configure $SYSTEM_CONFIGURE_ARGS \${CONFIGURE_ARGS} || (echo "::group::config.log"; cat config.log; echo "::endgroup::"; exit 1) $ENDRUN $THEN_SAVE_STATUS
318+
$RUN ./configure $SYSTEM_CONFIGURE_ARGS \${CONFIGURE_ARGS} || (echo "::group::config.log"; cat config.log; echo "::endgroup::"; exit 1)$ENDRUN$THEN_SAVE_STATUS
316319
EOF
317320
fi
318321
cat <<EOF
@@ -323,50 +326,49 @@ ARG NUMPROC=8
323326
ENV MAKE="make -j\${NUMPROC}"
324327
ARG USE_MAKEFLAGS="-k V=0"
325328
ENV SAGE_CHECK=warn
326-
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
329+
ENV SAGE_CHECK_PACKAGES="!cython,!python3,!cysignals,!linbox,!ppl,!cmake,!rpy2,!sage_sws2rst"
327330
#:toolchain:
328-
$RUN $CHECK_STATUS_THEN make \${USE_MAKEFLAGS} base-toolchain $ENDRUN $THEN_SAVE_STATUS
331+
$RUN$CHECK_STATUS_THEN make \${USE_MAKEFLAGS} base-toolchain$ENDRUN$THEN_SAVE_STATUS
329332
330333
FROM with-base-toolchain AS with-targets-pre
331334
ARG NUMPROC=8
332335
ENV MAKE="make -j\${NUMPROC}"
333336
ARG USE_MAKEFLAGS="-k V=0"
334337
ENV SAGE_CHECK=warn
335-
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
338+
ENV SAGE_CHECK_PACKAGES="!cython,!python3,!cysignals,!linbox,!ppl,!cmake,!rpy2,!sage_sws2rst"
336339
#:make:
337340
ARG TARGETS_PRE="all-sage-local"
338-
$RUN $CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS_PRE} $ENDRUN $THEN_SAVE_STATUS
341+
$RUN$CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS_PRE}$ENDRUN$THEN_SAVE_STATUS
339342
340343
FROM with-targets-pre AS with-targets
341344
ARG NUMPROC=8
342345
ENV MAKE="make -j\${NUMPROC}"
343346
ARG USE_MAKEFLAGS="-k V=0"
344347
ENV SAGE_CHECK=warn
345-
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
348+
ENV SAGE_CHECK_PACKAGES="!cython,!python3,!cysignals,!linbox,!ppl,!cmake,!rpy2,!sage_sws2rst"
346349
$ADD .gitignore /new/.gitignore
347350
$ADD src /new/src
348-
RUN cd /new && rm -rf .git && \
349-
if /.ci/retrofit-worktree.sh worktree-pre /sage; then \
350-
cd /sage && touch configure build/make/Makefile; \
351-
else \
352-
echo "retrofit-worktree.sh failed, falling back to replacing /sage/src"; \
353-
rm -rf /sage/src; \
354-
mv src /sage/src; \
355-
cd /sage && ./bootstrap && ./config.status; \
356-
fi; \
351+
RUN cd /new && rm -rf .git && \\
352+
if /.ci/retrofit-worktree.sh worktree-pre /sage; then \\
353+
cd /sage && touch configure build/make/Makefile; \\
354+
else \\
355+
echo "retrofit-worktree.sh failed, falling back to replacing /sage/src"; \\
356+
rm -rf /sage/src; \\
357+
mv src /sage/src; \\
358+
cd /sage && ./bootstrap && ./config.status; \\
359+
fi; \\
357360
cd /sage && rm -rf .git; rm -rf /new || echo "(error ignored)"
358-
359361
ARG TARGETS="build"
360-
$RUN $CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS} $ENDRUN $THEN_SAVE_STATUS
362+
$RUN$CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS}$ENDRUN$THEN_SAVE_STATUS
361363
362364
FROM with-targets AS with-targets-optional
363365
ARG NUMPROC=8
364366
ENV MAKE="make -j\${NUMPROC}"
365367
ARG USE_MAKEFLAGS="-k V=0"
366368
ENV SAGE_CHECK=warn
367-
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
369+
ENV SAGE_CHECK_PACKAGES="!cython,!python3,!cysignals,!linbox,!ppl,!cmake,!rpy2,!sage_sws2rst"
368370
ARG TARGETS_OPTIONAL="ptest"
369-
$RUN $CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS_OPTIONAL} || echo "(error ignored)" $ENDRUN $THEN_SAVE_STATUS
371+
$RUN$CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS_OPTIONAL} || echo "(error ignored)"$ENDRUN$THEN_SAVE_STATUS
370372
371373
#:end:
372374
EOF

.codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ coverage:
1717
target: auto
1818
threshold: 0%
1919
base: auto
20+
informational: true

.devcontainer/onCreate-conda.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
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-3.11-linux.yml || mamba env update -y --file environment-3.11-linux.yml
710
conda init bash
811

912
# Build sage
10-
conda run -n sage-dev ./bootstrap
11-
conda run -n sage-dev pip install --no-build-isolation -v -v -e ./src
13+
conda run -n sage-dev pip install --no-build-isolation -v -v -e .

.github/sync_labels.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def actor_valid(self):
609609
for com in coms:
610610
for auth in com['authors']:
611611
login = auth['login']
612-
if not login in authors:
612+
if login not in authors:
613613
if not self.is_this_bot(login) and login != author:
614614
debug('PR %s has recent commit by %s' % (self._issue, login))
615615
authors.append(login)
@@ -746,7 +746,7 @@ def add_label(self, label):
746746
r"""
747747
Add the given label to the issue or PR.
748748
"""
749-
if not label in self.get_labels():
749+
if label not in self.get_labels():
750750
self.edit(label, '--add-label')
751751
info('Add label to %s: %s' % (self._issue, label))
752752

0 commit comments

Comments
 (0)