Skip to content

Commit

Permalink
Apply PackageJanitor
Browse files Browse the repository at this point in the history
  • Loading branch information
kamalsaleh committed Sep 30, 2022
1 parent de66aff commit e39ac95
Show file tree
Hide file tree
Showing 25 changed files with 260 additions and 865 deletions.
5 changes: 1 addition & 4 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
codecov:
disable_default_path_fixes: true
fixes:
- "/home/gap/.gap/pkg/NConvex/::"
ignore:
- "home/"
require_ci_to_pass: false
20 changes: 16 additions & 4 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ jobs:
steps:
# 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@v1
- run: mkdir -p /home/gap/.gap/pkg/
- run: sudo cp -a $GITHUB_WORKSPACE /home/gap/.gap/pkg/
- run: sudo chown -R gap:gap /home/gap/.gap/pkg/
# checkout needs access to temporary directory
- run: sudo chmod 1777 $RUNNER_TEMP
- run: sudo chown gap:gap $GITHUB_WORKSPACE
- uses: actions/checkout@v3
- run: cp -a $GITHUB_WORKSPACE /home/gap/.gap/pkg/
- run: |
export HOME="/home/gap"
cd /home/gap/.gap/pkg/
Expand All @@ -36,6 +37,16 @@ jobs:
#git clone --depth 1 https://github.com/homalg-project/NormalizInterface.git
# set SOURCE_DATE_EPOCH for reproducible PDFs
export SOURCE_DATE_EPOCH=0
# build documentation of packages which we might want to reference, keep this in sync with `release-gap-package`
[ -d "CAP_project/CAP" ] && make -C "CAP_project/CAP" doc
[ -d "CAP_project/CompilerForCAP" ] && make -C "CAP_project/CompilerForCAP" doc
[ -d "CAP_project/MonoidalCategories" ] && make -C "CAP_project/MonoidalCategories" doc
[ -d "CAP_project/CartesianCategories" ] && make -C "CAP_project/CartesianCategories" doc
[ -d "CAP_project/FreydCategoriesForCAP" ] && make -C "CAP_project/FreydCategoriesForCAP" doc
[ -d "HigherHomologicalAlgebra/ToolsForHigherHomologicalAlgebra" ] && make -C "HigherHomologicalAlgebra/ToolsForHigherHomologicalAlgebra" doc
[ -d "homalg_project/homalg" ] && make -C "homalg_project/homalg" doc
[ -d "homalg_project/Modules" ] && make -C "homalg_project/Modules" doc
[ -d "Toposes" ] && make -C "Toposes" doc
TERM=dumb make -C NConvex -j $(nproc) --output-sync ci-test
cp ./NConvex/.codecov.yml ./
(cd NConvex && LANG=C.UTF-8 python3 process_coverage.py)
Expand All @@ -45,6 +56,7 @@ jobs:
cd NConvex
CUR_SHA=$(git rev-parse --verify HEAD)
if [ "${{ matrix.image }}" = "ghcr.io/homalg-project/gap-docker:latest" ] && [ "$CUR_SHA" = "$(git rev-parse origin/master)" ] && [ $(dirname "$GITHUB_REPOSITORY") = "homalg-project" ]; then \
git fetch origin gh-pages; \
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); \
git checkout master; \
LANG=C.UTF-8 ./make_dist.sh --token "${{ secrets.GITHUB_TOKEN }}"; \
Expand Down
8 changes: 4 additions & 4 deletions PackageInfo.g
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# NConvex: Gap package for polyhedral computations
# NConvex: A Gap package to perform polyhedral computations
#
# This file contains package meta data. For additional information on
# the meaning and correct usage of these fields, please consult the
Expand All @@ -9,8 +9,8 @@
SetPackageInfo( rec(

PackageName := "NConvex",
Subtitle := "Gap package for polyhedral computations",
Version := "2022.08-01",
Subtitle := "A Gap package to perform polyhedral computations",
Version := "2022.09-01",
Date := ~.Version{[ 1 .. 10 ]},
Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),
License := "GPL-2.0-or-later",
Expand Down Expand Up @@ -86,7 +86,7 @@ PackageDoc := rec(
HTMLStart := "doc/chap0.html",
PDFFile := "doc/manual.pdf",
SixFile := "doc/manual.six",
LongTitle := "Gap package for polyhedral computations",
LongTitle := "A Gap package to perform polyhedral computations",
),

Dependencies := rec(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- BEGIN HEADER -->
# NConvex&ensp;<sup><sup>[![View code][code-img]][code-url]</sup></sup>

### Gap package for polyhedral computations
### A Gap package to perform polyhedral computations

| Documentation | Latest Release | Build Status | Code Coverage |
| ------------- | -------------- | ------------ | ------------- |
Expand Down
46 changes: 14 additions & 32 deletions examples/polyhedrons.g
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,14 @@ Q := Polyhedron( [ [ 5, 0 ], [ 0, 6 ] ], [ [ 1, 2 ] , [ -1, -2 ] ] );
#! <A polyhedron in |R^2>
VerticesOfMainRatPolytope( Q );
#! [ [ 0, 6 ], [ 5, 0 ] ]
V_using_4ti2 := [ [ -3, -16 ], [ -3, 0 ] ];;
V_using_normaliz := [ [ 0, 6 ], [ 5, 0 ] ];;
V := VerticesOfMainPolytope( Q );;
V = V_using_4ti2 or V = V_using_normaliz;
#! true
V := VerticesOfMainPolytope( Q );
#! [ [ 0, 6 ], [ 5, 0 ] ]

L_using_4ti2 := [ [ [ -3, -16 ], [ -3, -15 ], [ -3, -14 ],
[ -3, -13 ], [ -3, -12 ], [ -3, -11 ], [ -3, -10 ],
[ -3, -9 ], [ -3, -8 ], [ -3, -7 ], [ -3, -6 ],
[ -3, -5 ], [ -3, -4 ], [ -3, -3 ], [ -3, -2 ],
[ -3, -1 ], [ -3, 0 ] ], [ ], [ [ 1, 2 ] ] ];;
L_using_normaliz := [ [ [ 0, -10 ], [ 0, -9 ], [ 0, -8 ],
[ 0, -7 ], [ 0, -6 ], [ 0, -5 ], [ 0, -4 ], [ 0, -3 ],
[ 0, -2 ], [ 0, -1 ], [ 0, 0 ], [ 0, 1 ], [ 0, 2 ],
[ 0, 3 ], [ 0, 4 ], [ 0, 5 ], [ 0, 6 ] ], [ ], [ [ -1, -2 ] ] ];;
L := LatticePointsGenerators( Q );;
L = L_using_4ti2 or L = L_using_normaliz;
#! true
L := LatticePointsGenerators( Q );
#! [ [ [ 0, -10 ], [ 0, -9 ], [ 0, -8 ], [ 0, -7 ], [ 0, -6 ],
#! [ 0, -5 ], [ 0, -4 ], [ 0, -3 ], [ 0, -2 ], [ 0, -1 ],
#! [ 0, 0 ], [ 0, 1 ], [ 0, 2 ], [ 0, 3 ], [ 0, 4 ],
#! [ 0, 5 ], [ 0, 6 ] ], [ ], [ [ 1, 2 ] ] ]
Dimension( Q );
#! 2
RayGeneratorsOfTailCone( Q );
Expand All @@ -58,13 +48,8 @@ Q;
#! @Example
P := PolyhedronByInequalities( [ [ -2, 3, 4, -7 ], -[ -2, 3, 4, -7 ] ] );
#! <A polyhedron in |R^3 >
L_using_normaliz := [ [ [ -4, 0, -2 ] ], [ ],
[ [ 1, 1, 1 ], [ 4, -3, 0 ] ] ];;
L_using_4ti2 := [ [ [ -2, 2, 0 ] ], [ ],
[ [ 1, 1, 1 ], [ 4, -3, 0 ] ] ];;
L := LatticePointsGenerators( P );;
L = L_using_4ti2 or L = L_using_normaliz;
#! true
L := LatticePointsGenerators( P );
#! [ [ [ -4, 0, -2 ] ], [ ], [ [ 0, 7, 4 ], [ 1, 1, 1 ] ] ]
#! @EndExample
#! @BeginLatexOnly
#! So the solutions set is $\{ [ -4, 0, -2 ]+ t_1*[ 1, 1, 1 ] + t_2*[ 0, 7, 4 ]; t_1,t_2\in\mathbb{Z}\}$.
Expand All @@ -75,7 +60,7 @@ L = L_using_4ti2 or L = L_using_normaliz;
Q := PolyhedronByInequalities( [ [-3, 4, 6 ], [ 3, -4, -6 ] ] );
#! <A polyhedron in |R^2 >
LatticePointsGenerators( Q );
#! [ [ ], [ ], [ [ -3, 2 ] ] ]
#! [ [ ], [ ], [ [ 3, -2 ] ] ]
#! @EndExample
#! @BeginLatexOnly
#! Let us solve the folowing linear system
Expand All @@ -86,14 +71,11 @@ LatticePointsGenerators( Q );
#! $$-3 + 7x + \phantom{3}y + 5v = 0$$
#! @EndLatexOnly
#! @Example
P := PolyhedronByInequalities( [ [ -1, 2, 3, 2, 0 ], [ -3, 7, 1, 0, 5 ],
[ 1, -2, -3, -2, 0 ], [ 3, -7, -1, 0, -5 ] ] );
P := PolyhedronByInequalities( [ [ -1, 2, 3, 2, 0 ], [ -3, 7, 1, 0, 5 ],
[ 1, -2, -3, -2, 0 ], [ 3, -7, -1, 0, -5 ] ] );
#! <A polyhedron in |R^4 >
L_using_4ti2 := [ [ [ 0, 3, -4, 0 ] ], [ ], [ [ 0, -10, 15, 2 ], [ 1, -2, 2, -1 ] ] ];;
L_using_normaliz := [ [ [ -19, 1, 18, 27 ] ], [ ], [ [ -1, 2, -2, 1 ], [ 5, 0, -5, -7 ] ] ];;
L := LatticePointsGenerators( P );;
L = L_using_4ti2 or L = L_using_normaliz;
#! true
L := LatticePointsGenerators( P );
#! [ [ [ -19, 1, 18, 27 ] ], [ ], [ [ 0, 10, -15, -2 ], [ 1, -2, 2, -1 ] ] ]
#! @EndExample
#! @BeginLatexOnly
#! I.e., the solutions set is
Expand Down
Loading

0 comments on commit e39ac95

Please sign in to comment.