Skip to content

Commit

Permalink
Merge branch 'develop' into fix_E303_in_folders_defghi
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton authored Mar 26, 2023
2 parents 874da86 + 82e02a1 commit 2b32a1b
Show file tree
Hide file tree
Showing 787 changed files with 16,981 additions and 93,644 deletions.
15 changes: 15 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://docs.codecov.com/docs/pull-request-comments#disable-comment
comment: false
# https://docs.codecov.com/docs/commit-status
coverage:
status:
project:
default:
target: auto
threshold: 0%
base: auto
patch:
default:
target: auto
threshold: 0%
base: auto
2 changes: 1 addition & 1 deletion .devcontainer/portability-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ARG SYSTEM_FACTOR="ubuntu-jammy"
ARG PACKAGE_FACTOR="standard"
ARG DOCKER_TARGET="with-system-packages"
ARG DOCKER_TAG="dev"
FROM ghcr.io/sagemath/sage/sage-docker-${SYSTEM_FACTOR}-${PACKAGE_FACTOR}-${DOCKER_TARGET}:${DOCKER_TAG}
FROM ghcr.io/sagemath/sage/sage-${SYSTEM_FACTOR}-${PACKAGE_FACTOR}-${DOCKER_TARGET}:${DOCKER_TAG}
38 changes: 19 additions & 19 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1"
-->
### 📚 Description
<!-- Please provide a concise, informative and self-explanatory title. -->
<!-- Don't put issue numbers in the title. Put it in the Description below. -->
<!-- For example, instead of "Fixes #12345", use "Add a new method to multiply two integers" -->

### :books: Description

<!-- Describe your changes here in detail -->
<!-- Describe your changes here in detail. -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If it resolves an open issue, please link to the issue here. For example "Closes #1337" -->
<!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it appropriately. -->

### 📝 Checklist
### :memo: Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x ]`. -->

- [ ] I have made sure that the title is self-explanatory and the description concisely explains the PR.
- [ ] I have linked an issue or discussion.
- [ ] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### Dependencies
<!-- List all open pull requests that this PR logically depends on -->
<!--
- #xyz: short description why this is a dependency
- #abc: ...
### :hourglass: Dependencies

<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ jobs:
- name: Upload coverage to codecov
if: always() && steps.build.outcome == 'success'
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
11 changes: 9 additions & 2 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python: [3.8, 3.9]
python: ['3.9', '3.10', '3.11']
conda-env: [environment, environment-optional]

steps:
Expand All @@ -41,11 +41,18 @@ jobs:
bash ~/miniconda.sh -b -p $HOME/miniconda
echo "CONDA=$HOME/miniconda" >> $GITHUB_ENV
# Workaround for /~https://github.com/actions/runner-images/issues/6910 / /~https://github.com/conda/conda/issues/12303
- name: Downgrade conda
if: matrix.os == 'ubuntu-latest'
run: |
conda config --set allow_conda_downgrades true
conda install conda=4.12.0 -y
- name: Create conda environment files
run: ./bootstrap-conda

- name: Cache conda packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/conda_pkgs_dir
key:
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/doc-build-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build documentation (PDF)

on:
pull_request:
push:
workflow_dispatch:
# Allow to run manually

concurrency:
# Cancel previous runs of this workflow for the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-docs:
runs-on: ubuntu-latest
# Use "maximal" so that texlive is installed
# Use "fedora-31" for build diversity
container: ghcr.io/sagemath/sage/sage-docker-fedora-31-maximal-with-targets:dev
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Prepare
run: |
apt-get update && apt-get install -y zip
# Reuse built SAGE_LOCAL contained in the Docker image
./bootstrap
./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv --enable-download-from-upstream-url
- name: Build
run: make build V=0 && make doc-pdf
env:
MAKE: make -j2
SAGE_NUM_THREADS: 2
TEXMFHOME: /sage/texmf

- name: Copy docs
run: |
# For some reason the deploy step below cannot find /sage/...
# So copy everything from there to local folder
mkdir -p ./docs
cp -r -L /sage/local/share/doc/sage/pdf/en/* ./docs
# Zip everything for increased performance
zip -r docs-pdf.zip docs
- name: Upload docs
uses: actions/upload-artifact@v3
with:
name: docs-pdf
path: docs-pdf.zip
2 changes: 1 addition & 1 deletion .github/workflows/doc-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# Once /~https://github.com/actions/download-artifact/issues/172 and/or /~https://github.com/actions/download-artifact/issues/60 is implemented, we can use the official download-artifact action
# For now use the solution from https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow
- name: Download docs
uses: actions/github-script@v3.1.0
uses: actions/github-script@v6.4.0
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
Expand Down
8 changes: 4 additions & 4 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"description": "Mirror of the Sage https://sagemath.org/ source tree",
"license": "other-open",
"title": "sagemath/sage: 10.0.beta3",
"version": "10.0.beta3",
"title": "sagemath/sage: 10.0.beta6",
"version": "10.0.beta6",
"upload_type": "software",
"publication_date": "2023-03-02",
"publication_date": "2023-03-26",
"creators": [
{
"affiliation": "SageMath.org",
Expand All @@ -15,7 +15,7 @@
"related_identifiers": [
{
"scheme": "url",
"identifier": "/~https://github.com/sagemath/sage/tree/10.0.beta3",
"identifier": "/~https://github.com/sagemath/sage/tree/10.0.beta6",
"relation": "isSupplementTo"
},
{
Expand Down
37 changes: 0 additions & 37 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,42 +80,6 @@ download:
dist: build/make/Makefile
./sage --sdist

pypi-sdists: sage_setup
./sage --sh build/pkgs/sage_conf/spkg-src
./sage --sh build/pkgs/sage_sws2rst/spkg-src
./sage --sh build/pkgs/sage_docbuild/spkg-src
./sage --sh build/pkgs/sage_setup/spkg-src
./sage --sh build/pkgs/sagelib/spkg-src
./sage --sh build/pkgs/sagemath_objects/spkg-src
./sage --sh build/pkgs/sagemath_categories/spkg-src
./sage --sh build/pkgs/sagemath_environment/spkg-src
./sage --sh build/pkgs/sagemath_repl/spkg-src
@echo "Built sdists are in upstream/"

# Ensuring wheels are present, even for packages that may have been installed
# as editable. Until we have better uninstallation of script packages, we
# just remove the timestamps, which will lead to rebuilds of the packages.
PYPI_WHEEL_PACKAGES = sage_sws2rst sage_setup sagemath_environment sagemath_objects sagemath_repl sagemath_categories
pypi-wheels:
for a in $(PYPI_WHEEL_PACKAGES); do \
rm -f venv/var/lib/sage/installed/$$a-*; \
done
for a in $(PYPI_WHEEL_PACKAGES); do \
$(MAKE) SAGE_EDITABLE=no SAGE_WHEELS=yes $$a; \
done
@echo "Built wheels are in venv/var/lib/sage/wheels/"

# sage_docbuild is here, not in PYPI_WHEEL_PACKAGES, because it depends on sagelib
WHEEL_PACKAGES = $(PYPI_WHEEL_PACKAGES) sage_conf sagelib sage_docbuild
wheels:
for a in $(WHEEL_PACKAGES); do \
rm -f venv/var/lib/sage/installed/$$a-*; \
done
for a in $(WHEEL_PACKAGES); do \
$(MAKE) SAGE_EDITABLE=no SAGE_WHEELS=yes $$a; \
done
@echo "Built wheels are in venv/var/lib/sage/wheels/"

###############################################################################
# Cleaning up
###############################################################################
Expand Down Expand Up @@ -380,7 +344,6 @@ list:
@$(MAKE) --silent -f build/make/Makefile SAGE_PKGCONFIG=dummy $@

.PHONY: default build dist install micro_release \
pypi-sdists pypi-wheels wheels \
misc-clean bdist-clean distclean bootstrap-clean maintainer-clean \
test check testoptional testall testlong testoptionallong testallong \
ptest ptestoptional ptestall ptestlong ptestoptionallong ptestallong \
Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<a href="https://sagemath.org"><img src="src/doc/common/themes/sage/static/logo_sagemath_black.svg" height="60" align="right" /></a>
<a href="https://sagemath.org">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="src/doc/common/static/logo_sagemath_white.svg">
<img src="src/doc/common/static/logo_sagemath_black.svg" height="60" align="left">
</picture>
</a>

# Sage: Open Source Mathematical Software

Expand Down Expand Up @@ -394,6 +399,20 @@ in the Installation Guide.
or JupyterLab installation, as described in [section
"Launching SageMath"](https://doc.sagemath.org/html/en/installation/launching.html)
in the installation manual.

Alternative Installation using PyPI
---------------

For installation of `sage` in python using `pip` you need to install `sagemath-standard`. First, activate your python virtual environment and follow these steps:

$ python3 -m pip install sage_conf
$ ls $(sage-config SAGE_SPKG_WHEELS)
$ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl
$ python3 -m pip install sagemath-standard

You need to install `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels, you can install the sage library, `sagemath-standard`.

**NOTE:** You can find `sage` and `sagemath` pip packages but with these packages, you will encounter `ModuleNotFoundError`.

Troubleshooting
---------------
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 10.0.beta3, Release Date: 2023-03-02
SageMath version 10.0.beta6, Release Date: 2023-03-26
45 changes: 44 additions & 1 deletion build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,23 @@ PIP_PACKAGES = @SAGE_PIP_PACKAGES@
# Packages that use the 'script' package build rules
SCRIPT_PACKAGES = @SAGE_SCRIPT_PACKAGES@


# Packages for which we build wheels for PyPI
PYPI_WHEEL_PACKAGES = \
sage_sws2rst \
sage_setup \
sagemath_environment \
sagemath_objects \
sagemath_repl \
sagemath_categories

# sage_docbuild is here, not in PYPI_WHEEL_PACKAGES, because it depends on sagelib
WHEEL_PACKAGES = $(PYPI_WHEEL_PACKAGES) \
sage_conf \
sagelib \
sage_docbuild

# Packages for which build sdists for PyPI
PYPI_SDIST_PACKAGES = $(WHEEL_PACKAGES)

# Generate the actual inst_<pkgname> variables; for each package that is
# actually built this generates a line like:
Expand Down Expand Up @@ -198,6 +214,7 @@ SAGE_I_TARGETS = sagelib doc
# Tell make not to look for files with these names:
.PHONY: all all-sage all-toolchain all-build all-sageruntime \
all-start build-start base toolchain toolchain-deps base-toolchain \
pypi-sdists pypi-wheels wheels \
sagelib \
doc doc-html doc-html-jsmath doc-html-mathjax doc-pdf \
doc-uninstall \
Expand Down Expand Up @@ -418,6 +435,25 @@ list-broken-packages: auditwheel_or_delocate
echo >&2 "$$fix_broken_packages"; \
fi

pypi-sdists: $(PYPI_SDIST_PACKAGES:%=%-sdist)
@echo "Built sdists are in upstream/"

# Ensuring wheels are present, even for packages that may have been installed
# as editable. Until we have better uninstallation of script packages, we
# just remove the timestamps, which will lead to rebuilds of the packages.
pypi-wheels:
for a in $(PYPI_WHEEL_PACKAGES); do \
rm -f $(SAGE_VENV)/var/lib/sage/installed/$$a-*; \
done
$(MAKE_REC) SAGE_EDITABLE=no SAGE_WHEELS=yes $(PYPI_WHEEL_PACKAGES)
@echo "Built wheels are in venv/var/lib/sage/wheels/"

wheels:
for a in $(WHEEL_PACKAGES); do \
rm -f $(SAGE_VENV)/var/lib/sage/installed/$$a-*; \
done
$(MAKE_REC) SAGE_EDITABLE=no SAGE_WHEELS=yes $(WHEEL_PACKAGES)
@echo "Built wheels are in venv/var/lib/sage/wheels/"

#==============================================================================
# Setting SAGE_CHECK... variables
Expand Down Expand Up @@ -711,6 +747,13 @@ $(1)-uninstall: $(1)-$(4)-uninstall

$(1)-clean: $(1)-uninstall

$(1)-sdist: FORCE python_build sage_setup cython
$(AM_V_at) cd '$$(SAGE_ROOT)' && \
. '$$(SAGE_ROOT)/src/bin/sage-src-env-config' && \
. '$$(SAGE_ROOT)/src/bin/sage-env-config' && \
. '$$(SAGE_ROOT)/src/bin/sage-env' && \
'$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-src'

# Recursive tox invocation (note - we do not set the environment here).
# Setting SAGE_SPKG_WHEELS is for the benefit of sagelib's tox.ini
$(1)-tox-%: FORCE
Expand Down
1 change: 0 additions & 1 deletion build/pkgs/_prereq/distros/fedora.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ gcc-c++
# The need for which comes [...] from MPIR's configure script
findutils
which
# Needed for pcre configure, see /~https://github.com/sagemath/sage/issues/29129:
diffutils
# Needed for openssl 3.0
perl-IPC-Cmd
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=b9a6c30f4f1c828ca611527d104643d8c0b89ed9
md5=37a7a99a528efa8a4eea1beff33985db
cksum=1112286999
sha1=c9dfa61ff70a2dceec85ad01fc37ee42232402c0
md5=7479fb53c1b9fd56aea37f83a34cdac3
cksum=3525422540
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a822a2132aa0e85069ec8b6efa48ad6db08cc044
4452928a1a41758883e2f0e3a445b015dfa0e593
18 changes: 18 additions & 0 deletions build/pkgs/cvxpy/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cvxpy: A domain-specific language for modeling convex optimization problems in Python.
======================================================================================

Description
-----------

A domain-specific language for modeling convex optimization problems in Python.

License
-------

Apache License, Version 2.0

Upstream Contact
----------------

https://pypi.org/project/cvxpy/

5 changes: 5 additions & 0 deletions build/pkgs/cvxpy/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=cvxpy-VERSION.tar.gz
sha1=8c87f8f8c2177f917ec2fad7d2b510787ffdf72d
md5=408b0a3140750299207f61de95b4ed6e
cksum=3643150234
upstream_url=https://pypi.io/packages/source/c/cvxpy/cvxpy-VERSION.tar.gz
4 changes: 4 additions & 0 deletions build/pkgs/cvxpy/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$(PYTHON) numpy scipy glpk cvxopt osqp_python ecos_python scs | $(PYTHON_TOOLCHAIN)

----------
All lines of this file are ignored except the first.
Loading

0 comments on commit 2b32a1b

Please sign in to comment.