Skip to content

Commit cfbff10

Browse files
authored
Adapt to dylan-tool (#29)
- Add .gitignore - Add package description - Remove registry directory Will be created by dylan-tool - Adapt documentation to 'dylan-tool': - Fix broken link to papers in documentation - Update obsolete link with Web archive reference - Fix broken links to 'drm' ($unsupplied and `<byte>) - Move papers in PDF format to sub-directory 'papers' - Adapt sphinx-extensions path to 'dylan-tool' - Set 'furo' theme as default - Remove table of contents from documentation for compatibility with 'furo' theme. - Ignore certificate verification in documentation 'linkcheck' - Update CI actions - Ignore documentation paths on building and testing - Update checkout and install-opendylan actions - Use dylan-tool to update package and build tests - Report tests in Xml format to publish - Add build documentation action - Add dependabot
1 parent f6f558d commit cfbff10

File tree

14 files changed

+128
-20
lines changed

14 files changed

+128
-20
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/build-and-test.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@ name: build-and-test
33
on:
44
push:
55
# all branches
6+
paths-ignore:
7+
- 'documentation/**'
68
pull_request:
79
branches:
810
- main
911
- master
12+
paths-ignore:
13+
- 'documentation/**'
1014

1115
# This enables the Run Workflow button on the Actions tab.
1216
workflow_dispatch:
@@ -16,12 +20,21 @@ jobs:
1620
runs-on: ubuntu-latest
1721
steps:
1822

19-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
2024

21-
- uses: dylan-lang/install-opendylan@v2
25+
- uses: dylan-lang/install-opendylan@v3
26+
27+
- name: Update packages
28+
run: dylan update
2229

2330
- name: Build binary-data-test
24-
run: ./dylan-compiler -build binary-data-test
31+
run: dylan build binary-data-test
2532

2633
- name: Run binary-data-tests-test
27-
run: _build/bin/binary-data-test
34+
run: _build/bin/binary-data-test --progress none --report surefire > _build/TEST-binary-data.xml
35+
36+
- name: Publish Test Report
37+
if: success() || failure()
38+
uses: mikepenz/action-junit-report@v4
39+
with:
40+
report_paths: '**/_build/TEST-*.xml

.github/workflows/build-docs.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build documentation
2+
3+
on:
4+
push:
5+
# all branches
6+
paths:
7+
- 'documentation/**'
8+
pull_request:
9+
# all branches
10+
paths:
11+
- 'documentation/**'
12+
13+
# This enables the Run Workflow button on the Actions tab.
14+
workflow_dispatch:
15+
16+
# https://github.com/JamesIves/github-pages-deploy-action#readme
17+
permissions:
18+
contents: write
19+
20+
# Set DYLAN environment variable to GITHUB_WORKSPACE so packages are
21+
# installed in ../../_packages relative to documentation's Makefile
22+
env:
23+
DYLAN: ${{ github.workspace }}
24+
25+
jobs:
26+
27+
build-and-deploy:
28+
runs-on: ubuntu-latest
29+
steps:
30+
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
- name: Check links
35+
uses: addnab/docker-run-action@v3
36+
with:
37+
image: ghcr.io/fraya/dylan-docs
38+
options: -v ${{ github.workspace }}/documentation:/docs
39+
run: make linkcheck
40+
41+
- name: Build docs with Furo theme
42+
uses: addnab/docker-run-action@v3
43+
with:
44+
image: ghcr.io/fraya/dylan-docs
45+
options: -v ${{ github.workspace }}/documentation:/docs
46+
run: make html
47+
48+
- name: Upload html artifact
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: binary-data-doc-html
52+
path: documentation/build/html/
53+
54+
- name: Bypassing Jekyll on GH Pages
55+
run: sudo touch documentation/build/html/.nojekyll
56+
57+
- name: Deploy documents to GH pages
58+
uses: JamesIves/github-pages-deploy-action@v4
59+
with:
60+
folder: documentation/build/html

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
*~
12
*.hdp
23
*.iml
34
_build
45
.idea
56
documentation/build
7+
registry/
8+
_packages/

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ http://opendylan.org/documentation/binary-data/.
1616

1717
There are two papers about this project:
1818

19-
* `Secure networking <documentation/secure-networking.pdf>`_ [2006]
20-
* `A domain-specific language for manipulation of binary data in Dylan <documentation/a-DSL-for-manipulation-of-binary-data.pdf>`_ [2007]
19+
* `Secure networking <documentation/papers/secure-networking.pdf>`_ [2006]
20+
* `A domain-specific language for manipulation of binary data in Dylan <documentation/papers/a-DSL-for-manipulation-of-binary-data.pdf>`_ [2007]
2121

2222
.. _Genera Common Lisp operating system: http://en.wikipedia.org/wiki/Genera_%28operating_system%29
File renamed without changes.

documentation/source/conf.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
# serve to show the default.
1313

1414
import sys, os
15-
import sphinxcontrib.dylan.themes as dylan_themes
15+
16+
sys.path.insert(0, os.path.abspath('../../_packages/sphinx-extensions/current/src/sphinxcontrib'))
17+
18+
import dylan.themes as dylan_themes
1619

1720
# If extensions (or modules to document with autodoc) are in another directory,
1821
# add these directories to sys.path here. If the directory is relative to the
@@ -26,7 +29,9 @@
2629

2730
# Add any Sphinx extension module names here, as strings. They can be extensions
2831
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
29-
extensions = ['sphinxcontrib.dylan.domain']
32+
extensions = [
33+
'dylan.domain'
34+
]
3035

3136
# Add any paths that contain templates here, relative to this directory.
3237
templates_path = ['_templates']
@@ -98,7 +103,7 @@
98103

99104
# The theme to use for HTML and HTML Help pages. See the documentation for
100105
# a list of builtin themes.
101-
html_theme = dylan_themes.get_html_theme_default()
106+
html_theme = 'furo'
102107

103108
# Theme options are theme-specific and customize the look and feel of a theme
104109
# further. For a list of options available for each theme, see the
@@ -271,3 +276,6 @@
271276

272277
# If false, no index is generated.
273278
#epub_use_index = True
279+
280+
# Ignore certification verification
281+
tls_verify = False

documentation/source/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ at `GitHub
1919
Inspiration for this library is taken among others from the defstorage
2020
system available as part of the `Genera Common Lisp operating system
2121
<http://en.wikipedia.org/wiki/Genera_%28operating_system%29>`_ and the
22-
swiss-army knife for interactive packet manipulation `scapy
23-
<http://bb.secdev.org/scapy/wiki/Home>`__.
22+
swiss-army knife for interactive packet manipulation `scapy (Web archive)
23+
<http://web.archive.org/web/20131217022133/http://bb.secdev.org/scapy/wiki/Home>`__.
2424

2525
For further information, you might want to read our published papers
2626
about a TCP/IP stack written entirely in Dylan:
2727

28-
* :download:`A domain-specific language for manipulation of binary data in Dylan <../a-DSL-for-manipulation-of-binary-data.pdf>` (by Hannes Mehnert and Andreas Bogk at ILC 2007)
29-
* :download:`Secure Networking <../secure-networking.pdf>` (by Andreas Bogk and Hannes Mehnert in 2006)
28+
* :download:`A domain-specific language for manipulation of binary data in Dylan <../papers/a-DSL-for-manipulation-of-binary-data.pdf>` (by Hannes Mehnert and Andreas Bogk at ILC 2007)
29+
* :download:`Secure Networking <../papers/secure-networking.pdf>` (by Andreas Bogk and Hannes Mehnert in 2006)
3030

3131
.. toctree::
3232
:maxdepth: 3

documentation/source/reference.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ language instantiates these fields.
351351

352352
:keyword name: The name of this field.
353353
:keyword fixup: A unary Dylan function computing the value of this field, used if no default is supplied and none provided by the client, defaults to ``#f``.
354-
:keyword init-value: The default value if the client did not provide any, default :drm:`$unsupplied`.
354+
:keyword init-value: The default value if the client did not provide any, default `$unsupplied <https://opendylan.org/library-reference/common-dylan/common-extensions.html#common-dylan:common-extensions:$unsupplied>`_.
355355
:keyword static-end: A Dylan expression determining the end, defaults to :const:`$unknown-at-compile-time`.
356356
:keyword static-length: A Dylan expression determining the length, defaults to :const:`$unknown-at-compile-time`.
357357
:keyword static-start: A Dylan expression determining the start, defaults to :const:`$unknown-at-compile-time`.
@@ -958,11 +958,13 @@ Predefined Leaf Frames
958958

959959
.. class:: <unsigned-byte>
960960

961-
A single byte, represented as a :drm:`<byte>`.
961+
A single byte, represented as a `<byte>
962+
<https://opendylan.org/library-reference/common-dylan/byte-vector.html#common-dylan:byte-vector:[byte]>`_.
962963

963964
:operations:
964965

965-
- :gf:`high-level-type` returns :drm:`<byte>`.
966+
- :gf:`high-level-type` returns `<byte>
967+
https://opendylan.org/library-reference/common-dylan/byte-vector.html#common-dylan:byte-vector:[byte]`_.
966968
- :gf:`field-size` returns 8.
967969

968970
:superclasses: :class:`<fixed-size-translated-leaf-frame>`

0 commit comments

Comments
 (0)