From 3ab6e0cb7530e397a834410562983a4ff707f6b1 Mon Sep 17 00:00:00 2001 From: Fernando Raya Date: Sun, 31 Mar 2024 13:34:46 +0200 Subject: [PATCH] Adapt to dylan-tool - 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 ) - 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 --- .github/dependabot.yml | 11 ++++ .github/workflows/build-and-test.yml | 21 ++++-- .github/workflows/build-docs.yml | 60 ++++++++++++++++++ .gitignore | 3 + README.rst | 4 +- .../a-DSL-for-manipulation-of-binary-data.pdf | Bin .../{ => papers}/secure-networking.pdf | Bin documentation/source/conf.py | 14 +++- documentation/source/index.rst | 8 +-- documentation/source/reference.rst | 8 ++- documentation/source/usage.rst | 2 - dylan-package.json | 15 +++++ registry/generic/binary-data | 1 - registry/generic/binary-data-test | 1 - 14 files changed, 128 insertions(+), 20 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build-docs.yml rename documentation/{ => papers}/a-DSL-for-manipulation-of-binary-data.pdf (100%) rename documentation/{ => papers}/secure-networking.pdf (100%) create mode 100644 dylan-package.json delete mode 100644 registry/generic/binary-data delete mode 100644 registry/generic/binary-data-test diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..0d08e26 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index ec8c97a..95ef36b 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -3,10 +3,14 @@ name: build-and-test on: push: # all branches + paths-ignore: + - 'documentation/**' pull_request: branches: - main - master + paths-ignore: + - 'documentation/**' # This enables the Run Workflow button on the Actions tab. workflow_dispatch: @@ -16,12 +20,21 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: dylan-lang/install-opendylan@v2 + - uses: dylan-lang/install-opendylan@v3 + + - name: Update packages + run: dylan update - name: Build binary-data-test - run: ./dylan-compiler -build binary-data-test + run: dylan build binary-data-test - name: Run binary-data-tests-test - run: _build/bin/binary-data-test + run: _build/bin/binary-data-test --progress none --report surefire > _build/TEST-binary-data.xml + + - name: Publish Test Report + if: success() || failure() + uses: mikepenz/action-junit-report@v4 + with: + report_paths: '**/_build/TEST-*.xml diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 0000000..1b554a9 --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,60 @@ +name: Build documentation + +on: + push: + # all branches + paths: + - 'documentation/**' + pull_request: + # all branches + paths: + - 'documentation/**' + + # This enables the Run Workflow button on the Actions tab. + workflow_dispatch: + +# https://github.com/JamesIves/github-pages-deploy-action#readme +permissions: + contents: write + +# Set DYLAN environment variable to GITHUB_WORKSPACE so packages are +# installed in ../../_packages relative to documentation's Makefile +env: + DYLAN: ${{ github.workspace }} + +jobs: + + build-and-deploy: + runs-on: ubuntu-latest + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Check links + uses: addnab/docker-run-action@v3 + with: + image: ghcr.io/fraya/dylan-docs + options: -v ${{ github.workspace }}/documentation:/docs + run: make linkcheck + + - name: Build docs with Furo theme + uses: addnab/docker-run-action@v3 + with: + image: ghcr.io/fraya/dylan-docs + options: -v ${{ github.workspace }}/documentation:/docs + run: make html + + - name: Upload html artifact + uses: actions/upload-artifact@v4 + with: + name: binary-data-doc-html + path: documentation/build/html/ + + - name: Bypassing Jekyll on GH Pages + run: sudo touch documentation/build/html/.nojekyll + + - name: Deploy documents to GH pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: documentation/build/html diff --git a/.gitignore b/.gitignore index dd50cb9..b7f523b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ +*~ *.hdp *.iml _build .idea documentation/build +registry/ +_packages/ diff --git a/README.rst b/README.rst index ec0dc7f..50d8f14 100644 --- a/README.rst +++ b/README.rst @@ -16,7 +16,7 @@ http://opendylan.org/documentation/binary-data/. There are two papers about this project: -* `Secure networking `_ [2006] -* `A domain-specific language for manipulation of binary data in Dylan `_ [2007] +* `Secure networking `_ [2006] +* `A domain-specific language for manipulation of binary data in Dylan `_ [2007] .. _Genera Common Lisp operating system: http://en.wikipedia.org/wiki/Genera_%28operating_system%29 diff --git a/documentation/a-DSL-for-manipulation-of-binary-data.pdf b/documentation/papers/a-DSL-for-manipulation-of-binary-data.pdf similarity index 100% rename from documentation/a-DSL-for-manipulation-of-binary-data.pdf rename to documentation/papers/a-DSL-for-manipulation-of-binary-data.pdf diff --git a/documentation/secure-networking.pdf b/documentation/papers/secure-networking.pdf similarity index 100% rename from documentation/secure-networking.pdf rename to documentation/papers/secure-networking.pdf diff --git a/documentation/source/conf.py b/documentation/source/conf.py index b92788c..5cb4e3e 100644 --- a/documentation/source/conf.py +++ b/documentation/source/conf.py @@ -12,7 +12,10 @@ # serve to show the default. import sys, os -import sphinxcontrib.dylan.themes as dylan_themes + +sys.path.insert(0, os.path.abspath('../../_packages/sphinx-extensions/current/src/sphinxcontrib')) + +import dylan.themes as dylan_themes # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -26,7 +29,9 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinxcontrib.dylan.domain'] +extensions = [ + 'dylan.domain' +] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -98,7 +103,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = dylan_themes.get_html_theme_default() +html_theme = 'furo' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -271,3 +276,6 @@ # If false, no index is generated. #epub_use_index = True + +# Ignore certification verification +tls_verify = False diff --git a/documentation/source/index.rst b/documentation/source/index.rst index 008d4bf..76b573c 100644 --- a/documentation/source/index.rst +++ b/documentation/source/index.rst @@ -19,14 +19,14 @@ at `GitHub Inspiration for this library is taken among others from the defstorage system available as part of the `Genera Common Lisp operating system `_ and the -swiss-army knife for interactive packet manipulation `scapy -`__. +swiss-army knife for interactive packet manipulation `scapy (Web archive) +`__. For further information, you might want to read our published papers about a TCP/IP stack written entirely in Dylan: -* :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) -* :download:`Secure Networking <../secure-networking.pdf>` (by Andreas Bogk and Hannes Mehnert in 2006) +* :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) +* :download:`Secure Networking <../papers/secure-networking.pdf>` (by Andreas Bogk and Hannes Mehnert in 2006) .. toctree:: :maxdepth: 3 diff --git a/documentation/source/reference.rst b/documentation/source/reference.rst index 384037a..e172afa 100644 --- a/documentation/source/reference.rst +++ b/documentation/source/reference.rst @@ -351,7 +351,7 @@ language instantiates these fields. :keyword name: The name of this field. :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``. - :keyword init-value: The default value if the client did not provide any, default :drm:`$unsupplied`. + :keyword init-value: The default value if the client did not provide any, default `$unsupplied `_. :keyword static-end: A Dylan expression determining the end, defaults to :const:`$unknown-at-compile-time`. :keyword static-length: A Dylan expression determining the length, defaults to :const:`$unknown-at-compile-time`. :keyword static-start: A Dylan expression determining the start, defaults to :const:`$unknown-at-compile-time`. @@ -958,11 +958,13 @@ Predefined Leaf Frames .. class:: - A single byte, represented as a :drm:``. + A single byte, represented as a ` + `_. :operations: - - :gf:`high-level-type` returns :drm:``. + - :gf:`high-level-type` returns ` + https://opendylan.org/library-reference/common-dylan/byte-vector.html#common-dylan:byte-vector:[byte]`_. - :gf:`field-size` returns 8. :superclasses: :class:`` diff --git a/documentation/source/usage.rst b/documentation/source/usage.rst index d65ad02..b6ff0ed 100644 --- a/documentation/source/usage.rst +++ b/documentation/source/usage.rst @@ -4,8 +4,6 @@ Usage .. current-library:: binary-data .. current-module:: binary-data -.. contents:: - :local: Terminology =========== diff --git a/dylan-package.json b/dylan-package.json new file mode 100644 index 0000000..d25ee57 --- /dev/null +++ b/dylan-package.json @@ -0,0 +1,15 @@ +{ + "category": "parsers", + "contact": "dylan-lang@googlegroups.com", + "description": "A DSL for parsing and assembling binary data", + "keywords": [ "binary", "parser" ], + "name": "binary-data", + "dependencies": [], + "dev-dependencies" : [ + "testworks", + "sphinx-extensions" + ], + "license": "MIT", + "url": "A DSL for parsing and assembling binary data", + "version": "0.1.1" +} diff --git a/registry/generic/binary-data b/registry/generic/binary-data deleted file mode 100644 index 1a8644f..0000000 --- a/registry/generic/binary-data +++ /dev/null @@ -1 +0,0 @@ -abstract://dylan/binary-data.lid diff --git a/registry/generic/binary-data-test b/registry/generic/binary-data-test deleted file mode 100644 index db33a1c..0000000 --- a/registry/generic/binary-data-test +++ /dev/null @@ -1 +0,0 @@ -abstract://dylan/tests/binary-data-test.lid