Skip to content

CI: Add integration testing with the Python interface passagemath-macaulay2 #3827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

mkoeppe
Copy link

@mkoeppe mkoeppe commented May 16, 2025

https://github.com/passagemath/ is my pip-installable modularized fork of SageMath.

Here I propose adding a CI for integration testing with passagemath-macaulay2.

  • preview: https://github.com/passagemath/M2/actions/runs/15061908487/job/42802455060
  • The workflow consists of two jobs and currently takes about 45 minutes; I hope to make it faster later by using more of the prebuilt packages from the Macaulay2 ppa. (These changes will take place in the passagemath repository.)
  • The workflow is configured to run only when a (release) tag is pushed to the repository. It can also be invoked manually using a workflow request.

See also:

@mkoeppe

This comment was marked as resolved.

@mkoeppe
Copy link
Author

mkoeppe commented May 23, 2025

@mahrud
Copy link
Member

mahrud commented May 24, 2025

I see SAGE_CHECK_PACKAGES="sagemath_macaulay2" in the logs, and both:

2025-05-23T18:35:54.5768810Z   [macaulay2-git] successfully installed (real 11m4.774s user 16m44.695s sys 1m14.982s).
2025-05-23T18:49:58.4187241Z   [sagemath_macaulay2-10.5.38] successfully installed (real 0m49.793s user 0m37.577s sys 0m7.385s).

Several questions:

  1. What's the difference between macaulay2 and sagemath_macaulay2 packages?
  2. What does installing entail? Does it generate documentation, check any tests, or produce any artifacts? Why does one take 11min to install and the other 50sec?
  3. Why does the workflow take ~45 minutes if all it's doing (after installing various ubuntu packages) is install two sage packages?

Here are the lines relevant to M2:

$ grep -i macaulay2 job-logs.txt
2025-05-23T18:05:07.5012939Z Complete job name: passagemath-macaulay2 / linux (ubuntu-noble-macaulay2_daily, minimal)
2025-05-23T18:05:07.5903665Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:05:07.5906115Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:05:07.5910779Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:05:07.6213185Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:05:07.6215654Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:05:07.6220109Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:05:07.6974211Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:05:07.6976543Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:05:07.6980894Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:06:07.4336870Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:06:07.4337469Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:06:07.4338635Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:06:07.4735123Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:06:07.4735948Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:06:07.4737291Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:06:57.3855291Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:06:57.3856191Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:06:57.3857332Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:06:58.1779606Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:06:58.1780218Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:06:58.1781558Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:08:02.4978908Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:08:02.4979544Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:08:02.4980922Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:08:02.5065739Z + sage-package create macaulay2 --version git --tarball macaulay2-git.tar.gz --type=optional
2025-05-23T18:08:02.6155323Z Creating build/pkgs/macaulay2
2025-05-23T18:08:02.6658366Z + cd ../build/pkgs/macaulay2/patches
2025-05-23T18:08:02.6659008Z update-pkgs.sh: line 2: cd: ../build/pkgs/macaulay2/patches: No such file or directory
2025-05-23T18:08:03.1703562Z  ENV SAGE_CHECK_PACKAGES="!cython,!python3,!cysignals,!linbox,!ppl,!cmake,!rpy2,!sage_sws2rst,!sagemath_bliss,!sagemath_brial,!sagemath_buckygen,!sagemath_categories,!sagemath_cddlib,!sagemath_cliquer,!sagemath_combinat,!sagemath_coxeter3,!sagemath_doc_html,!sagemath_doc_pdf,!sagemath_eclib,!sagemath_environment,!sagemath_flint,!sagemath_frobby,!sagemath_gap,!sagemath_gfan,!sagemath_giac,!sagemath_glpk,!sagemath_graphs,!sagemath_groups,!sagemath_homfly,!sagemath_latte_4ti2,!sagemath_lcalc,!sagemath_libbraiding,!sagemath_libecm,!sagemath_linbox,!sagemath_lrslib,!sagemath_macaulay2,!sagemath_mcqd,!sagemath_meataxe,!sagemath_modules,!sagemath_mpmath,!sagemath_msolve,!sagemath_nauty,!sagemath_ntl,!sagemath_objects,!sagemath_palp,!sagemath_pari,!sagemath_planarity,!sagemath_plantri,!sagemath_plot,!sagemath_polyhedra,!sagemath_qepcad,!sagemath_rankwidth,!sagemath_repl,!sagemath_rubiks,!sagemath_schemes,!sagemath_singular,!sagemath_sirocco,!sagemath_standard_no_symbolics,!sagemath_symbolics,!sagemath_sympow,!sagemath_tdlib,!sagemath_topcom"
2025-05-23T18:08:03.1896953Z diff --git a/build/pkgs/macaulay2/checksums.ini b/build/pkgs/macaulay2/checksums.ini
2025-05-23T18:08:03.1897730Z --- a/build/pkgs/macaulay2/checksums.ini
2025-05-23T18:08:03.1897992Z +++ b/build/pkgs/macaulay2/checksums.ini
2025-05-23T18:08:03.1899558Z -upstream_url=https://github.com/Macaulay2/M2/archive/refs/tags/release-VERSION.tar.gz
2025-05-23T18:08:03.1899960Z +tarball=macaulay2-git.tar.gz
2025-05-23T18:08:03.1901123Z diff --git a/build/pkgs/macaulay2/package-version.txt b/build/pkgs/macaulay2/package-version.txt
2025-05-23T18:08:03.1901823Z --- a/build/pkgs/macaulay2/package-version.txt
2025-05-23T18:08:03.1902103Z +++ b/build/pkgs/macaulay2/package-version.txt
2025-05-23T18:08:03.5819600Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:08:03.5820204Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:08:03.5821771Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:08:03.6134456Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:08:03.6135073Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:08:03.6136436Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:08:03.6140475Z   EXTRA_DOCKER_TAGS: ci-passagemath-macaulay2
2025-05-23T18:08:03.6285995Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:08:03.6286598Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:08:03.6287917Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:08:03.6291890Z   EXTRA_DOCKER_TAGS: ci-passagemath-macaulay2
2025-05-23T18:08:04.4659804Z docker-ubuntu-noble-macaulay2_daily-minimal: freeze> python -m pip freeze --all
2025-05-23T18:08:05.3362909Z docker-ubuntu-noble-macaulay2_daily-minimal: pip==24.0
2025-05-23T18:08:05.3423271Z docker-ubuntu-noble-macaulay2_daily-minimal: commands[0]> bash -c 'export PATH="build/bin:$PATH" && BUILD_TAG=2b11b275d80-dirty .ci/write-dockerfile.sh debian "_prereq" yes yes "_bootstrap      gdbm git libxml2 gfortran cmake python3 openblas zlib readline sqlite libpng bzip2 liblzma libffi openssl 4ti2 fflas_ffpack boost_cropped cddlib givaro glpk gmp mpc mpfi mpfr ncurses ntl readline lrslib normaliz topcom gfan frobby nauty libnauty flint onetbb googletest mpsolve msolve eigen gc ninja_build curl gsl libatomic_ops tox libgd m4ri m4rie iml" > /home/runner/work/M2/M2/.tox/docker-ubuntu-noble-macaulay2_daily-minimal/Dockerfile'
2025-05-23T18:08:05.6496989Z docker-ubuntu-noble-macaulay2_daily-minimal: commands[1]> bash -c 'if [ x"" != x ]; then mkdir -p /home/runner/work/M2/M2/.tox/docker-ubuntu-noble-macaulay2_daily-minimal/.docker && ln -sf $(realpath "") /home/runner/work/M2/M2/.tox/docker-ubuntu-noble-macaulay2_daily-minimal/.docker/; fi'
2025-05-23T18:08:05.6542559Z docker-ubuntu-noble-macaulay2_daily-minimal: commands[2]> bash -c 'for docker_target in with-targets; do BUILD_IMAGE_STEM=sage-$(echo docker-ubuntu-noble-macaulay2_daily-minimal | sed "s/docker-//;s/-incremental//"); BUILD_IMAGE=$DOCKER_PUSH_REPOSITORY$BUILD_IMAGE_STEM-$docker_target; BUILD_TAG=2b11b275d80-dirty; TAG_ARGS=$(for tag in $BUILD_TAG ci-passagemath-macaulay2; do echo --tag $BUILD_IMAGE:$tag; done); DOCKER_BUILDKIT=1; docker build . -f /home/runner/work/M2/M2/.tox/docker-ubuntu-noble-macaulay2_daily-minimal/Dockerfile --target $docker_target $TAG_ARGS --build-arg TARGETS_PRE="$(if test -n "$TARGETS_PRE"; then echo $TARGETS_PRE; else echo SAGE_CHECK=no SAGE_CHECK_PACKAGES=sagemath_macaulay2 sagemath_macaulay2; fi)" --build-arg TARGETS="SAGE_CHECK=no SAGE_CHECK_PACKAGES=sagemath_macaulay2 sagemath_macaulay2" --build-arg TARGETS_OPTIONAL="build/make/Makefile" --build-arg NUMPROC=9 --build-arg USE_MAKEFLAGS="-k V=0 SAGE_NUM_THREADS=5"; status=$?; unset CONTAINER; if [ $status != 0 ]; then if [ $DOCKER_BUILDKIT = 0 ]; then BUILD_TAG="$BUILD_TAG-failed"; CONTAINER=$(docker ps -l -q); docker commit $CONTAINER $BUILD_IMAGE:$BUILD_TAG; else unset BUILD_TAG; echo "DOCKER_BUILDKIT=1, so we cannot commit and tag the failed image"; fi; fi; if [ -n "$BUILD_TAG" ]; then echo "Copying logs from the container to /home/runner/work/M2/M2/.tox/docker-ubuntu-noble-macaulay2_daily-minimal/sage/"; rm -f /home/runner/work/M2/M2/.tox/docker-ubuntu-noble-macaulay2_daily-minimal/sage/STATUS; docker run $BUILD_IMAGE:$BUILD_TAG bash -c " tar -c --ignore-failed-read -f - /sage/STATUS /sage/logs /sage/{prefix,venv}/var/lib/sage/installed ~/.sage/timings2.json /sage/pkgs/*/.tox/*/.sage/timings2.json /sage/pkgs/*/.tox/*/logs 2> /dev/null" | (cd /home/runner/work/M2/M2/.tox/docker-ubuntu-noble-macaulay2_daily-minimal && tar xf -); if [ -f /home/runner/work/M2/M2/.tox/docker-ubuntu-noble-macaulay2_daily-minimal/sage/STATUS ]; then status=$(cat /home/runner/work/M2/M2/.tox/docker-ubuntu-noble-macaulay2_daily-minimal/sage/STATUS); fi; fi; unset PUSH_TAGS; if [ -n "$BUILD_TAG" ]; then if [ $status != 0 ]; then BUILD_TAG="${BUILD_TAG%-failed}-failed"; PUSH_TAGS=$BUILD_IMAGE:$BUILD_TAG; else PUSH_TAGS=$(echo $BUILD_IMAGE:$BUILD_TAG; for tag in ci-passagemath-macaulay2; do echo "$BUILD_IMAGE:$tag"; done); fi; echo $BUILD_IMAGE:$BUILD_TAG >> /home/runner/work/M2/M2/.tox/docker-ubuntu-noble-macaulay2_daily-minimal/Dockertags; fi; if [ x"" != x -a x"$PUSH_TAGS" != x ]; then echo Pushing $PUSH_TAGS; for tag in $PUSH_TAGS; do if docker push $tag; then echo $tag >> /home/runner/work/M2/M2/.tox/docker-ubuntu-noble-macaulay2_daily-minimal/Dockertags.pushed; else echo "(ignoring errors)"; fi; done; fi; if [ $status != 0 ]; then exit $status; fi; done'
2025-05-23T18:08:43.1012521Z #9 [with-system-packages 4/5] RUN  add-apt-repository ppa:profzoom/macaulay2
2025-05-23T18:08:45.8186001Z Get:5 https://ppa.launchpadcontent.net/profzoom/macaulay2/ubuntu noble InRelease [24.3 kB]
2025-05-23T18:08:46.0011821Z Get:6 https://ppa.launchpadcontent.net/profzoom/macaulay2/ubuntu noble/main amd64 Packages [1475 B]
2025-05-23T18:08:46.8909950Z URIs: https://ppa.launchpadcontent.net/profzoom/macaulay2/ubuntu/
2025-05-23T18:08:46.8911574Z Daily builds of the Macaulay2 development branch
2025-05-23T18:08:46.8912198Z More info: https://launchpad.net/~profzoom/+archive/ubuntu/macaulay2
2025-05-23T18:08:47.3837633Z Hit:5 https://ppa.launchpadcontent.net/profzoom/macaulay2/ubuntu noble InRelease
2025-05-23T18:11:03.9327710Z ./bootstrap: installing /sage/pkgs/sagemath-macaulay2/pyproject.toml
2025-05-23T18:11:03.9328176Z ./bootstrap: installing /sage/pkgs/sagemath-macaulay2/requirements-editable.txt
2025-05-23T18:11:25.3845184Z macaulay2:                      optional, use "./configure --enable-macaulay2" to install SPKG version git
2025-05-23T18:11:26.8316550Z sagemath_macaulay2:             optional, use "./configure --enable-sagemath_macaulay2" to install SPKG version 10.5.38
2025-05-23T18:12:05.7538489Z #32 [with-targets 4/4] RUN make SAGE_SPKG="sage-spkg -y -o" -k V=0 SAGE_NUM_THREADS=5 SAGE_CHECK=no SAGE_CHECK_PACKAGES=sagemath_macaulay2 sagemath_macaulay2
2025-05-23T18:12:06.0031757Z 	"cd build/make && ./install 'sagemath_macaulay2'" logs/install.log
2025-05-23T18:24:49.5919355Z make --no-print-directory macaulay2-SAGE_LOCAL-no-deps
2025-05-23T18:24:49.7880685Z [macaulay2-git] installing. Log file: /sage/logs/pkgs/macaulay2-git.log
2025-05-23T18:35:54.5768810Z   [macaulay2-git] successfully installed (real 11m4.774s user 16m44.695s sys 1m14.982s).
2025-05-23T18:49:08.4238395Z make --no-print-directory sagemath_macaulay2-SAGE_VENV-no-deps
2025-05-23T18:49:08.6231908Z [sagemath_macaulay2-10.5.38] installing. Log file: /sage/logs/pkgs/sagemath_macaulay2-10.5.38.log
2025-05-23T18:49:58.4187241Z   [sagemath_macaulay2-10.5.38] successfully installed (real 0m49.793s user 0m37.577s sys 0m7.385s).
2025-05-23T18:50:26.7464432Z #33 naming to docker.io/library/sage-ubuntu-noble-macaulay2_daily-minimal-with-targets:2b11b275d80-dirty done
2025-05-23T18:50:26.7465917Z #33 naming to docker.io/library/sage-ubuntu-noble-macaulay2_daily-minimal-with-targets:ci-passagemath-macaulay2 done
2025-05-23T18:50:26.7507799Z Copying logs from the container to /home/runner/work/M2/M2/.tox/docker-ubuntu-noble-macaulay2_daily-minimal/sage/
2025-05-23T18:50:27.3301033Z   docker-ubuntu-noble-macaulay2_daily-minimal: OK (2543.11=setup[1.13]+cmd[0.31,0.00,2541.68] seconds)
2025-05-23T18:50:32.4192300Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:50:32.4192905Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:50:32.4194070Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:50:32.4198375Z   EXTRA_DOCKER_TAGS: ci-passagemath-macaulay2
2025-05-23T18:50:32.5148518Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:50:32.5149135Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:50:32.5150286Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:50:32.5154276Z   EXTRA_DOCKER_TAGS: ci-passagemath-macaulay2
2025-05-23T18:50:32.8344037Z   TOX_ENV: docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:50:32.8344702Z   LOGS_ARTIFACT_NAME: logs-commit-c82dc41cccbe3591e0eb04a5f9a91c02d7143ac7-tox-docker-ubuntu-noble-macaulay2_daily-minimal
2025-05-23T18:50:32.8346085Z   TARGETS: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
2025-05-23T18:50:32.8350247Z   EXTRA_DOCKER_TAGS: ci-passagemath-macaulay2

@mkoeppe
Copy link
Author

mkoeppe commented May 24, 2025

Several questions:

  1. What's the difference between macaulay2 and sagemath_macaulay2 packages?

macaulay2 is M2.

sagemath_macaulay2 is a Python package that ships one module, an interface to M2 using pseudo-terminals. See https://github.com/passagemath/passagemath/tree/main/pkgs/sagemath-macaulay2

  1. What does installing entail?

macaulay2: It runs this script to build M2 from source using the cmake build system and install it in the system. https://github.com/passagemath/passagemath/blob/main/build/pkgs/macaulay2/spkg-install.in

sagemath_macaulay: It builds and install a wheel.

Does it generate documentation, check any tests, or produce any artifacts?

macaulay2: I'm not sure if it builds documentation. It does not currently run any of M2's tests. I'll be happy to add that (pointers welcome).

sagemath_macaulay2: It runs doctests for the interface, defined in Python.

The GH Actions workflow can be configured to push a Docker image with the completed build for inspection to ghcr.io. It is currently not configured that way.

The GH Actions workflow can also be configured to create an Artifact with the complete build logs. It is currently not configured that way.

Why does one take 11min to install and the other 50sec?

The Python package build is trivial, and the tests are very quick.

  1. Why does the workflow take ~45 minutes if all it's doing (after installing various ubuntu packages) is install two sage packages?

The remaining 35 minutes are spent on building prerequisites from source.

@mahrud
Copy link
Member

mahrud commented May 25, 2025

The remaining 35 minutes are spent on building prerequisites from source.

Others may disagree and chime in here, but I'm not sure if this repository is the right place to run an action that includes building anything other than M2 from source. For me, two kinds of integration tests make sense:

  • during passagemath repository's test builds, build passagemath from source, install M2 from homebrew or PPA, install the passagemath_macaulay2 module and run its tests
  • during M2 repository's test builds, build M2 from source, install passagemath using pipx, install the passagemath_macaulay2 module and run its tests.

For instance, Macaulay2 has a Python package and in each actions build we test that it works, but we don't build Python from source to do so.


On another note, while it's your prerogative to do so, I don't think distributing a prebuilt copy of M2-binary in the macaulay2 package of passagemath is a great idea (imagine Macaulay2 distributing a prebuilt copy of Python ...). After all, it's not a "modular" approach to distributing software, and the documentation of Sage's interface to Macaulay2 also notes:

You must have Macaulay2 installed on your computer for this interface to work. Macaulay2 is not included with Sage, but you can obtain it from https://macaulay2.com/. No additional optional Sage packages are required.

@mkoeppe
Copy link
Author

mkoeppe commented May 25, 2025

the documentation of Sage's interface to Macaulay2 also notes:

You must have Macaulay2 installed on your computer for this interface to work. Macaulay2 is not included with Sage, but you can obtain it from https://macaulay2.com/. No additional optional Sage packages are required.

Well, this documentation that you quote describes the interface that has been part of Sage for 20 years. And this approach to integration has greatly limited its use in the past.

@mkoeppe
Copy link
Author

mkoeppe commented May 25, 2025

(imagine Macaulay2 distributing a prebuilt copy of Python ...)

I just imagined it, and nothing bad happened. Care to elaborate?

@mkoeppe
Copy link
Author

mkoeppe commented May 25, 2025

The remaining 35 minutes are spent on building prerequisites from source.

Others may disagree and chime in here, but I'm not sure if this repository is the right place to run an action that includes building anything other than M2 from source. For me, two kinds of integration tests make sense:

  • during passagemath repository's test builds, build passagemath from source, install M2 from homebrew or PPA, install the passagemath_macaulay2 module and run its tests
  • during M2 repository's test builds, build M2 from source, install passagemath using pipx, install the passagemath_macaulay2 module and run its tests.

With these comments, which problem are you trying to address? Are you just concerned about the running time of the build, or something different?

@mkoeppe
Copy link
Author

mkoeppe commented May 25, 2025

For instance, Macaulay2 has a Python package and in each actions build we test that it works, but we don't build Python from source to do so.

Well, what if you did? Do you feel that it would invalidate the integration test, or would it just be more costly?

@mkoeppe
Copy link
Author

mkoeppe commented Jun 10, 2025

  • Goal is for the binary wheels of passagemath-macaulay2 to ship a prebuilt copy of Macaulay2, for the convenience of Python users.

Binary wheels are now available, shipping Macaulay2 1.25.06. https://pypi.org/project/passagemath-macaulay2/#files

@mkoeppe
Copy link
Author

mkoeppe commented Jun 10, 2025

Some next steps, collaboration most welcome:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants