Skip to content

Commit

Permalink
applied PackageJanitor
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-barakat committed Oct 30, 2020
1 parent 29e1b4e commit 63d948c
Show file tree
Hide file tree
Showing 19 changed files with 1,264 additions and 546 deletions.
6 changes: 6 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
codecov:
disable_default_path_fixes: true
fixes:
- "/home/gap/.gap/pkg/ArangoDBInterface/::"
ignore:
- "home/"
50 changes: 50 additions & 0 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Tests

on:
push:
branches:
- "master"
- "*-ci"
pull_request:
schedule:
- cron: "0 0 * * *"

jobs:
test:
strategy:
matrix:
image: [gapsystem/gap-docker, gapsystem/gap-docker-master]
fail-fast: false
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
steps:
- 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/
- run: |
export HOME="/home/gap"
cd /home/gap/.gap/pkg/
sudo apt update
sudo apt dist-upgrade -y
sudo apt install -y texlive-latex-extra texlive-fonts-extra
git clone --depth 1 https://github.com/gap-packages/AutoDoc.git
git clone --depth 1 https://github.com/homalg-project/homalg_project.git
# set SOURCE_DATE_EPOCH for reproducible PDFs
export SOURCE_DATE_EPOCH=0
TERM=dumb make -C ArangoDBInterface -j $(nproc) --output-sync doc
#TERM=dumb make -C ArangoDBInterface -j $(nproc) --output-sync ci-test
#cp ./ArangoDBInterface/.codecov.yml ./
#curl -s https://codecov.io/bash | bash
git config --global user.name "Bot"
git config --global user.email "empty"
cd ArangoDBInterface
CUR_SHA=$(git rev-parse --verify HEAD)
if [ "${{ matrix.image }}" = "gapsystem/gap-docker" ] && [ "$CUR_SHA" = "$(git rev-parse origin/master)" ] && [ $(dirname "$GITHUB_REPOSITORY") = "homalg-project" ]; then \
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 }}"; \
else \
echo "Not making a release."; \
fi
36 changes: 7 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/maketest.g
/tst/arangodbinterface*.tst
/doc/*.xml

/doc/chap*.html
/doc/chap*.txt
/doc/*.css
Expand All @@ -22,35 +18,17 @@
/doc/*.tex
/doc/*.toc
/doc/manual.pdf
/doc/_*.xml

.deps/
.dirstamp
.libs/

/aclocal.m4
/autom4te.cache/
/bin/
/cnf
/config.log
/config.status
/configure
/lib/
/libtool
/m4/libtool.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/gen/
/Makefile
/Makefile.in
/src/pkgconfig.h
/src/stamp-h1

*.la
src/*.lo

/tmp/
/gh-pages/

stats
coverage.json
/coverage.json
/doc/*.xml
/doc_tmp/
/stats
/tst/arangodbinterface*.tst
339 changes: 339 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions PackageInfo.g
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# ArangoDBInterface: An interface to ArangoDB
# SPDX-License-Identifier: GPL-2.0-or-later
# ArangoDBInterface: A GAP interface to ArangoDB
#
# This file contains package meta data. For additional information on
# the meaning and correct usage of these fields, please consult the
Expand All @@ -9,15 +9,15 @@
SetPackageInfo( rec(

PackageName := "ArangoDBInterface",
Subtitle := "An interface to ArangoDB",
Subtitle := "A GAP interface to ArangoDB",
Version := Maximum( [
"2020.04.16", ## Mohamed's version
"2020.10-01", ## Mohamed's version
## this line prevents merge conflicts
"2017.07.21", ## Lukas's version
"2017.07-21", ## Lukas's version
] ),

Date := ~.Version{[ 1 .. 10 ]},
Date := Concatenation( ~.Date{[ 9, 10 ]}, "/", ~.Date{[ 6, 7 ]}, "/", ~.Date{[ 1 .. 4 ]} ),
Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),
License := "GPL-2.0-or-later",


Expand All @@ -38,19 +38,19 @@ Persons := [
),
],

# BEGIN URLS
SourceRepository := rec(
Type := "git",
URL := Concatenation( "https://github.com/homalg-project/", ~.PackageName ),
URL := "https://github.com/homalg-project/ArangoDBInterface",
),
IssueTrackerURL := Concatenation( ~.SourceRepository.URL, "/issues" ),
PackageWWWHome := Concatenation( "https://homalg-project.github.io/", ~.PackageName ),
PackageInfoURL := Concatenation( ~.PackageWWWHome, "/PackageInfo.g" ),
README_URL := Concatenation( ~.PackageWWWHome, "/README.md" ),
ArchiveURL := Concatenation( ~.SourceRepository.URL,
"/releases/download/v", ~.Version,
"/", ~.PackageName, "-", ~.Version ),
PackageWWWHome := "https://homalg-project.github.io/ArangoDBInterface",
PackageInfoURL := "https://homalg-project.github.io/ArangoDBInterface/PackageInfo.g",
README_URL := "https://homalg-project.github.io/ArangoDBInterface/README.md",
ArchiveURL := Concatenation( "https://github.com/homalg-project/ArangoDBInterface/releases/download/v", ~.Version, "/ArangoDBInterface-", ~.Version ),
# END URLS

ArchiveFormats := ".tar.gz",
ArchiveFormats := ".tar.gz .zip",

## Status information. Currently the following cases are recognized:
## "accepted" for successfully refereed packages
Expand All @@ -70,7 +70,7 @@ PackageDoc := rec(
HTMLStart := "doc/chap0.html",
PDFFile := "doc/manual.pdf",
SixFile := "doc/manual.six",
LongTitle := "An interface to ArangoDB",
LongTitle := "A GAP interface to ArangoDB",
),

Dependencies := rec(
Expand Down
45 changes: 35 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<!-- BEGIN HEADER -->
# ArangoDBInterface

| **Documentation** |
|:----------------------------------------:|
| [![][docs-stable-img]][docs-stable-url] |
### A GAP interface to ArangoDB

[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: https://homalg-project.github.io/ArangoDBInterface/doc/chap0.html
| Documentation | Latest Release |
| ------------- | -------------- |
| [![HTML stable documentation][html-img]][html-url] [![PDF stable documentation][pdf-img]][pdf-url] | [![version][version-img]][version-url] [![date][date-img]][date-url] |

[tests-img]: https://github.com/homalg-project/ArangoDBInterface/workflows/Tests/badge.svg
[tests-url]: https://github.com/homalg-project/ArangoDBInterface/

[codecov-img]: https://codecov.io/gh/homalg-project/ArangoDBInterface/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/homalg-project/ArangoDBInterface
<!-- END HEADER -->

The following example requires a running `arangod` on your system with a database having the following specifications:

Expand Down Expand Up @@ -168,3 +164,32 @@ gap> MarkFirstDocument( rec( TP := "x+y" ), rec( TP_lock := "me1" ), coll );
gap> MarkFirstDocument( rec( TP := "x+y" ), rec( TP_lock := "me2" ), coll );
[ArangoDocument]
```
<!-- BEGIN FOOTER -->
---

### Dependencies

To obtain current versions of all dependencies, `git clone` (or `git pull` to update) the following repositories:

| | Repository | git URL |
|--- | ---------- | ------- |
| 1. | [**homalg_project**](https://github.com/homalg-project/homalg_project#readme) | https://github.com/homalg-project/homalg_project.git |

[html-img]: https://img.shields.io/badge/HTML-stable-blue.svg
[html-url]: https://homalg-project.github.io/ArangoDBInterface/doc/chap0_mj.html

[pdf-img]: https://img.shields.io/badge/PDF-stable-blue.svg
[pdf-url]: https://homalg-project.github.io/ArangoDBInterface/download_pdf.html

[version-img]: https://img.shields.io/endpoint?url=https://homalg-project.github.io/ArangoDBInterface/badge_version.json
[version-url]: https://homalg-project.github.io/ArangoDBInterface/view_release.html

[date-img]: https://img.shields.io/endpoint?url=https://homalg-project.github.io/ArangoDBInterface/badge_date.json
[date-url]: https://homalg-project.github.io/ArangoDBInterface/view_release.html

[tests-img]: https://github.com/homalg-project/ArangoDBInterface/workflows/Tests/badge.svg?branch=master
[tests-url]: https://github.com/homalg-project/ArangoDBInterface/actions?query=workflow%3ATests+branch%3Amaster

[codecov-img]: https://codecov.io/gh/homalg-project/ArangoDBInterface/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/homalg-project/ArangoDBInterface
<!-- END FOOTER -->
3 changes: 1 addition & 2 deletions doc/clean
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#!/bin/sh
rm -f *.{aux,lab,log,dvi,ps,pdf,bbl,ilg,ind,idx,out,html,tex,pnr,txt,blg,toc,six,brf,xml,xml.bib,css,js} ../maketest.g ../VERSION ../public_html.version

rm -f *.{aux,bbl,blg,brf,css,html,idx,ilg,ind,js,lab,log,out,pdf,pnr,six,tex,toc,txt,xml,xml.bib}
4 changes: 2 additions & 2 deletions gap/ArangoDB.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# ArangoDBInterface: An interface to ArangoDB
# SPDX-License-Identifier: GPL-2.0-or-later
# ArangoDBInterface: A GAP interface to ArangoDB
#
# Declarations
#
Expand Down
4 changes: 2 additions & 2 deletions gap/ArangoDB.gi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# ArangoDBInterface: An interface to ArangoDB
# SPDX-License-Identifier: GPL-2.0-or-later
# ArangoDBInterface: A GAP interface to ArangoDB
#
# Implementations
#
Expand Down
4 changes: 2 additions & 2 deletions init.g
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# ArangoDBInterface: An interface to ArangoDB
# SPDX-License-Identifier: GPL-2.0-or-later
# ArangoDBInterface: A GAP interface to ArangoDB
#
# Reading the declaration part of the package.
#
Expand Down
10 changes: 3 additions & 7 deletions make_dist.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#/bin/bash
#!/bin/bash

base_dir="$PWD"
set -e

./release --srcdir ${base_dir} --webdir ${base_dir}/gh-pages --update-file ${base_dir}/gh-pages/update.g

echo "Please push website now"

exit 0
./release-gap-package --skip-existing-release $@
26 changes: 18 additions & 8 deletions makedoc.g
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
#
# ArangoDBInterface: An interface to ArangoDB
# SPDX-License-Identifier: GPL-2.0-or-later
# ArangoDBInterface: A GAP interface to ArangoDB
#
# This file is a script which compiles the package manual.
#
if fail = LoadPackage("AutoDoc", "2019.05.20") then
if fail = LoadPackage( "AutoDoc", "2019.05.20" ) then

Error("AutoDoc version 2019.05.20 or newer is required.");
Error( "AutoDoc version 2019.05.20 or newer is required." );

fi;

AutoDoc( rec(
scaffold := rec(
entities := [ "homalg", "CAP" ],
),
autodoc := rec(
files := [ "doc/Doc.autodoc" ],
scan_dirs := [ "doc", "gap", "examples", "examples/doc" ],
),
extract_examples := rec(
units := "Single",
),
gapdoc := rec(
LaTeXOptions := rec(
LateExtraPreamble := """
\usepackage{mathtools}
""",
),
),
scaffold := rec(
entities := [ "homalg", "CAP" ],
),
extract_examples := rec( units := "Single" ),
) );

QUIT;
43 changes: 43 additions & 0 deletions makedoc_with_overfull_hbox_warnings.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ArangoDBInterface: A GAP interface to ArangoDB
#
# This file is a script which compiles the package manual and prints overfull hbox warnings.
#
if fail = LoadPackage( "AutoDoc", "2019.05.20" ) then

Error( "AutoDoc version 2019.05.20 or newer is required." );

fi;

AutoDoc( rec(
dir := "doc_tmp/",
autodoc := rec(
files := [ "doc/Doc.autodoc" ],
scan_dirs := [ "doc", "gap", "examples", "examples/doc" ],
),
gapdoc := rec(
LaTeXOptions := rec(
LateExtraPreamble := """
\usepackage{mathtools}
% Many thanks to https://tex.stackexchange.com/questions/22466/how-to-convince-fancyvrb-to-give-overfull-warnings/534486#534486
\makeatletter
\def\FV@ListProcessLine#1{%
\hbox to \hsize{%
\kern\leftmargin
\hbox to \linewidth{%
\FV@LeftListNumber
\FV@LeftListFrame
\FancyVerbFormatLine{#1}\hfil % change \hss to \hfil
\FV@RightListFrame
\FV@RightListNumber}%
\hss}}
\makeatother
""",
),
),
scaffold := rec(
entities := [ "homalg", "CAP" ],
),
) );

QUIT;
Loading

0 comments on commit 63d948c

Please sign in to comment.