Skip to content

Commit

Permalink
Merge pull request #31 from zickgraf/master
Browse files Browse the repository at this point in the history
Comply with LinearAlgebraForCAP v2022.10-06 and CAP v2022.11-06
  • Loading branch information
mohamed-barakat authored Nov 3, 2022
2 parents 29f1830 + 30188a7 commit 51e81ef
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
# keep workflow active even if repository has no activity for 60 days (do not execute for pull requests)
- run: '[ "$GITHUB_EVENT_NAME" = "pull_request" ] || curl --fail -X PUT -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/$GITHUB_REPOSITORY/actions/workflows/Tests.yml/enable'
- uses: actions/checkout@v3
with:
# the persisted token interferes with the subsplit token used below
persist-credentials: false
- run: cp -a $GITHUB_WORKSPACE /home/gap/.gap/pkg/
- run: |
export HOME="/home/gap"
Expand Down
6 changes: 3 additions & 3 deletions PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "InternalModules",
Subtitle := "Modules over internal algebras",
Version := "2022.10-01",
Version := "2022.11-01",

Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),
License := "GPL-2.0-or-later",
Expand Down Expand Up @@ -83,9 +83,9 @@ PackageDoc := rec(
),

Dependencies := rec(
GAP := ">= 4.11.1",
GAP := ">= 4.12.1",
NeededOtherPackages := [ [ "GAPDoc", ">= 1.5" ],
[ "CAP", ">= 2022.09-16" ],
[ "CAP", ">= 2022.11-06" ],
[ "GradedCategories", ">= 2020.08.24" ],
[ "ActionsForCAP", ">= 2020.04.27" ],
[ "RingsForHomalg", ">= 2020.09.02" ],
Expand Down
30 changes: 27 additions & 3 deletions ci_gaprc
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
# Prefer GAPInfo.UserGapRoot over other package directories to prevent accidentally testing package
# versions distributed with GAP.
(function()

FORCE_LOADING_FROM_USER_GAP_ROOT := function ( )
local name, package_info, pos;
for name in RecNames( GAPInfo.PackagesInfo ) do
package_info := GAPInfo.PackagesInfo.(name);
pos := PositionProperty( package_info, info -> StartsWith( info.InstallationPath, GAPInfo.UserGapRoot ) );
if pos <> fail then
SetPackagePath( name, package_info[pos].InstallationPath );
# work around https://github.com/gap-system/gap/pull/5178
if IsBound( GAPInfo.PackagesLoaded.(name) ) then
if StartsWith( GAPInfo.PackagesLoaded.(name)[1], GAPInfo.UserGapRoot ) then
continue;
else
Error( "package already loaded at ", GAPInfo.PackagesLoaded.(name)[1] );
fi;
else
SetPackagePath( name, package_info[pos].InstallationPath );
fi;
fi;
od;
end)();
end;

FORCE_LOADING_FROM_USER_GAP_ROOT( );

MakeReadWriteGlobal( "InitializePackagesInfoRecords" );
FORCE_LOADING_FROM_USER_GAP_ROOT_InitializePackagesInfoRecords_orig := InitializePackagesInfoRecords;
InitializePackagesInfoRecords := function ( args... )
local old_PackagesInfo;
old_PackagesInfo := GAPInfo.PackagesInfo;
CallFuncList( FORCE_LOADING_FROM_USER_GAP_ROOT_InitializePackagesInfoRecords_orig, args );
if not IsIdenticalObj( old_PackagesInfo, GAPInfo.PackagesInfo ) then
FORCE_LOADING_FROM_USER_GAP_ROOT( );
fi;
end;
MakeReadOnlyGlobal( "InitializePackagesInfoRecords" );
4 changes: 2 additions & 2 deletions examples/SymmetricAlgebraInternalToS4rep.g
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#! @Chunk SymmetricAlgebraInternalToS4rep

LoadPackage( "InternalModules" );
LoadPackage( "InternalModules" : OnlyNeeded );

#! @Example
srepG := RepresentationCategory( SymmetricGroup( 4 ) );
#! The representation category of SymmetricGroup( [ 1 .. 4 ] )
InfoOfInstalledOperationsOfCategory( srepG );
#! 46 primitive operations were used to derive 247 operations for
#! 46 primitive operations were used to derive 248 operations for
#! this category which algorithmically
#! * IsEquippedWithHomomorphismStructure
#! * IsAbelianCategory
Expand Down
4 changes: 3 additions & 1 deletion examples/notebooks/SymmetricAlgebraInternalToS1rep.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
"46 primitive operations were used to derive 247 operations for this category which algorithmically\n",
"46 primitive operations were used to derive 343 operations for this category which algorithmically\n",
"* IsEquippedWithHomomorphismStructure\n",
"* IsAbelianCategory\n",
"* IsRigidSymmetricClosedMonoidalCategory\n",
"and furthermore mathematically\n",
"* IsFiniteCocompleteCategory (but not yet algorithmically)\n",
"* IsFiniteCompleteCategory (but not yet algorithmically)\n",
"* IsSkeletalCategory\n"
]
}
Expand Down
4 changes: 3 additions & 1 deletion examples/notebooks/SymmetricAlgebraInternalToS4rep.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
"46 primitive operations were used to derive 247 operations for this category which algorithmically\n",
"46 primitive operations were used to derive 343 operations for this category which algorithmically\n",
"* IsEquippedWithHomomorphismStructure\n",
"* IsAbelianCategory\n",
"* IsRigidSymmetricClosedMonoidalCategory\n",
"and furthermore mathematically\n",
"* IsFiniteCocompleteCategory (but not yet algorithmically)\n",
"* IsFiniteCompleteCategory (but not yet algorithmically)\n",
"* IsSkeletalCategory\n"
]
}
Expand Down
14 changes: 7 additions & 7 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ test: doc
gap tst/testall.g

test-basic-spacing:
grep -RPl "\t" examples/ gap/ && echo "Tabs found" && exit 1 || exit 0
grep -RPl "\r" examples/ gap/ && echo "Windows line-endings found" && exit 1 || exit 0
# the second grep is a hack to fix the exit code with -L for grep <= 3.1
grep -RPzL "\n\z" examples/ gap/ | grep "" && echo "File with no newline at end of file found" && exit 1 || exit 0
# exit code 1 means no match, which is what we want here (exit code 2 signals an error)
grep -RPl "\t" examples/ gap/; test $$? -eq 1 || (echo "Tabs found" && exit 1)
grep -RPl "\r" examples/ gap/; test $$? -eq 1 || (echo "Windows line-endings found" && exit 1)
grep -RPzL "\n\z" examples/ gap/ | grep ""; test $$? -eq 1 || (echo "File with no newline at end of file found" && exit 1)

test-doc: doc
cp -aT doc/ doc_tmp/
Expand All @@ -44,12 +44,12 @@ test-notebooks:
done

test-spacing:
grep -R "[^ [\"] " gap/*.gi && echo "Duplicate spaces found" && exit 1 || exit 0
grep -RE '[^ ] +$$' gap/* && echo "Trailing whitespace found" && exit 1 || exit 0
# exit code 1 means no match, which is what we want here (exit code 2 signals an error)
grep -R "[^ [\"] " gap/*.gi; test $$? -eq 1 || (echo "Duplicate spaces found" && exit 1)
grep -RE '[^ ] +$$' gap/*; test $$? -eq 1 || (echo "Trailing whitespace found" && exit 1)
for filename in gap/*; do \
echo $$filename; \
gap --quitonbreak --norepl --banner -c "LoadPackage(\"InternalModules\"); SizeScreen([4096]); func := ReadAsFunction(\"$$filename\"); FileString(\"gap_spacing\", DisplayString(func));"; \
echo -e "\033[0m"; \
# In a perfect world, the DisplayString of a function would exactly match our code. However, our line breaks and indentation might differ from the GAP ones, \
# so we remove all indentation, line breaks, and empty lines, and afterwards insert line breaks at semicolons again for better readability. \
cat "gap_spacing" | tail -n +2 | head -n -2 | sed 's/\[ \]/[ ]/g' | sed 's/( )/( )/g' | sed 's/( :/( :/g' | sed 's/ *$$//' | sed 's/^ *//' | grep -v "^$$" | tr "\n" " " | sed 's/;/;\n/g' > modified_gap_spacing; \
Expand Down
2 changes: 1 addition & 1 deletion upload_codecov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ shasum -a 256 -c codecov.SHA256SUM

# execute
chmod +x codecov
./codecov -Z || ./codecov -Z || ./codecov -Z
./codecov -Z || (sleep 30; ./codecov -Z || (sleep 30; ./codecov -Z))

0 comments on commit 51e81ef

Please sign in to comment.