Skip to content

Commit 57efeef

Browse files
authored
Merge pull request #45 from cicirello/development
API documentation website improved browsing on mobile devices
2 parents 6340876 + f47bbfa commit 57efeef

File tree

85 files changed

+592
-307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+592
-307
lines changed

.github/workflows/api-webpage-sitemap.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/api-website.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches: [ development ]
6+
paths: [ '**.java' ]
7+
8+
jobs:
9+
api-website:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout the repo
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Set up JDK 1.11
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 1.11
21+
22+
- name: Clean docs
23+
run: ant -noinput -buildfile build/builddocs.xml clean
24+
25+
- name: Build docs with Ant
26+
run: ant -noinput -buildfile build/builddocs.xml
27+
28+
- name: Tidy up the javadocs
29+
id: tidy
30+
uses: cicirello/[email protected]
31+
with:
32+
base-url-path: https://jpt.cicirello.org/
33+
path-to-root: docs
34+
35+
- name: Log javadoc-cleanup output
36+
run: |
37+
echo "modified-count = ${{ steps.tidy.outputs.modified-count }}"
38+
39+
- name: Commit documentation changes
40+
run: |
41+
if [ $(git status | grep -c "**/*.html") == "0" ]; then
42+
git checkout .
43+
else
44+
git config --global user.name 'Vincent A Cicirello'
45+
git config --global user.email '[email protected]'
46+
git commit -am "Automated API website updates."
47+
fi
48+
49+
- name: Generate the sitemap
50+
id: sitemap
51+
uses: cicirello/[email protected]
52+
with:
53+
base-url-path: https://jpt.cicirello.org/
54+
path-to-root: docs
55+
56+
- name: Output stats
57+
run: |
58+
echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
59+
echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
60+
echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
61+
62+
- name: Create Pull Request
63+
uses: peter-evans/[email protected]
64+
with:
65+
title: "Automated API website updates."
66+
body: >
67+
Automated changes to the API documentation website.
68+
Documentation updated via javadoc. Sitemap updated by
69+
the [generate-sitemap](https://github.com/cicirello/generate-sitemap)
70+
GitHub action. Automated pull-request generated by
71+
[create-pull-request](https://github.com/peter-evans/create-pull-request)
72+
GitHub action.
73+
commit-message: "Automated API documentation website updates."
74+
author: Vincent A Cicirello <[email protected]>
75+
committer: Vincent A Cicirello <[email protected]>
76+
delete-branch: true
77+

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased] - 2020-09-18
7+
## [Unreleased] - 2020-09-22
88
### Added
99

1010
### Changed
11+
* Modified API documentation website (https://jpt.cicirello.org/) to improve browsing on mobile devices.
1112

1213
### Deprecated
1314

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Website: https://jpt.cicirello.org/
99
| __Publications About the Library__ | [![DOI](http://joss.theoj.org/papers/10.21105/joss.00950/status.svg)](https://doi.org/10.21105/joss.00950) |
1010
| :--- | :--- |
1111
| __Packages and Releases__ | [![Maven Central](https://img.shields.io/maven-central/v/org.cicirello/jpt.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.cicirello/jpt) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/cicirello/JavaPermutationTools?logo=GitHub)](https://github.com/cicirello/JavaPermutationTools/releases) [![DOI](https://zenodo.org/badge/139182095.svg)](https://zenodo.org/badge/latestdoi/139182095) |
12-
| __Source and Build Info__ | [![build](https://github.com/cicirello/JavaPermutationTools/workflows/build/badge.svg)](https://github.com/cicirello/JavaPermutationTools/actions?query=workflow%3Abuild) [![GitHub](https://img.shields.io/github/license/cicirello/JavaPermutationTools)](https://github.com/cicirello/JavaPermutationTools/blob/master/LICENSE) |
12+
| __Source and Build Info__ | [![build](https://github.com/cicirello/JavaPermutationTools/workflows/build/badge.svg)](https://github.com/cicirello/JavaPermutationTools/actions?query=workflow%3Abuild) [![docs](https://github.com/cicirello/JavaPermutationTools/workflows/docs/badge.svg)](https://github.com/cicirello/JavaPermutationTools/actions?query=workflow%3Adocs) [![GitHub](https://img.shields.io/github/license/cicirello/JavaPermutationTools)](https://github.com/cicirello/JavaPermutationTools/blob/master/LICENSE) |
1313

1414
## How to Cite
1515

build/build.xml

Lines changed: 83 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,95 @@
11
<project name="JPT" default="all" basedir="..">
2-
<description>
3-
Build file for the Java Permutation Tools (JPT) API.
4-
</description>
5-
<!-- global properties for this build -->
6-
<property name="VERSION" value="2.0.1"/>
7-
<property name="JDKVERSION" value="1.8"/>
8-
<property name="junit" location="build/junit-4.12.jar"/>
9-
<property name="hamcrest" location="build/hamcrest-core-1.3.jar"/>
10-
<property name="src" location="src"/>
11-
<property name="bin" location="bin"/>
12-
<property name="testsrc" location="tests"/>
13-
<property name="testbin" location="testbin"/>
14-
<property name="dist" location="dist"/>
15-
<property name="examples" location="examples"/>
16-
<property name="replication" location="replication"/>
17-
<property name="examplebin" location="exbin"/>
18-
<property name="docdir" location="docs/api"/>
2+
<description>Build file for the Java Permutation Tools (JPT) API.
3+
</description>
4+
<!-- global properties for this build -->
5+
<property name="VERSION" value="2.0.1"/>
6+
<property name="JDKVERSION" value="1.8"/>
7+
<property name="junit" location="build/junit-4.12.jar"/>
8+
<property name="hamcrest" location="build/hamcrest-core-1.3.jar"/>
9+
<property name="src" location="src"/>
10+
<property name="bin" location="bin"/>
11+
<property name="testsrc" location="tests"/>
12+
<property name="testbin" location="testbin"/>
13+
<property name="dist" location="dist"/>
14+
<property name="examples" location="examples"/>
15+
<property name="replication" location="replication"/>
16+
<property name="examplebin" location="exbin"/>
1917

20-
<target name="init">
21-
<!-- Create the time stamp -->
22-
<tstamp/>
23-
<!-- Create the build directory structure used by compile -->
24-
<mkdir dir="${bin}"/>
25-
<!-- Create the test directory structure-->
26-
<mkdir dir="${testbin}"/>
27-
<!-- Create the test directory structure-->
28-
<mkdir dir="${docdir}"/>
29-
</target>
18+
<target name="init">
19+
<!-- Create the time stamp -->
20+
<tstamp/>
21+
<!-- Create the build directory structure used by compile -->
22+
<mkdir dir="${bin}"/>
23+
<!-- Create the test directory structure-->
24+
<mkdir dir="${testbin}"/>
25+
</target>
3026

31-
<target name="compile" depends="init"
32-
description="compile the source">
33-
<!-- Compile the Java code from ${src} into ${bin} -->
34-
<javac srcdir="${src}" destdir="${bin}" includeantruntime="false"
35-
source="${JDKVERSION}" target="${JDKVERSION}">
36-
<!--
37-
<compilerarg value="-Xlint:unchecked"/>
38-
-->
39-
<compilerarg value="-Xlint:deprecation"/>
40-
</javac>
41-
<!-- Compile the JUnit tests from ${testsrc} into ${testbin} -->
42-
<javac srcdir="${testsrc}" destdir="${testbin}" classpath="${junit};${bin}"
43-
includeantruntime="false" source="${JDKVERSION}" target="${JDKVERSION}"/>
44-
</target>
27+
<target name="compile" depends="init"
28+
description="compile the source">
29+
<!-- Compile the Java code from ${src} into ${bin} -->
30+
<javac srcdir="${src}" destdir="${bin}" includeantruntime="false"
31+
source="${JDKVERSION}" target="${JDKVERSION}">
32+
<!--
33+
<compilerarg value="-Xlint:unchecked"/>
34+
-->
35+
<compilerarg value="-Xlint:deprecation"/>
36+
</javac>
37+
<!-- Compile the JUnit tests from ${testsrc} into ${testbin} -->
38+
<javac srcdir="${testsrc}" destdir="${testbin}" classpath="${junit};${bin}"
39+
includeantruntime="false" source="${JDKVERSION}" target="${JDKVERSION}"/>
40+
</target>
4541

46-
<target name="test" depends="compile"
47-
description="execute JUnit tests">
48-
<junit haltonfailure="on">
49-
<formatter type="plain" usefile="false"/>
50-
<classpath>
51-
<pathelement location="${junit}"/>
52-
<pathelement location="${hamcrest}"/>
53-
<pathelement location="${bin}"/>
54-
<pathelement location="${testbin}"/>
55-
</classpath>
56-
<batchtest>
57-
<fileset dir="${testbin}">
58-
<include name="**/*.class"/>
59-
<exclude name="**/*$*"/>
60-
</fileset>
61-
</batchtest>
62-
</junit>
63-
</target>
42+
<target name="test" depends="compile"
43+
description="execute JUnit tests">
44+
<junit haltonfailure="on">
45+
<formatter type="plain" usefile="false"/>
46+
<classpath>
47+
<pathelement location="${junit}"/>
48+
<pathelement location="${hamcrest}"/>
49+
<pathelement location="${bin}"/>
50+
<pathelement location="${testbin}"/>
51+
</classpath>
52+
<batchtest>
53+
<fileset dir="${testbin}">
54+
<include name="**/*.class"/>
55+
<exclude name="**/*$*"/>
56+
</fileset>
57+
</batchtest>
58+
</junit>
59+
</target>
6460

65-
<target name="dist" depends="compile,test"
66-
description="generate the distribution">
67-
<!-- Create the distribution directory -->
68-
<mkdir dir="${dist}"/>
69-
<!-- Put everything in ${bin} into the jpt${VERSION}.jar file -->
70-
<jar jarfile="${dist}/jpt-${VERSION}.jar" basedir="${bin}"/>
71-
</target>
61+
<target name="dist" depends="compile,test"
62+
description="generate the distribution">
63+
<!-- Create the distribution directory -->
64+
<mkdir dir="${dist}"/>
65+
<!-- Put everything in ${bin} into the jpt${VERSION}.jar file -->
66+
<jar jarfile="${dist}/jpt-${VERSION}.jar" basedir="${bin}"/>
67+
</target>
7268

73-
<target name="examples" depends="dist"
69+
<target name="examples" depends="dist"
7470
description="compiles example programs and experiment replication programs">
75-
<!-- Create directory for bin of examples and replication programs -->
76-
<mkdir dir="${examplebin}"/>
77-
<!-- Compile basic examples -->
78-
<javac srcdir="${examples}" destdir="${examplebin}"
79-
classpath="${dist}/jpt-${VERSION}.jar;${examples}" includeantruntime="false"
80-
source="${JDKVERSION}" target="${JDKVERSION}"/>
81-
<!-- Compile experiment replication programs -->
82-
<javac srcdir="${replication}" destdir="${examplebin}"
83-
classpath="${dist}/jpt-${VERSION}.jar;${replication}" includeantruntime="false"
84-
source="${JDKVERSION}" target="${JDKVERSION}"/>
85-
</target>
71+
<!-- Create directory for bin of examples and replication programs -->
72+
<mkdir dir="${examplebin}"/>
73+
<!-- Compile basic examples -->
74+
<javac srcdir="${examples}" destdir="${examplebin}"
75+
classpath="${dist}/jpt-${VERSION}.jar;${examples}" includeantruntime="false"
76+
source="${JDKVERSION}" target="${JDKVERSION}"/>
77+
<!-- Compile experiment replication programs -->
78+
<javac srcdir="${replication}" destdir="${examplebin}"
79+
classpath="${dist}/jpt-${VERSION}.jar;${replication}" includeantruntime="false"
80+
source="${JDKVERSION}" target="${JDKVERSION}"/>
81+
</target>
8682

87-
<target name="docs" depends="dist"
88-
description="generates documentation via javadoc">
89-
<javadoc destdir="${docdir}"
90-
sourcepath="${src}"
91-
windowtitle="JavaPermutationTools - A Java API for computation on permutations"
92-
doctitle="JavaPermutationTools - A Java API for computation on permutations"
93-
overview="src/overview.html"
94-
author="false"
95-
version="false"
96-
additionalparam="-notimestamp --no-module-directories"
97-
source="${JDKVERSION}">
98-
<link href="https://docs.oracle.com/javase/8/docs/api/" packagelistLoc="build/java-package-list" offline="true" />
99-
<bottom><![CDATA[Copyright &copy; 2005-2019 Vincent A. Cicirello. <a href=\"https://www.cicirello.org/\" target=_top>https://www.cicirello.org/</a>]]></bottom>
100-
</javadoc>
101-
</target>
10283

103-
<target name="all" depends="dist,examples,docs" description="compile everything including example programs and generates library jar">
104-
</target>
84+
<target name="all" depends="dist,examples" description="compile everything including example programs and generates library jar">
85+
</target>
10586

106-
<target name="clean"
107-
description="clean up">
108-
<!-- Delete the ${bin} and ${dist} directory trees -->
109-
<delete dir="${bin}"/>
110-
<delete dir="${testbin}"/>
111-
<delete dir="${examplebin}"/>
112-
<delete dir="${docdir}"/>
113-
</target>
87+
<target name="clean"
88+
description="clean up">
89+
<!-- Delete the ${bin} and ${dist} directory trees -->
90+
<delete dir="${bin}"/>
91+
<delete dir="${testbin}"/>
92+
<delete dir="${examplebin}"/>
93+
</target>
11494

11595
</project>

build/builddocs.xml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<project name="JPT" default="all" basedir="..">
2+
<description>Build file for the API
3+
documentation for Java Permutation Tools (JPT).
4+
</description>
5+
<!-- global properties for this build -->
6+
<property name="JDKVERSION" value="1.8"/>
7+
<property name="src" location="src"/>
8+
<property name="docdir" location="docs/api"/>
9+
10+
<target name="init">
11+
<!-- Create the time stamp -->
12+
<!-- tstamp -->
13+
<mkdir dir="${docdir}"/>
14+
</target>
15+
16+
<target name="docs" depends="init"
17+
description="generates documentation via javadoc">
18+
<javadoc destdir="${docdir}"
19+
sourcepath="${src}"
20+
windowtitle="JavaPermutationTools - A Java API for computation on permutations"
21+
doctitle="JavaPermutationTools - A Java API for computation on permutations"
22+
overview="src/overview.html"
23+
author="false"
24+
version="false"
25+
additionalparam="-notimestamp --no-module-directories"
26+
source="${JDKVERSION}"
27+
failonerror="true"
28+
failonwarning="true">
29+
<link href="https://docs.oracle.com/javase/8/docs/api/" packagelistLoc="build/java-package-list" offline="true" />
30+
<bottom><![CDATA[Copyright &copy; 2005-2020 Vincent A. Cicirello. <a href=https://www.cicirello.org/ target=_top>https://www.cicirello.org/</a>]]></bottom>
31+
</javadoc>
32+
</target>
33+
34+
<target name="all" depends="docs" description="generates javadoc">
35+
</target>
36+
37+
<target name="clean" description="clean up">
38+
<delete includeEmptyDirs="true">
39+
<fileset dir="${docdir}" includes="**/*" />
40+
</delete>
41+
</target>
42+
43+
</project>

0 commit comments

Comments
 (0)