From 3c9f853fda28f1a7807407de989e2bdf1b24a0fb Mon Sep 17 00:00:00 2001 From: Rafael Vuijk Date: Tue, 11 Aug 2026 11:58:03 +0000 Subject: [PATCH 1/2] Repair the docs build, and bring the quickstart to 2.0.0 The generation had been broken since asc-community/AngouriMath@f0db3eef moved the library up a folder on 2026-01-03. Two places still pointed at the old layout: amsite.fsx published from Sources/AngouriMath/AngouriMath, which no longer exists, so `init` failed outright; and NaiveStaticGenerator read AngouriMath.xml from the same stale path, so the almanac would have been empty even if the publish had succeeded. They have to move together, and each now says so. Two more things stopped it independently of that. The generator targeted net6.0, out of support since November 2024 and no longer present on a current machine. And the workflows used actions/checkout@v2 and actions/setup-dotnet@v1, which GitHub no longer runs -- so the deployment could not have succeeded whatever the paths said. Verified end to end on this commit: `init` then `build` produces 1944 pages, the almanac among them, with Latexize present and the members 2.0 removed absent. The quickstart: - Drops --prerelease. 2.0.0 is a release, and the flag was installing a preview against pages that describe something else. - Removes the MyGet instructions. That feed answers but lists no AngouriMath package, and it was retired in asc-community/AngouriMath#701. - Fixes the F# and notebook hello-world programs, which did not compile: they opened Core and Functions by paths that do not resolve and called `parse` and `differentiate`, which are `parsed` and `derivative`. This was the first program a new F# reader runs. - Fixes the C++ snippet, which had a stray semicolon after its #include and no . - Says which frameworks the package targets, since a net7.0 project now silently resolves netstandard2.0 and loses generic math with it. The C# and F# hello-world blocks carry an amcheck annotation, so a harness compiles and runs them against a build of the library rather than leaving them to a reader to discover. What's new gets its 2.0.0 entry. PackageReleaseNotes sends every NuGet reader to that page, and its newest entry was 1.4-preview.4 marked "in development". --- .github/workflows/build-test.yml | 7 ++- .github/workflows/deployment.yml | 41 +++++-------- README.md | 2 +- amsite.fsx | 5 +- .../NaiveStaticGenerator.csproj | 2 +- src/NaiveStaticGenerator/Program.cs | 4 +- src/content/quickstart/index.html | 58 +++++++++---------- src/content/whatsnew/index.html | 48 ++++++++++++++- 8 files changed, 101 insertions(+), 66 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index e1def1041..bb40096dc 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -12,10 +12,11 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 - - uses: actions/setup-dotnet@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 with: - dotnet-version: "6.0.x" + dotnet-version: '10.x' + dotnet-quality: 'preview' - name: 'Init' run: dotnet fsi amsite.fsx init diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 059ec2166..aa62c93c8 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -9,40 +9,25 @@ on: jobs: deployment: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout - uses: actions/checkout@v2 - - - name: Get .NET 6 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '6.0.x' - include-prerelease: true + uses: actions/checkout@v4 - - name: Get .NET 7 - uses: actions/setup-dotnet@v1 + - name: Get .NET + uses: actions/setup-dotnet@v4 with: - dotnet-version: '7.0.x' - include-prerelease: true - + dotnet-version: '10.x' + dotnet-quality: 'preview' + - name: Initialize - run: | - dotnet fsi amsite.fsx init - + run: dotnet fsi amsite.fsx init + - name: Generate - run: | - dotnet fsi amsite.fsx build - echo 1 && ls /home/runner/work/AngouriMathSite/AngouriMathSite - echo 2 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src - echo 3 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath - echo 4 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath/Sources - echo 5 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath/Sources/AngouriMath - echo 6 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath/Sources/AngouriMath/AngouriMath - echo 7 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath/Sources/AngouriMath/AngouriMath/bin - echo 8 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath/Sources/AngouriMath/AngouriMath/bin/release - echo 9 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath/Sources/AngouriMath/AngouriMath/bin/release/netstandard2.0 - - - uses: JamesIves/github-pages-deploy-action@4.1.4 + run: dotnet fsi amsite.fsx build + + - uses: JamesIves/github-pages-deploy-action@v4 name: Publish on Github Pages with: branch: gh-pages diff --git a/README.md b/README.md index d8cc5396d..c609a5c9d 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ There's a custom generator which wraps the content files with the given template ## Local running -To run the website locally, get [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0) and clone it: +To run the website locally, get [.NET 10](https://dotnet.microsoft.com/download/dotnet/10.0) and clone it: ``` git clone https://github.com/asc-community/AngouriMathSite cd AngouriMathSite diff --git a/amsite.fsx b/amsite.fsx index 8dae27aec..3e201437e 100644 --- a/amsite.fsx +++ b/amsite.fsx @@ -54,7 +54,10 @@ let init () = else git ("." / generatorP) "clone https://github.com/asc-community/AngouriMath AngouriMath" - dotnet ("." / generatorP / "AngouriMath" / "Sources" / "AngouriMath" / "AngouriMath") "publish -c release -o publish-output --framework netstandard2.0" + // The library moved up a folder in asc-community/AngouriMath@f0db3eef (2026-01-03), so + // this was `Sources/AngouriMath/AngouriMath` and had stopped existing. Keep it in step + // with the path NaiveStaticGenerator reads AngouriMath.xml from. + dotnet ("." / generatorP / "AngouriMath" / "Sources" / "AngouriMath") "publish -c release -o publish-output --framework netstandard2.0" if dirExists("." / generatorP / "Yadg.NET") then log "Skipping Yadg.NET cloning..." diff --git a/src/NaiveStaticGenerator/NaiveStaticGenerator.csproj b/src/NaiveStaticGenerator/NaiveStaticGenerator.csproj index 14dfe8f11..abf1a0d21 100644 --- a/src/NaiveStaticGenerator/NaiveStaticGenerator.csproj +++ b/src/NaiveStaticGenerator/NaiveStaticGenerator.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 preview diff --git a/src/NaiveStaticGenerator/Program.cs b/src/NaiveStaticGenerator/Program.cs index 71238f1b6..89343c62b 100644 --- a/src/NaiveStaticGenerator/Program.cs +++ b/src/NaiveStaticGenerator/Program.cs @@ -132,7 +132,9 @@ void GeneratePagesFromDocs() } .Build( DocsParser.Parse( - Path.Combine(GeneratorP, "AngouriMath", "Sources", "AngouriMath", "AngouriMath", "publish-output", "AngouriMath.xml") + // Kept in step with the publish path in amsite.fsx; the library moved up a + // folder in asc-community/AngouriMath@f0db3eef and this had a stale segment. + Path.Combine(GeneratorP, "AngouriMath", "Sources", "AngouriMath", "publish-output", "AngouriMath.xml") ).Build() ); Console.WriteLine($"The number of generated doc pages: {saver.PageSavedCount}"); diff --git a/src/content/quickstart/index.html b/src/content/quickstart/index.html index b7742819f..634bf3e54 100644 --- a/src/content/quickstart/index.html +++ b/src/content/quickstart/index.html @@ -32,22 +32,23 @@

Install for

Install for C#

-
dotnet add package AngouriMath --prerelease
+
dotnet add package AngouriMath

Install for F#

-
dotnet add package AngouriMath.FSharp --prerelease
+
dotnet add package AngouriMath.FSharp

-

Install nightly build

- If you want to use the last version, pushed to master, you will need to add MyGet as a nuget package source: -
https://www.myget.org/F/angourimath/api/v3/index.json
- To add it, run -
dotnet new nugetconfig
-dotnet nuget add source https://www.myget.org/F/angourimath/api/v3/index.json
-dotnet add package AngouriMath --prerelease
+ The current release is 2.0.0, and it changes answers that 1.x got wrong. If you are + coming from 1.3.0 or 1.4.0, read +
BREAKING-CHANGES.md + first: it lists every input whose result is now different, with the old value and the new one. +

+

+ The library targets netstandard2.0, net8.0 and net10.0. + A project on net7.0 resolves the netstandard2.0 asset and loses the + generic-math surface with it, so move to net8.0 or later.

-


@@ -61,19 +62,13 @@

Install fo Now you need to run a special command right in your notebook:

For F#

-
#r "nuget:AngouriMath.Interactive, *-*"
+
#r "nuget:AngouriMath.Interactive"

For C#

-
#r "nuget:AngouriMath, *-*"
+
#r "nuget:AngouriMath"

-

-

Nightly builds

- First, run this command: -
#i "https://www.myget.org/F/angourimath/api/v3/index.json"
- Then you can run the command to install the F# or C# version. -

- + Note, that plotting API is only available in AngouriMath.Interactive.

@@ -229,28 +224,31 @@

Hello, world!

To verify you have everything installed correctly, let us write a simple program, computing a derivative:
C# code:
+
using AngouriMath;
 using System;
 Entity expr = "x + sin(y x)";
 Console.WriteLine(expr);
 Console.WriteLine(expr.Differentiate("x"));
F# code:
-
open Core
-open Functions
-let expr = parse "x + sin(y x)"
+    
+    
open AngouriMath.FSharp.Core
+open AngouriMath.FSharp.Functions
+let expr = parsed "x + sin(y x)"
 printf "%O" expr
 printf "\n"
-printf "%O" (differentiate "x" expr)
+printf "%O" (derivative "x" expr)
Jupyter:
-
#r "nuget:AngouriMath.Interactive, *-*"
-open Core
-open Functions
-let expr = parse "x + sin(y x)"
-differentiate "x" expr
+
#r "nuget:AngouriMath.Interactive"
+open AngouriMath.FSharp.Core
+open AngouriMath.FSharp.Functions
+let expr = parsed "x + sin(y x)"
+derivative "x" expr
C++ code:
-
#include <AngouriMath.h>;
+    
#include <iostream>
+#include <AngouriMath.h>
 AngouriMath::Entity expr = "x + sin(y x)";
-std::cout << expr.Differentiate("x");
+std::cout << expr.Differentiate("x");


diff --git a/src/content/whatsnew/index.html b/src/content/whatsnew/index.html index 289f760c4..c6cd0650d 100644 --- a/src/content/whatsnew/index.html +++ b/src/content/whatsnew/index.html @@ -34,7 +34,53 @@

What's new

--> -
1.4-preview.4 [in development] +
2.0.0 +

+ A major version, so it takes the breaking decisions 1.x could not. Mathematical correctness + comes ahead of backward compatibility here: several of the changes below are a wrong answer + becoming a right one, which still breaks code that depended on the wrong one. + Every input whose result is now different is listed, with both values and why, in + BREAKING-CHANGES.md + — read that before upgrading. +

+ Renames and removals: +

    +
  • Latexise is Latexize, ILatexiseable is ILatexizeable. British spelling is gone from the API.
  • +
  • MathS.Quantum.Factorise is TensorFactorize, one letter away from the unrelated Entity.Factorize before; IsNormalised is IsNormalized.
  • +
  • The 28 members that carried [Obsolete] through 1.x are removed. Each obsolete message named its replacement.
  • +
  • The implicit conversions from Entity[], List<Entity> and (Entity, Entity) to Entity are removed. The list one made every params Entity[] overload in the library uncallable with a list.
  • +
  • Minusf's fields are named for the right operands at last: it was Subtrahend - Minuend.
  • +
  • Target frameworks are netstandard2.0, net8.0 and net10.0; net7.0 is gone.
  • +
+ Answers that changed because they were wrong: +
    +
  • sqrt(x^2) and sqrt(-x) are left as written rather than becoming x and i*sqrt(x), which were wrong for negative x.
  • +
  • Numbers below 1e-16 are kept instead of being rounded to 0.
  • +
  • -7 % 3 is 2: mod takes the sign of the divisor, as mathematicians, SymPy, Mathematica and Maxima all have it.
  • +
  • abs(x) = -1 is the empty set, not a set of numbers that do not satisfy it.
  • +
  • An identity equation solves to all of CC; a numeric root set has one root per root rather than one per starting point.
  • +
  • A quadratic inequality with a symbolic coefficient is right for either sign of it.
  • +
  • Many limits that answered NaN — "this does not exist" — now give the value, or say honestly that they could not settle it.
  • +
  • What Stringize prints parses back into the expression it printed. It did not for powers, lambdas, applications, piecewises, or complex numbers with a fractional imaginary part.
  • +
+ New: +
    +
  • floor, ceil, round, min, max and gcd are functions rather than parse errors. round is half to even.
  • +
  • A transformation layer: Simplify, Expand, Factorize, Differentiate, Integrate and Limit are adapters over a Transformation that carries what it claims about its output and how well justified the claim is. Rewrites can be recorded.
  • +
  • Boolean minimisation, quantum states with tensor factorisation, and a much stronger limit and integration pipeline.
  • +
  • A syntax reference and an exception reference in the repository.
  • +
  • Assembly version is pinned at 2.0.0.0 for the whole of 2.x, so every 2.x release is a drop-in replacement for a signed-assembly consumer.
  • +
+ Gone: +
    +
  • The MyGet per-push feed. Releases publish to NuGet; remove the feed from your NuGet.Config if you had it.
  • +
+

+
+ +
+ +
1.4-preview.4

Kernel functional and C#:

    From 5d555d021786ddbb93715dd36745a90b7af14f1b Mon Sep 17 00:00:00 2001 From: Rafael Vuijk Date: Tue, 11 Aug 2026 12:02:00 +0000 Subject: [PATCH 2/2] Clear the read-only bit before deleting a git clone uninit deletes the AngouriMath, Yadg.NET and wiki clones, and git marks the files under .git/objects/pack read-only. Directory.Delete refuses a read-only file on Windows, so uninit failed there with UnauthorizedAccessException on a pack .idx -- the only red leg of the matrix, with init, build and clean all passing. --- amsite.fsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/amsite.fsx b/amsite.fsx index 3e201437e..30ea050c3 100644 --- a/amsite.fsx +++ b/amsite.fsx @@ -22,6 +22,12 @@ let dirExists path = let dirDelete path = try + // What `uninit` deletes are git clones, and git marks the files under + // .git/objects/pack read-only. Directory.Delete refuses a read-only file on + // Windows, so the attribute has to come off first -- otherwise uninit fails with + // UnauthorizedAccessException on a pack .idx, which is what it did. + for file in Directory.EnumerateFiles(path, "*", SearchOption.AllDirectories) do + File.SetAttributes(file, FileAttributes.Normal) Directory.Delete(path, true) with | :? Exception as e ->