Skip to content

Commit 72574e3

Browse files
Repair the docs build, and bring the quickstart to 2.0.0 (#32)
* 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 <iostream>. - 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". * 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.
1 parent fc78164 commit 72574e3

8 files changed

Lines changed: 107 additions & 66 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313

1414
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-dotnet@v1
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-dotnet@v4
1717
with:
18-
dotnet-version: "6.0.x"
18+
dotnet-version: '10.x'
19+
dotnet-quality: 'preview'
1920

2021
- name: 'Init'
2122
run: dotnet fsi amsite.fsx init

.github/workflows/deployment.yml

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,25 @@ on:
99
jobs:
1010
deployment:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
1214
steps:
1315
- name: Checkout
14-
uses: actions/checkout@v2
15-
16-
- name: Get .NET 6
17-
uses: actions/setup-dotnet@v1
18-
with:
19-
dotnet-version: '6.0.x'
20-
include-prerelease: true
16+
uses: actions/checkout@v4
2117

22-
- name: Get .NET 7
23-
uses: actions/setup-dotnet@v1
18+
- name: Get .NET
19+
uses: actions/setup-dotnet@v4
2420
with:
25-
dotnet-version: '7.0.x'
26-
include-prerelease: true
27-
21+
dotnet-version: '10.x'
22+
dotnet-quality: 'preview'
23+
2824
- name: Initialize
29-
run: |
30-
dotnet fsi amsite.fsx init
31-
25+
run: dotnet fsi amsite.fsx init
26+
3227
- name: Generate
33-
run: |
34-
dotnet fsi amsite.fsx build
35-
echo 1 && ls /home/runner/work/AngouriMathSite/AngouriMathSite
36-
echo 2 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src
37-
echo 3 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath
38-
echo 4 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath/Sources
39-
echo 5 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath/Sources/AngouriMath
40-
echo 6 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath/Sources/AngouriMath/AngouriMath
41-
echo 7 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath/Sources/AngouriMath/AngouriMath/bin
42-
echo 8 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath/Sources/AngouriMath/AngouriMath/bin/release
43-
echo 9 && ls /home/runner/work/AngouriMathSite/AngouriMathSite/src/AngouriMath/Sources/AngouriMath/AngouriMath/bin/release/netstandard2.0
44-
45-
- uses: JamesIves/github-pages-deploy-action@4.1.4
28+
run: dotnet fsi amsite.fsx build
29+
30+
- uses: JamesIves/github-pages-deploy-action@v4
4631
name: Publish on Github Pages
4732
with:
4833
branch: gh-pages

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ There's a custom generator which wraps the content files with the given template
1010

1111
## Local running
1212

13-
To run the website locally, get [.NET 6](https://dotnet.microsoft.com/download/dotnet/6.0) and clone it:
13+
To run the website locally, get [.NET 10](https://dotnet.microsoft.com/download/dotnet/10.0) and clone it:
1414
```
1515
git clone https://github.com/asc-community/AngouriMathSite
1616
cd AngouriMathSite

amsite.fsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ let dirExists path =
2222

2323
let dirDelete path =
2424
try
25+
// What `uninit` deletes are git clones, and git marks the files under
26+
// .git/objects/pack read-only. Directory.Delete refuses a read-only file on
27+
// Windows, so the attribute has to come off first -- otherwise uninit fails with
28+
// UnauthorizedAccessException on a pack .idx, which is what it did.
29+
for file in Directory.EnumerateFiles(path, "*", SearchOption.AllDirectories) do
30+
File.SetAttributes(file, FileAttributes.Normal)
2531
Directory.Delete(path, true)
2632
with
2733
| :? Exception as e ->
@@ -54,7 +60,10 @@ let init () =
5460
else
5561
git ("." / generatorP) "clone https://github.com/asc-community/AngouriMath AngouriMath"
5662

57-
dotnet ("." / generatorP / "AngouriMath" / "Sources" / "AngouriMath" / "AngouriMath") "publish -c release -o publish-output --framework netstandard2.0"
63+
// The library moved up a folder in asc-community/AngouriMath@f0db3eef (2026-01-03), so
64+
// this was `Sources/AngouriMath/AngouriMath` and had stopped existing. Keep it in step
65+
// with the path NaiveStaticGenerator reads AngouriMath.xml from.
66+
dotnet ("." / generatorP / "AngouriMath" / "Sources" / "AngouriMath") "publish -c release -o publish-output --framework netstandard2.0"
5867

5968
if dirExists("." / generatorP / "Yadg.NET") then
6069
log "Skipping Yadg.NET cloning..."

src/NaiveStaticGenerator/NaiveStaticGenerator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<LangVersion>preview</LangVersion>
77
</PropertyGroup>
88

src/NaiveStaticGenerator/Program.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ void GeneratePagesFromDocs()
132132
}
133133
.Build(
134134
DocsParser.Parse(
135-
Path.Combine(GeneratorP, "AngouriMath", "Sources", "AngouriMath", "AngouriMath", "publish-output", "AngouriMath.xml")
135+
// Kept in step with the publish path in amsite.fsx; the library moved up a
136+
// folder in asc-community/AngouriMath@f0db3eef and this had a stale segment.
137+
Path.Combine(GeneratorP, "AngouriMath", "Sources", "AngouriMath", "publish-output", "AngouriMath.xml")
136138
).Build()
137139
);
138140
Console.WriteLine($"The number of generated doc pages: {saver.PageSavedCount}");

src/content/quickstart/index.html

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,23 @@ <h3 class="centered"><a name="dotnet" href="#dotnet" class="anchor">Install for
3232
<br>
3333
<p>
3434
<h4>Install for C#</h4>
35-
<pre><code>dotnet add package AngouriMath --prerelease</code></pre>
35+
<pre><code>dotnet add package AngouriMath</code></pre>
3636
</p>
3737
<p>
3838
<h4>Install for F#</h4>
39-
<pre><code>dotnet add package AngouriMath.FSharp --prerelease</code></pre>
39+
<pre><code>dotnet add package AngouriMath.FSharp</code></pre>
4040
</p>
4141
<p>
42-
<h4>Install nightly build</h4>
43-
If you want to use the last version, pushed to master, you will need to add MyGet as a nuget package source:
44-
<pre><code>https://www.myget.org/F/angourimath/api/v3/index.json</code></pre>
45-
To add it, run
46-
<pre><code>dotnet new nugetconfig
47-
dotnet nuget add source https://www.myget.org/F/angourimath/api/v3/index.json
48-
dotnet add package AngouriMath --prerelease</code></pre>
42+
The current release is <b>2.0.0</b>, and it changes answers that 1.x got wrong. If you are
43+
coming from 1.3.0 or 1.4.0, read
44+
<a href="https://github.com/asc-community/AngouriMath/blob/master/BREAKING-CHANGES.md">BREAKING-CHANGES.md</a>
45+
first: it lists every input whose result is now different, with the old value and the new one.
46+
</p>
47+
<p>
48+
The library targets <code>netstandard2.0</code>, <code>net8.0</code> and <code>net10.0</code>.
49+
A project on <code>net7.0</code> resolves the <code>netstandard2.0</code> asset and loses the
50+
generic-math surface with it, so move to <code>net8.0</code> or later.
4951
</p>
50-
5152
</p>
5253

5354
<br>
@@ -61,19 +62,13 @@ <h3 class="centered"><a name="jupyter" href="#jupyter" class="anchor">Install fo
6162
Now you need to run a special command right in your notebook:
6263
<p>
6364
<h4>For F#</h4>
64-
<pre><code>#r "nuget:AngouriMath.Interactive, *-*"</code></pre>
65+
<pre><code>#r "nuget:AngouriMath.Interactive"</code></pre>
6566
</p>
6667
<p>
6768
<h4>For C#</h4>
68-
<pre><code>#r "nuget:AngouriMath, *-*"</code></pre>
69+
<pre><code>#r "nuget:AngouriMath"</code></pre>
6970
</p>
70-
<p>
71-
<h4>Nightly builds</h4>
72-
First, run this command:
73-
<pre><code>#i "https://www.myget.org/F/angourimath/api/v3/index.json"</code></pre>
74-
Then you can run the command to install the F# or C# version.
75-
</p>
76-
71+
7772
Note, that plotting API is only available in AngouriMath.Interactive.
7873
</p>
7974

@@ -229,28 +224,31 @@ <h3 class="centered">Hello, world!</h3>
229224
To verify you have everything installed correctly, let us write a simple program, computing
230225
a derivative:
231226
<h5>C# code:</h5>
227+
<!-- amcheck:cs -->
232228
<pre><code>using AngouriMath;
233229
using System;
234230
Entity expr = "x + sin(y x)";
235231
Console.WriteLine(expr);
236232
Console.WriteLine(expr.Differentiate("x"));</code></pre>
237233
<h5>F# code:</h5>
238-
<pre><code>open Core
239-
open Functions
240-
let expr = parse "x + sin(y x)"
234+
<!-- amcheck:fs -->
235+
<pre><code>open AngouriMath.FSharp.Core
236+
open AngouriMath.FSharp.Functions
237+
let expr = parsed "x + sin(y x)"
241238
printf "%O" expr
242239
printf "\n"
243-
printf "%O" (differentiate "x" expr)</code></pre>
240+
printf "%O" (derivative "x" expr)</code></pre>
244241
<h5>Jupyter:</h5>
245-
<pre><code>#r "nuget:AngouriMath.Interactive, *-*"
246-
open Core
247-
open Functions
248-
let expr = parse "x + sin(y x)"
249-
differentiate "x" expr</code></pre>
242+
<pre><code>#r "nuget:AngouriMath.Interactive"
243+
open AngouriMath.FSharp.Core
244+
open AngouriMath.FSharp.Functions
245+
let expr = parsed "x + sin(y x)"
246+
derivative "x" expr</code></pre>
250247
<h5>C++ code:</h5>
251-
<pre><code>#include &lt;AngouriMath.h&gt;;
248+
<pre><code>#include &lt;iostream&gt;
249+
#include &lt;AngouriMath.h&gt;
252250
AngouriMath::Entity expr = "x + sin(y x)";
253-
std::cout << expr.Differentiate("x");</code></pre>
251+
std::cout &lt;&lt; expr.Differentiate("x");</code></pre>
254252
</p>
255253
<br>
256254

src/content/whatsnew/index.html

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,53 @@ <h2 class="centered">What's new</h2>
3434
3535
-->
3636

37-
<details><summary><strong>1.4-preview.4 [in development]</strong></summary>
37+
<details open><summary><strong>2.0.0</strong></summary>
38+
<p>
39+
A major version, so it takes the breaking decisions 1.x could not. Mathematical correctness
40+
comes ahead of backward compatibility here: several of the changes below are a wrong answer
41+
becoming a right one, which still breaks code that depended on the wrong one.
42+
<b>Every input whose result is now different is listed, with both values and why, in
43+
<a href="https://github.com/asc-community/AngouriMath/blob/master/BREAKING-CHANGES.md">BREAKING-CHANGES.md</a>
44+
— read that before upgrading.</b>
45+
<br><br>
46+
<strong>Renames and removals:</strong>
47+
<ul>
48+
<li><code>Latexise</code> is <code>Latexize</code>, <code>ILatexiseable</code> is <code>ILatexizeable</code>. British spelling is gone from the API.</li>
49+
<li><code>MathS.Quantum.Factorise</code> is <code>TensorFactorize</code>, one letter away from the unrelated <code>Entity.Factorize</code> before; <code>IsNormalised</code> is <code>IsNormalized</code>.</li>
50+
<li>The 28 members that carried <code>[Obsolete]</code> through 1.x are removed. Each obsolete message named its replacement.</li>
51+
<li>The implicit conversions from <code>Entity[]</code>, <code>List&lt;Entity&gt;</code> and <code>(Entity, Entity)</code> to <code>Entity</code> are removed. The list one made every <code>params Entity[]</code> overload in the library uncallable with a list.</li>
52+
<li><code>Minusf</code>'s fields are named for the right operands at last: it was <code>Subtrahend - Minuend</code>.</li>
53+
<li>Target frameworks are <code>netstandard2.0</code>, <code>net8.0</code> and <code>net10.0</code>; <code>net7.0</code> is gone.</li>
54+
</ul>
55+
<strong>Answers that changed because they were wrong:</strong>
56+
<ul>
57+
<li><code>sqrt(x^2)</code> and <code>sqrt(-x)</code> are left as written rather than becoming <code>x</code> and <code>i*sqrt(x)</code>, which were wrong for negative <code>x</code>.</li>
58+
<li>Numbers below <code>1e-16</code> are kept instead of being rounded to <code>0</code>.</li>
59+
<li><code>-7 % 3</code> is <code>2</code>: <code>mod</code> takes the sign of the divisor, as mathematicians, SymPy, Mathematica and Maxima all have it.</li>
60+
<li><code>abs(x) = -1</code> is the empty set, not a set of numbers that do not satisfy it.</li>
61+
<li>An identity equation solves to all of <code>CC</code>; a numeric root set has one root per root rather than one per starting point.</li>
62+
<li>A quadratic inequality with a symbolic coefficient is right for either sign of it.</li>
63+
<li>Many limits that answered <code>NaN</code> — "this does not exist" — now give the value, or say honestly that they could not settle it.</li>
64+
<li>What <code>Stringize</code> prints parses back into the expression it printed. It did not for powers, lambdas, applications, piecewises, or complex numbers with a fractional imaginary part.</li>
65+
</ul>
66+
<strong>New:</strong>
67+
<ul>
68+
<li><code>floor</code>, <code>ceil</code>, <code>round</code>, <code>min</code>, <code>max</code> and <code>gcd</code> are functions rather than parse errors. <code>round</code> is half to even.</li>
69+
<li>A transformation layer: <code>Simplify</code>, <code>Expand</code>, <code>Factorize</code>, <code>Differentiate</code>, <code>Integrate</code> and <code>Limit</code> are adapters over a <code>Transformation</code> that carries what it claims about its output and how well justified the claim is. Rewrites can be recorded.</li>
70+
<li>Boolean minimisation, quantum states with tensor factorisation, and a much stronger limit and integration pipeline.</li>
71+
<li>A syntax reference and an exception reference in the repository.</li>
72+
<li>Assembly version is pinned at <code>2.0.0.0</code> for the whole of 2.x, so every 2.x release is a drop-in replacement for a signed-assembly consumer.</li>
73+
</ul>
74+
<strong>Gone:</strong>
75+
<ul>
76+
<li>The MyGet per-push feed. Releases publish to NuGet; remove the feed from your <code>NuGet.Config</code> if you had it.</li>
77+
</ul>
78+
</p>
79+
</details>
80+
81+
<br>
82+
83+
<details><summary><strong>1.4-preview.4</strong></summary>
3884
<p>
3985
<strong>Kernel functional and C#:</strong>
4086
<ul>

0 commit comments

Comments
 (0)