Skip to content
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

[1.0] Update book examples #4205

Merged
merged 8 commits into from
Oct 21, 2024
Merged

[1.0] Update book examples #4205

merged 8 commits into from
Oct 21, 2024

Conversation

lkastner
Copy link
Member

Examples from modified book source migrated here.

@@ -0,0 +1 @@
basis_lie_highest_weight(:A, 4, [1,3,2,1]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a "bug" here in the bug (just fixed it there):

Suggested change
basis_lie_highest_weight(:A, 4, [1,3,2,1]);
julia> basis_lie_highest_weight(:A, 4, [1,3,2,1]);

Copy link
Member

@lgoettgens lgoettgens Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is just a code snippet in the book used to produce timings that is not supposed to have any output associated with it. ping @gfourier

Edit: This file was already in the first round of the book but was not imported here back then.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benlorenz @lkastner so should this file (and the other two "non-code" jlcon files) be put into a "do not include list" somewhere and dropped here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file can and will be run with or without the julia> , with the new error checking it should also fail the tests if it triggers any errors. See here: https://github.com/oscar-system/Oscar.jl/actions/runs/11382378478/job/31665741305?pr=4205#step:9:812

I have added the other two non-julia files to the skipped list: 29c62b8 (#4205)

Comment on lines +1 to +2
L:= SimpleLieAlgebra("A", 4, Rationals);;
V:= HighestWeightModule(L, [1,3,2,1]);;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, this is GAP code. Will see how we can resolve this in the book (we don't want that tested as Julia code, it can't work)

Copy link
Member

@lgoettgens lgoettgens Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here. this is just a code snipped used to produce timings, so this should neither have output nor get tested. ping @gfourier

Edit: This file was already in the first round of the book but was not imported here back then.

@lgoettgens lgoettgens added the oscar book PRs necessary for the Oscar book label Oct 15, 2024
@lgoettgens
Copy link
Member

A lot of the changes here are just reverting changes in show functions that have been added since the 1.0 release, e.g. introduction of Sub-Pc groups, overhauled printing of Groebner bases etc.
Due to these, I expect CI to fail here. Whats the process to handle these cases?

@benlorenz
Copy link
Member

A lot of the changes here are just reverting changes in show functions that have been added since the 1.0 release, e.g. introduction of Sub-Pc groups, overhauled printing of Groebner bases etc. Due to these, I expect CI to fail here. Whats the process to handle these cases?

This will be switched and rebased to release-1.0.

@lgoettgens lgoettgens changed the base branch from master to release-1.0 October 15, 2024 11:36
@lgoettgens lgoettgens changed the base branch from release-1.0 to master October 15, 2024 11:36
@benlorenz benlorenz changed the base branch from master to release-1.0 October 15, 2024 13:19
[fundamentals, [0, 1, 0, 1, 0], [0, 1, 0, 0, 1], [0, 0, 1, 0, 1]] => 70
[fundamentals, [1, 0, 0, 1, 0], [0, 1, 0, 1, 0], [0, 1, 0, 0, 1]] => 10
[fundamentals, [1, 0, 1, 0, 0], [1, 0, 0, 1, 0], [0, 1, 0, 1, 0], [0, 1, 0, 0, 1]] => 10
[fundamentals, [1, 0, 0, 1, 0], [0, 1, 0, 1, 0], [0, 1, 0, 0, 1], [0, 0, 1, 0, 1]] => 10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is no code, but just some output formatted as code. This file was already in the first round of the book but was not imported here back then.

@lgoettgens
Copy link
Member

#4131 was another change to the booktests that you may wanna backport

Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.47%. Comparing base (1ce4c12) to head (35e143c).
Report is 9 commits behind head on release-1.0.

Additional details and impacted files
@@             Coverage Diff              @@
##           release-1.0    #4205   +/-   ##
============================================
  Coverage        82.47%   82.47%           
============================================
  Files              563      563           
  Lines            75732    75732           
============================================
  Hits             62463    62463           
  Misses           13269    13269           

@fingolfin
Copy link
Member

So how do we proceed? What is necessary to turn this from a "draft" PR into a full one and then merge it? (Other than fixing that one failing CI test -- I don't understand that failure right now, it involves changed printing of some Polymake objects?!)

@benlorenz
Copy link
Member

So how do we proceed? What is necessary to turn this from a "draft" PR into a full one and then merge it? (Other than fixing that one failing CI test -- I don't understand that failure right now, it involves changed printing of some Polymake objects?!)

From my point of view this is ready. The main point of this PR was to test the code that is now in the book and this was successful.
We could create a 1.0.5 containing the updated book tests if necessary?

We should prbably do a bit of rebasing to combine some of the commits here but keep the other backport commits separate (and merge without squashing)?

The failing doctest for julia nightly is due to some changes in julia, we did some fixes for such errors on Oscar master but I don't know whether we can or should backport them.

We could probably also look into integrating some of the changes from the book-code into the booktests on master, but that is probably more difficult as that code has evolved since 1.0.

@lgoettgens
Copy link
Member

We could probably also look into integrating some of the changes from the book-code into the booktests on master, but that is probably more difficult as that code has evolved since 1.0.

I would welcome a rebase of this (with adaptations) on release-1.1 as well, so that our latest release (which will then be 1.1.2) contains the up to date book tests as well. And this may be an nice step for you in bringing them to master.

Updating the changes to 1.1 or master should be no more than re-running all of the inputs and capturing the outputs. Since we don't change the inputs at all, this shouldn't be tooo hard

@benlorenz benlorenz added the don't squash! do not squash the commits when merging label Oct 18, 2024
@fingolfin
Copy link
Member

For the 1.0 branch we could simply disable tests against Julia nightly; I see no point in trying to make OSCAR 1.0 compatible with Julia 1.12 and later.

Unless it is trivial I would also not both with the 1.1 branch, but rather make a 1.2 release soon. The book is still many weeks or more likely months out (even if they accept it as submitted, it will take time to get it through the pipeline), so by the time people can it, OSCAR 1.2 will be current anyway.

@benlorenz benlorenz changed the title Update book examples [1.0] Update book examples Oct 18, 2024
@benlorenz benlorenz marked this pull request as ready for review October 19, 2024 12:15
@benlorenz
Copy link
Member

I cleaned up the commits on this branch, I think this is good now to be merged, preferably without squashing.

I took the diff from this branch (book-import + whitespace fix) and applied it to 1.1 here (together with some other related changes) and for master here. There were only some very minor conflicts.

@benlorenz benlorenz merged commit 05cf865 into release-1.0 Oct 21, 2024
27 of 28 checks passed
@benlorenz benlorenz deleted the lk/update_book_examples branch October 21, 2024 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
don't squash! do not squash the commits when merging oscar book PRs necessary for the Oscar book
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants