Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect broken links for haddock,metatheory,docusaurus + local repo files #6294

Merged
merged 8 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:
attributes:
value: |
Thanks for taking the time to fill out this bug report.
Please check the existing issues, [Plutus Docs](https://intersectmbo.github.io/plutus/docs) and [Cardano Stack Exchange](https://cardano.stackexchange.com/) before raising.
Please check the existing issues, [Plutus Docs](https://plutus.cardano.intersectmbo.org/docs) and [Cardano Stack Exchange](https://cardano.stackexchange.com/) before raising.
- type: textarea
id: summary
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
attributes:
value: |
Thanks for taking the time to fill out this feature request.
Please check the existing issues and [Plutus Docs](https://intersectmbo.github.io/plutus/docs) before raising.
Please check the existing issues and [Plutus Docs](https://plutus.cardano.intersectmbo.org/docs) before raising.
- type: textarea
id: description
attributes:
Expand Down
27 changes: 9 additions & 18 deletions .github/workflows/broken-links.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
# This job checks for broken links in the various files.
# This job checks for broken links in various files in the repo.

name: "🔗 Broken Links"

on:
schedule:
- cron: 0 0 * * * # Daily at midnight
workflow_dispatch: # Or manually dispatch the job
pull_request:
paths:
- .github/ISSUE_TEMPLATE/bug_report.yml
- .github/ISSUE_TEMPLATE/feature_request.yml
- .github/PULL_REQUEST_TEMPLATE.md
- .github/SECURITY.md
- CODE_OF_CONDUCT.md
- CONTRIBUTING.adoc
- LICENSE
- NOTICE
- README.adoc
- RELEASE.adoc
- STYLEGUIDE.adoc
push:
branches:
master

jobs:
check:
Expand All @@ -30,4 +18,7 @@ jobs:

- name: Run Linkchecker
run: |
nix develop --no-warn-dirty --accept-flake-config --command ./scripts/check-broken-links.sh
nix develop --no-warn-dirty --accept-flake-config --command ./scripts/check-broken-links.sh



16 changes: 14 additions & 2 deletions .github/workflows/docusaurus-site.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This workflow builds and publishes the Docusaurus site to:
# https://intersectmbo.github.io/plutus/docs
# https://plutus.cardano.intersectmbo.org/docs

name: "🦕 Docusaurus Site"

Expand Down Expand Up @@ -31,4 +31,16 @@ jobs:
folder: doc/docusaurus/build
target-folder: docs
single-commit: true


- name: Check Broken Links
run: |
IGNORE_URLS=(
--ignore-url "https://plutus.cardano.intersectmbo.org/haddock/.*"
)
URL="https://plutus.cardano.intersectmbo.org/docs"
linkchecker --no-warnings --check-extern --output failures "${URL}" "${IGNORE_URLS[@]}"
if [ $? -ne 0 ]; then
echo "${URL} has broken links, see output above"
exit 1
fi

295 changes: 289 additions & 6 deletions .github/workflows/haddock-site.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .github/workflows/longitudinal-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# It will collect and aggreate the benchmark output, format it and feed it to the
# github-action-benchmark action.
#
# The benchmark charts are live at https://intersectmbo.github.io/plutus/dev/bench
# The benchmark data is available at https://intersectmbo.github.io/plutus/dev/bench/data.js
# The benchmark charts are live at https://plutus.cardano.intersectmbo.org/dev/bench
# The benchmark data is available at https://plutus.cardano.intersectmbo.org/dev/bench/data.js
#
# This is a performance regression check that is run on every push master.

Expand Down
52 changes: 10 additions & 42 deletions .github/workflows/metatheory-site.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,12 @@
# This workflow builds and publishes the metatheory site to:
# https://intersectmbo.github.io/plutus/metatheory/$version
# And optionally to:
# https://intersectmbo.github.io/plutus/metatheory/latest
# On push to master, this workflows publishes to:
# https://intersectmbo.github.io/plutus/metatheory/master
# https://plutus.cardano.intersectmbo.org/metatheory

name: "🔮 Metatheory Site"

on:
push:
branches:
- master

workflow_dispatch:
inputs:
ref:
description: |
The $ref to build off of, e.g. "1.29.0.0", "master", or any other valid git ref.
When making a release, this is usually the version tag, e.g. "1.29.0.0", and will be
equal to the $destination input below. When back-porting this could be a commit sha instead.
required: true
type: string

destination:
description: |
The $destination folder, e.g. when "1.29.0.0" the metatheory will be deploy to:
https://intersectmbo.github.io/plutus/metatheory/1.29.0.0
required: true
type: string

latest:
description: |
If true, then the metatheory site will also be deploy to:
https://intersectmbo.github.io/plutus/metatheory/latest.
You want to leave this to true unless you are deploying old versions or back-porting.
type: boolean
required: true
default: true

jobs:
deploy:
Expand All @@ -49,8 +19,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@main
with:
ref: ${{ inputs.ref || github.ref_name }}

- name: Build Site
run: |
Expand All @@ -62,14 +30,14 @@ jobs:
uses: JamesIves/github-pages-deploy-action@v4.6.3
with:
folder: _site
target-folder: metatheory/${{ inputs.destination || github.ref_name }}
single-commit: true

- name: Deploy Latest
if: ${{ inputs.latest == true }}
uses: JamesIves/github-pages-deploy-action@v4.6.3
with:
folder: _site
target-folder: metatheory/latest
target-folder: metatheory
single-commit: true

- name: Check Broken Links
run: |
URL="https://plutus.cardano.intersectmbo.org/metatheory"
linkchecker --no-warnings --check-extern --output failures "${URL}"
if [ $? -ne 0 ]; then
echo "${URL}" has broken links, see output above"
exit 1
fi
2 changes: 1 addition & 1 deletion .github/workflows/papers-and-specs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This job builds various papers and deploys them to:
# https://intersectmbo.github.io/plutus/resources
# https://plutus.cardano.intersectmbo.org/resources

name: "📝 Papers & Specs"

Expand Down
22 changes: 11 additions & 11 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ After setting it up you should just be able to depend on the `plutus` packages a

=== User documentation

The main documentation is located https://intersectmbo.github.io/plutus/docs/[here].
The main documentation is located https://plutus.cardano.intersectmbo.org/docs/[here].

The haddock documentation is located https://intersectmbo.github.io/plutus/haddock/latest[here].
The haddock documentation is located https://plutus.cardano.intersectmbo.org/haddock/latest[here].

The documentation for the metatheory can be found https://intersectmbo.github.io/plutus/metatheory/latest[here].
The documentation for the metatheory can be found https://plutus.cardano.intersectmbo.org/metatheory[here].

=== Talks

Expand All @@ -55,17 +55,17 @@ The documentation for the metatheory can be found https://intersectmbo.github.io

=== Specifications and design

- https://intersectmbo.github.io/plutus/resources/plutus-report.pdf[Plutus Technical Report (draft)]: a technical report and design document for the project.
- https://intersectmbo.github.io/plutus/resources/plutus-core-spec.pdf[Plutus Core Specification]: the formal specification of the core language.
- https://intersectmbo.github.io/plutus/resources/extended-utxo-spec.pdf[Extended UTXO Model]: a design document for the core changes to the Cardano ledger.
- https://plutus.cardano.intersectmbo.org/resources/plutus-report.pdf[Plutus Technical Report (draft)]: a technical report and design document for the project.
- https://plutus.cardano.intersectmbo.org/resources/plutus-core-spec.pdf[Plutus Core Specification]: the formal specification of the core language.
- https://plutus.cardano.intersectmbo.org/resources/extended-utxo-spec.pdf[Extended UTXO Model]: a design document for the core changes to the Cardano ledger.

=== Academic papers

- https://intersectmbo.github.io/plutus/resources/unraveling-recursion-paper.pdf[Unraveling Recursion]: a description of some of the compilation strategies used in Plutus IR (https://doi.org/10.1007/978-3-030-33636-3_15[published version]).
- https://intersectmbo.github.io/plutus/resources/system-f-in-agda-paper.pdf[System F in Agda]: a formal model of System F in Agda (https://doi.org/10.1007/978-3-030-33636-3_10[published version]).
- https://intersectmbo.github.io/plutus/resources/eutxo-paper.pdf[The Extended UTXO Model]: a full presentation of the EUTXO ledger extension (https://doi.org/10.1007/978-3-030-54455-3_37[published version]).
- https://intersectmbo.github.io/plutus/resources/utxoma-paper.pdf[UTXOma: UTXO with Multi-Asset Support]: a full presentation of the multi-asset ledger extension (https://doi.org/10.1007/978-3-030-61467-6_8[published version]).
- https://intersectmbo.github.io/plutus/resources/eutxoma-paper.pdf[Native Custom Tokens in the Extended UTXO Model]: a discussion of the interaction of the multi-asset support with EUTXO (https://doi.org/10.1007/978-3-030-61467-6_7[published version]).
- https://plutus.cardano.intersectmbo.org/resources/unraveling-recursion-paper.pdf[Unraveling Recursion]: a description of some of the compilation strategies used in Plutus IR (https://doi.org/10.1007/978-3-030-33636-3_15[published version]).
- https://plutus.cardano.intersectmbo.org/resources/system-f-in-agda-paper.pdf[System F in Agda]: a formal model of System F in Agda (https://doi.org/10.1007/978-3-030-33636-3_10[published version]).
- https://plutus.cardano.intersectmbo.org/resources/eutxo-paper.pdf[The Extended UTXO Model]: a full presentation of the EUTXO ledger extension (https://doi.org/10.1007/978-3-030-54455-3_37[published version]).
- https://plutus.cardano.intersectmbo.org/resources/utxoma-paper.pdf[UTXOma: UTXO with Multi-Asset Support]: a full presentation of the multi-asset ledger extension (https://doi.org/10.1007/978-3-030-61467-6_8[published version]).
- https://plutus.cardano.intersectmbo.org/resources/eutxoma-paper.pdf[Native Custom Tokens in the Extended UTXO Model]: a discussion of the interaction of the multi-asset support with EUTXO (https://doi.org/10.1007/978-3-030-61467-6_7[published version]).
- https://arxiv.org/abs/2201.04919[Translation Certification for Smart Contracts]: a certifier of Plutus IR compiler passes written in Coq.

== Licensing
Expand Down
2 changes: 1 addition & 1 deletion doc/docusaurus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ yarn start # for live development on localhost

Go to the [docusaurus-site.yml](https://github.com/IntersectMBO/plutus/actions/workflows/docusaurus-site.yml) workflow and click `Run workflow` on the right.

This will build and publish the website to [GitHub pages](https://intersectmbo.github.io/plutus/docs).
This will build and publish the website to [GitHub pages](https://plutus.cardano.intersectmbo.org/plutus/docs).
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ Supporting "mixed" code in this way enables libraries written with the Plutus Ha

The formal details of Plutus Core are in its [specification](https://github.com/IntersectMBO/plutus#specifications-and-design).

The design is discussed in the [technical report](https://intersectmbo.github.io/plutus/resources/plutus-report.pdf).
The design is discussed in the [technical report](https://plutus.cardano.intersectmbo.org/plutus/resources/plutus-report.pdf).
2 changes: 1 addition & 1 deletion doc/docusaurus/docs/essential-concepts/plutus-platform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ Even simple applications must deal with this complexity, and for more advanced a

- Michael Peyton-Jones and Jann Mueller introduce the Plutus platform in [this session](https://youtu.be/usMPt8KpBeI?si=4zkS3J7Bq8aFxWbU) from the Cardano 2020 event.

- The design of the platform is discussed in the [Plutus technical report](https://intersectmbo.github.io/plutus/resources/plutus-report.pdf).
- The design of the platform is discussed in the [Plutus technical report](https://plutus.cardano.intersectmbo.org/plutus/resources/plutus-report.pdf).

6 changes: 3 additions & 3 deletions doc/docusaurus/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ All of these elements are used in combination to write Plutus Core scripts that

To develop and deploy a smart contract, you also need off-chain code for building transactions, submitting transactions, deploying smart contracts, querying for available UTXOs on the chain, and so on. You may also want a front-end interface for your smart contract for a better user experience.

Plutus allows all programming to be done from a [single Haskell library](https://intersectmbo.github.io/plutus/haddock/latest). This lets developers build secure applications, forge new assets, and create smart contracts in a predictable, deterministic environment with the highest level of assurance. Furthermore, developers don’t have to run a full Cardano node to test their work.
Plutus allows all programming to be done from a [single Haskell library](https://plutus.cardano.intersectmbo.org/plutus/haddock/latest). This lets developers build secure applications, forge new assets, and create smart contracts in a predictable, deterministic environment with the highest level of assurance. Furthemore, developers don’t have to run a full Cardano node to test their work.

With Plutus you can:

Expand All @@ -38,15 +38,15 @@ See, for example:

- the [Cardano ledger specification](https://github.com/IntersectMBO/cardano-ledger#cardano-ledger)
- the [Plutus Core specification](https://github.com/IntersectMBO/plutus#specifications-and-design)
- the [public Plutus code libraries](https://intersectmbo.github.io/plutus/haddock/latest) generated using Haddock.
- the [public Plutus code libraries](https://plutus.cardano.intersectmbo.org/plutus/haddock/latest) generated using Haddock.

## The Plutus repository

The [Plutus repository](https://github.com/IntersectMBO/plutus) includes:

* the implementation, specification, and mechanized metatheory of Plutus Core
* the Plutus Tx compiler
* the combined documentation, generated using Haddock, for all the [public Plutus code libraries](https://intersectmbo.github.io/plutus/haddock/latest), such as `PlutusTx.List`, enabling developers to write Haskell code that can be compiled to Plutus Core.
* the combined documentation, generated using Haddock, for all the [public Plutus code libraries](https://plutus.cardano.intersectmbo.org/plutus/haddock/latest), such as `PlutusTx.List`, enabling developers to write Haskell code that can be compiled to Plutus Core.

## Educational resources

Expand Down
10 changes: 5 additions & 5 deletions doc/docusaurus/docs/reference/haddock-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ sidebar_position: 3

## Public Plutus code libraries

The documentation generated by Haddock provides a comprehehsive reference for the [public Plutus code libraries](https://intersectmbo.github.io/plutus/haddock/latest), an essential resource for developers working with Haskell and Plutus Core.
The documentation generated by Haddock provides a comprehehsive reference for the [public Plutus code libraries](https://plutus.cardano.intersectmbo.org/plutus/haddock/latest), an essential resource for developers working with Haskell and Plutus Core.

### Highlighted modules

Highlighted modules in the documentation include the following:
- [PlutusTx](https://intersectmbo.github.io/plutus/haddock/latest/plutus-tx/PlutusTx.html): compiling Haskell to PLC (Plutus Core; on-chain code)
- [PlutusTx.Prelude](https://intersectmbo.github.io/plutus/haddock/latest/plutus-tx/PlutusTx-Prelude.html): Haskell prelude replacement compatible with PLC
- [PlutusCore](https://intersectmbo.github.io/plutus/haddock/latest/plutus-core/PlutusCore.html): programming language in which scripts on the Cardano blockchain are written
- [UntypedPlutusCore](https://intersectmbo.github.io/plutus/haddock/latest/plutus-core/UntypedPlutusCore.html): on-chain Plutus code.
- [PlutusTx](https://plutus.cardano.intersectmbo.org/plutus/haddock/latest/plutus-tx/PlutusTx.html): compiling Haskell to PLC (Plutus Core; on-chain code)
- [PlutusTx.Prelude](https://plutus.cardano.intersectmbo.org/plutus/haddock/latest/plutus-tx/PlutusTx-Prelude.html): Haskell prelude replacement compatible with PLC
- [PlutusCore](https://plutus.cardano.intersectmbo.org/plutus/haddock/latest/plutus-core/PlutusCore.html): programming language in which scripts on the Cardano blockchain are written
- [UntypedPlutusCore](https://plutus.cardano.intersectmbo.org/plutus/haddock/latest/plutus-core/UntypedPlutusCore.html): on-chain Plutus code.
6 changes: 1 addition & 5 deletions doc/docusaurus/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@ const config: Config = {
favicon: "img/favicon.ico",

// Set the production url of your site here
url: "https://intersectmbo.github.io",
url: "https://plutus.cardano.intersectmbo.org",

// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
// WARNING: normally this would be /plutus/docs/, because
// https://intersectmbo.github.io is a GitHub Pages URL.
// However we setup a redirect from intersectmbo.github.io/plutus
// to plutus.cardano.intersectmbo.org, so /docs/ is used here instead.
baseUrl: "/docs/",

// GitHub pages deployment config.
Expand Down
2 changes: 1 addition & 1 deletion doc/plutus-core-spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ This directory contains a draft of a version of the Plutus Core specification
updated so that the language is parametric over a collection of built-in types
and functions. It also updates the specification to reflect the fact that
built-in functions can now be partially applied. ~Click
[here](https://intersectmbo.github.io/plutus/resources/plutus-core-spec.pdf)
[here](https://plutus.cardano.intersectmbo.org/resources/plutus-core-spec.pdf)
to open a PDF of the most recent version of the specification in the main branch
of this repository.~ The link given in the previous sentence currently appears to be broken: would-be readers should build the PDF themselves. On a Linux system, `make` in the main source directory should do this.

Expand Down
4 changes: 2 additions & 2 deletions doc/read-the-docs-site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ https://plutus.readthedocs.io
```
Is now permanently redirecting to:
```
https://intersectmbo.github.io/plutus/docs
https://plutus.cardano.intersectmbo.org/docs
```
Using the [Exact Redirect](https://readthedocs.org/dashboard/plutus/redirects/):
```
/* -> https://intersectmbo.github.io/plutus/docs
/* -> https://plutus.cardano.intersectmbo.org/docs
```
And the [GitHub Webhook](https://readthedocs.org/dashboard/plutus/webhooks/) has been deleted.

2 changes: 1 addition & 1 deletion plutus-core/docs/BuiltinsOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ toBuiltinMeaning
-> BuiltinMeaning val (CostingPart uni fun)
```

i.e. in order to construct a `BuiltinMeaning` one needs not only a built-in function, but also a semantics variant (a "version") of the set of built-in functions. You can read more about versioning of builtins and everything else in [CIP-35](https://cips.cardano.org/cips/cip35) and in Chapter 4 of the Plutus Core [specification](https://intersectmbo.github.io/plutus/resources/plutus-core-spec.pdf#page=8).
i.e. in order to construct a `BuiltinMeaning` one needs not only a built-in function, but also a semantics variant (a "version") of the set of built-in functions. You can read more about versioning of builtins and everything else in [CIP-35](https://cips.cardano.org/cips/cip35) and in Chapter 4 of the Plutus Core [specification](https://plutus.cardano.intersectmbo.org/resources/plutus-core-spec.pdf#page=8).

We do not construct `BuiltinMeaning`s manually, because that would be extremely laborious. Instead, we use an auxiliary function that does the heavy lifting for us. Here's its type signature with a few lines of constraints omitted for clarity:

Expand Down
Loading