Skip to content

Commit 122014d

Browse files
committed
apply PackageJanitor
1 parent e22fc2b commit 122014d

File tree

35 files changed

+421
-222
lines changed

35 files changed

+421
-222
lines changed

.github/workflows/Tests.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ jobs:
2222
steps:
2323
# keep workflow active even if repository has no activity for 60 days (do not execute for pull requests)
2424
- 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'
25-
- uses: actions/checkout@v1
26-
- run: mkdir -p /home/gap/.gap/pkg/
27-
- run: sudo cp -a $GITHUB_WORKSPACE /home/gap/.gap/pkg/
28-
- run: sudo chown -R gap:gap /home/gap/.gap/pkg/
25+
- uses: actions/checkout@v3
26+
with:
27+
# the persisted token interferes with the subsplit token used below
28+
persist-credentials: false
29+
fetch-depth: 0
30+
- run: cp -a $GITHUB_WORKSPACE /home/gap/.gap/pkg/
2931
- run: |
3032
export HOME="/home/gap"
3133
cd /home/gap/.gap/pkg/
@@ -52,15 +54,15 @@ jobs:
5254
[ -d "homalg_project/homalg" ] && make -C "homalg_project/homalg" doc
5355
[ -d "homalg_project/Modules" ] && make -C "homalg_project/Modules" doc
5456
[ -d "Toposes" ] && make -C "Toposes" doc
55-
TERM=dumb make -C HigherHomologicalAlgebra -j $(nproc) --output-sync ci-test
56-
cp ./HigherHomologicalAlgebra/.codecov.yml ./
57-
(cd HigherHomologicalAlgebra && LANG=C.UTF-8 python3 process_coverage.py)
58-
[ "$GITHUB_EVENT_NAME" != "schedule" ] && [ "${{ matrix.image }}" = "ghcr.io/homalg-project/gap-docker-master:latest" ] && ./HigherHomologicalAlgebra/upload_codecov.sh
57+
make -C HigherHomologicalAlgebra -j $(nproc) --output-sync ci-test
58+
cd HigherHomologicalAlgebra
59+
LANG=C.UTF-8 python3 process_coverage.py
60+
[ "$GITHUB_EVENT_NAME" != "schedule" ] && [ "${{ matrix.image }}" = "ghcr.io/homalg-project/gap-docker-master:latest" ] && ./upload_codecov.sh
5961
git config --global user.name "Bot"
6062
git config --global user.email "empty"
61-
cd HigherHomologicalAlgebra
6263
CUR_SHA=$(git rev-parse --verify HEAD)
6364
if [ "${{ matrix.image }}" = "ghcr.io/homalg-project/gap-docker:latest" ] && [ "$CUR_SHA" = "$(git rev-parse origin/master)" ] && [ $(dirname "$GITHUB_REPOSITORY") = "homalg-project" ]; then \
65+
git fetch origin gh-pages; \
6466
git worktree add gh-pages/ gh-pages || (echo "There was an error. Make sure there is a branch named 'gh-pages'. See https://github.com/homalg-project/PackageJanitor#error-there-was-an-error-make-sure-there-is-a-branch-named-gh-pages"; exit 1); \
6567
git checkout master; \
6668
LANG=C.UTF-8 ./make_dist.sh --token "${{ secrets.GITHUB_TOKEN }}"; \

BBGG/PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ PackageDoc := rec(
7474
),
7575

7676
Dependencies := rec(
77-
GAP := ">= 4.11.1",
77+
GAP := ">= 4.12.1",
7878
NeededOtherPackages := [
7979
[ "GAPDoc", ">= 1.5" ],
8080
[ "GradedModulePresentationsForCAP", ">= 0.1" ],

BBGG/makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ test: doc
1717
gap tst/testall.g
1818

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

2525
test-doc: doc
2626
cp -aT doc/ doc_tmp/
@@ -32,12 +32,12 @@ test-with-coverage: doc
3232
gap --quitonbreak --norepl -c 'LoadPackage("profiling"); OutputJsonCoverage("stats", "coverage.json");'
3333

3434
test-spacing:
35-
grep -R "[^ [\"] " gap/*.gi && echo "Duplicate spaces found" && exit 1 || exit 0
36-
grep -RE '[^ ] +$$' gap/* && echo "Trailing whitespace found" && exit 1 || exit 0
35+
# exit code 1 means no match, which is what we want here (exit code 2 signals an error)
36+
grep -R "[^ [\"] " gap/*.gi; test $$? -eq 1 || (echo "Duplicate spaces found" && exit 1)
37+
grep -RE '[^ ] +$$' gap/*; test $$? -eq 1 || (echo "Trailing whitespace found" && exit 1)
3738
for filename in gap/*; do \
3839
echo $$filename; \
3940
gap --quitonbreak --norepl --banner -c "LoadPackage(\"BBGG\"); SizeScreen([4096]); func := ReadAsFunction(\"$$filename\"); FileString(\"gap_spacing\", DisplayString(func));"; \
40-
echo -e "\033[0m"; \
4141
# 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, \
4242
# so we remove all indentation, line breaks, and empty lines, and afterwards insert line breaks at semicolons again for better readability. \
4343
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; \

BBGG/tst/100_LoadPackage.tst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,22 @@
33
#
44
# This file tests if the package can be loaded without errors or warnings.
55
#
6+
# do not load suggested dependencies automatically
7+
gap> PushOptions( rec( OnlyNeeded := true ) );
68
gap> package_loading_info_level := InfoLevel( InfoPackageLoading );;
79
gap> SetInfoLevel( InfoPackageLoading, PACKAGE_ERROR );;
8-
gap> LoadPackage( "BBGG", false );
9-
true
1010
gap> LoadPackage( "IO_ForHomalg", false );
1111
true
1212
gap> LoadPackage( "FreydCategoriesForCAP", false );
1313
true
14-
gap> SetInfoLevel( InfoPackageLoading, PACKAGE_INFO );;
15-
gap> LoadPackage( "BBGG" );
14+
gap> LoadPackage( "BBGG", false );
1615
true
16+
gap> SetInfoLevel( InfoPackageLoading, PACKAGE_INFO );;
1717
gap> LoadPackage( "IO_ForHomalg" );
1818
true
1919
gap> LoadPackage( "FreydCategoriesForCAP" );
2020
true
21+
gap> LoadPackage( "BBGG" );
22+
true
2123
gap> SetInfoLevel( InfoPackageLoading, package_loading_info_level );;
2224
gap> HOMALG_IO.show_banners := false;;

Bicomplexes/PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ PackageDoc := rec(
8282
),
8383

8484
Dependencies := rec(
85-
GAP := ">= 4.11.1",
85+
GAP := ">= 4.12.1",
8686
NeededOtherPackages := [ [ "GAPDoc", ">= 1.5" ],
8787
[ "CAP", ">= 2021.05-02" ],
8888
[ "ComplexesCategories", ">= 2020.03.12" ] ],

Bicomplexes/makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ test: doc
1717
gap tst/testall.g
1818

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

2525
test-doc: doc
2626
cp -aT doc/ doc_tmp/
@@ -32,12 +32,12 @@ test-with-coverage: doc
3232
gap --quitonbreak --norepl -c 'LoadPackage("profiling"); OutputJsonCoverage("stats", "coverage.json");'
3333

3434
test-spacing:
35-
grep -R "[^ [\"] " gap/*.gi && echo "Duplicate spaces found" && exit 1 || exit 0
36-
grep -RE '[^ ] +$$' gap/* && echo "Trailing whitespace found" && exit 1 || exit 0
35+
# exit code 1 means no match, which is what we want here (exit code 2 signals an error)
36+
grep -R "[^ [\"] " gap/*.gi; test $$? -eq 1 || (echo "Duplicate spaces found" && exit 1)
37+
grep -RE '[^ ] +$$' gap/*; test $$? -eq 1 || (echo "Trailing whitespace found" && exit 1)
3738
for filename in gap/*; do \
3839
echo $$filename; \
3940
gap --quitonbreak --norepl --banner -c "LoadPackage(\"Bicomplexes\"); SizeScreen([4096]); func := ReadAsFunction(\"$$filename\"); FileString(\"gap_spacing\", DisplayString(func));"; \
40-
echo -e "\033[0m"; \
4141
# 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, \
4242
# so we remove all indentation, line breaks, and empty lines, and afterwards insert line breaks at semicolons again for better readability. \
4343
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; \

Bicomplexes/tst/100_LoadPackage.tst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33
#
44
# This file tests if the package can be loaded without errors or warnings.
55
#
6+
# do not load suggested dependencies automatically
7+
gap> PushOptions( rec( OnlyNeeded := true ) );
68
gap> package_loading_info_level := InfoLevel( InfoPackageLoading );;
79
gap> SetInfoLevel( InfoPackageLoading, PACKAGE_ERROR );;
8-
gap> LoadPackage( "Bicomplexes", false );
9-
true
1010
gap> LoadPackage( "ModulePresentations", false );
1111
true
12-
gap> SetInfoLevel( InfoPackageLoading, PACKAGE_INFO );;
13-
gap> LoadPackage( "Bicomplexes" );
12+
gap> LoadPackage( "Bicomplexes", false );
1413
true
14+
gap> SetInfoLevel( InfoPackageLoading, PACKAGE_INFO );;
1515
gap> LoadPackage( "ModulePresentations" );
1616
true
17+
gap> LoadPackage( "Bicomplexes" );
18+
true
1719
gap> SetInfoLevel( InfoPackageLoading, package_loading_info_level );;

ComplexesCategories/PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ PackageDoc := rec(
7272
),
7373

7474
Dependencies := rec(
75-
GAP := ">= 4.11.1",
75+
GAP := ">= 4.12.1",
7676
NeededOtherPackages := [
7777
[ "AutoDoc", ">= 2019.09.04" ],
7878
[ "CAP", ">= 2022.09-02" ],

ComplexesCategories/makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ test: doc
1717
gap tst/testall.g
1818

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

2525
test-doc: doc
2626
cp -aT doc/ doc_tmp/
@@ -32,12 +32,12 @@ test-with-coverage: doc
3232
gap --quitonbreak --norepl -c 'LoadPackage("profiling"); OutputJsonCoverage("stats", "coverage.json");'
3333

3434
test-spacing:
35-
grep -R "[^ [\"] " gap/*.gi && echo "Duplicate spaces found" && exit 1 || exit 0
36-
grep -RE '[^ ] +$$' gap/* && echo "Trailing whitespace found" && exit 1 || exit 0
35+
# exit code 1 means no match, which is what we want here (exit code 2 signals an error)
36+
grep -R "[^ [\"] " gap/*.gi; test $$? -eq 1 || (echo "Duplicate spaces found" && exit 1)
37+
grep -RE '[^ ] +$$' gap/*; test $$? -eq 1 || (echo "Trailing whitespace found" && exit 1)
3738
for filename in gap/*; do \
3839
echo $$filename; \
3940
gap --quitonbreak --norepl --banner -c "LoadPackage(\"ComplexesCategories\"); SizeScreen([4096]); func := ReadAsFunction(\"$$filename\"); FileString(\"gap_spacing\", DisplayString(func));"; \
40-
echo -e "\033[0m"; \
4141
# 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, \
4242
# so we remove all indentation, line breaks, and empty lines, and afterwards insert line breaks at semicolons again for better readability. \
4343
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; \

ComplexesCategories/tst/100_LoadPackage.tst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,26 @@
33
#
44
# This file tests if the package can be loaded without errors or warnings.
55
#
6+
# do not load suggested dependencies automatically
7+
gap> PushOptions( rec( OnlyNeeded := true ) );
68
gap> package_loading_info_level := InfoLevel( InfoPackageLoading );;
79
gap> SetInfoLevel( InfoPackageLoading, PACKAGE_ERROR );;
8-
gap> LoadPackage( "ComplexesCategories", false );
9-
true
1010
gap> LoadPackage( "IO_ForHomalg", false );
1111
true
1212
gap> LoadPackage( "ModulePresentations", false );
1313
true
1414
gap> LoadPackage( "FreydCategoriesForCAP", false );
1515
true
16-
gap> LoadPackage( "LinearAlgebraForCAP", false );
16+
gap> LoadPackage( "ComplexesCategories", false );
1717
true
1818
gap> SetInfoLevel( InfoPackageLoading, PACKAGE_INFO );;
19-
gap> LoadPackage( "ComplexesCategories" );
20-
true
2119
gap> LoadPackage( "IO_ForHomalg" );
2220
true
2321
gap> LoadPackage( "ModulePresentations" );
2422
true
2523
gap> LoadPackage( "FreydCategoriesForCAP" );
2624
true
27-
gap> LoadPackage( "LinearAlgebraForCAP" );
25+
gap> LoadPackage( "ComplexesCategories" );
2826
true
2927
gap> SetInfoLevel( InfoPackageLoading, package_loading_info_level );;
3028
gap> HOMALG_IO.show_banners := false;;

0 commit comments

Comments
 (0)