Skip to content

Commit

Permalink
Merge pull request #3226 from mahrud/quickfix/stuff
Browse files Browse the repository at this point in the history
Assorted changes and updates
  • Loading branch information
DanGrayson authored May 14, 2024
2 parents 7df3eb4 + 00985e0 commit 4632d89
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 17 deletions.
4 changes: 2 additions & 2 deletions M2/BUILD/docker/testbot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# Net usage: <200MB
# Disk usage: <700MB

FROM debian:bullseye
FROM debian:bookworm

# Setup the system
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates debian-keyring git && apt-get clean

# Install Macaulay2
RUN echo "deb [signed-by=/usr/share/keyrings/debian-maintainers.gpg] https://people.debian.org/~dtorrance/debian bullseye/" >> /etc/apt/sources.list && apt-get update && apt-get install -y --no-install-recommends macaulay2 && apt-get clean
RUN echo "deb [signed-by=/usr/share/keyrings/debian-keyring.gpg] https://people.debian.org/~dtorrance/debian bookworm/" >> /etc/apt/sources.list && apt-get update && apt-get install -y --no-install-recommends macaulay2 4ti2 cohomcalg coinor-csdp gfan nauty normaliz topcom && apt-get clean

# Add non-root user for using Macaulay2
RUN useradd -G sudo -g root -u 1000 -m macaulay && echo "macaulay ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
Expand Down
2 changes: 1 addition & 1 deletion M2/BUILD/docker/testbot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include ../Makefile

## Parameters
TAG = macaulay2
GHTAG = ghcr.io/mahrud/macaulay2:latest
GHTAG = ghcr.io/macaulay2/testbot:latest

tag:; docker tag $(TAG) $(GHTAG)
push:; docker push $(GHTAG)
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
restart
importFrom_Core {"markdown"}

ver = "1.17"
illinois = "https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2-" | ver | "/share"
ver = version#"VERSION"
page = "changes, " | ver
addr = "https://www.macaulay2.com/doc/Macaulay2-" | ver | "/share"

changelog = markdown help("changes, " | ver);
changelog = replace("/home/.*?/common/share", illinois, changelog);
changelog = replace("common/share", illinois, changelog);
changelog = replace("https://faculty.math.illinois.edu", "http://www2.macaulay2.com", changelog);
changelog = markdown help page;
changelog = replace("/home/.*?/share", addr, changelog);
changelog = replace("common/share", addr, changelog);
("changelog-" | ver | ".md") << changelog << close


restart
importFrom_Core { "markdown", "TO", "TT", "IMG", "HREF" };
X = help "packages provided with Macaulay2";
Expand Down
4 changes: 1 addition & 3 deletions M2/Macaulay2/d/actors5.d
Original file line number Diff line number Diff line change
Expand Up @@ -2122,9 +2122,7 @@ showtimefun(a:Code):Expr := (
ret);
setupop(timeS,showtimefun);

header "
extern void set_gftable_dir(char *); /* defined in library factory, as patched by us */
";
header "extern void set_gftable_dir(char *); /* defined in library factory, as patched by us */";
setFactoryGFtableDirectory(e:Expr):Expr := (
when e is d:stringCell do (
Ccode(void,"set_gftable_dir(", tocharstar(d.v), ")");
Expand Down
1 change: 1 addition & 0 deletions M2/Macaulay2/d/arithmetic.d
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-- Copyright 1994-2006,2010 by Daniel R. Grayson

export nothing := void();
export size_t := integerType "size_t";
export uchar := integerType "unsigned char";
export short := integerType "short";
export ushort := integerType "unsigned short";
Expand Down
7 changes: 3 additions & 4 deletions M2/Macaulay2/m2/matrix2.m2
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,9 @@ indices RingElement := (f) -> rawIndices raw f
indices Matrix := (f) -> rawIndices raw f

support = method()
support RingElement := support Matrix := (f) -> (
x := rawIndices raw f;
apply(x, i -> (ring f)_i))
support Ideal := (I) -> rsort toList sum apply(flatten entries generators I, f -> set support f)
support RingElement :=
support Matrix := f -> apply(try rawIndices raw f else {}, i -> (ring f)_i)
support Ideal := I -> support generators I
--------------------
-- homogenization --
--------------------
Expand Down
5 changes: 5 additions & 0 deletions M2/Macaulay2/tests/normal/support.m2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
R = QQ[x,y,z,w]
assert(support ideal"x,xy,xy-zw" == R_*)
assert(support ideal() == {})
assert(support id_(ZZ^3) == {})

0 comments on commit 4632d89

Please sign in to comment.