Skip to content

Commit

Permalink
Merge branch 'main' into dnadales/seed-a-glossary
Browse files Browse the repository at this point in the history
  • Loading branch information
dnadales authored Oct 23, 2023
2 parents d83aece + 87f86cd commit 3b5abb0
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 9 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,18 @@ jobs:

- name: Cabal check
run: ./scripts/ci/check-cabal-files.sh

check-release-badges:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Check README badges
run: |
for f in $(find ouroboros-consensus* *sop* -type f -name "*.cabal"); do
pkg=$(grep "^name: " $f | rev | cut -d' ' -f1 | rev)
ver=$(grep "^version: " $f | rev | cut -d' ' -f1 | rev)
echo "Checking badge for $pkg-$ver"
grep "$(echo $pkg | sed 's/-/--/g')-$ver" README.md
done
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
os: [ubuntu-latest]
env:
# Modify this value to "invalidate" the Cabal cache.
CABAL_CACHE_VERSION: "2023-09-25"
CABAL_CACHE_VERSION: "2023-10-23"

steps:
- uses: actions/checkout@v4
Expand Down
27 changes: 23 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,29 @@ the right version of `stylish-haskell`.
nix develop -c ./scripts/ci/run-stylish.sh
```

# Generating documentation and setting up hoogle

To generate the documentation, use the documentation script:

```bash
./scripts/docs/haddocks.sh
```

Often times, it is useful to have a
[`hoogle`](https://github.com/ndmitchell/hoogle) server at hand, with the
packages and its dependencies. Our suggestion is to use
[`cabal-hoogle`](https://github.com/kokobd/cabal-hoogle) which is included in
the `nix` shell:

```bash
nix develop
$ cabal-hoogle generate
$ cabal-hoogle run -- server --local
```

This will fire a `hoogle` server at https://localhost:8080/ with the local
packages and their dependencies.

## Making and reviewing changes

If you are working on changing a **substantial** part of Consensus, it is
Expand Down Expand Up @@ -319,10 +342,6 @@ The core contributors to consensus codebase are:

- [Joris Dral](https://github.com/jorisdral)

- [Bart Frenk](https://github.com/bartfrenk)

- [Arnaud Bailly](https://github.com/abailly-iohk)

- [Fraser Murray](https://github.com/fraser-iohk)

- [Damian Nadales](https://github.com/dnadales)
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# [Ouroboros Consensus](https://input-output-hk.github.io/ouroboros-consensus/)

[![consensus](https://img.shields.io/badge/ouroboros--consensus-0.9.0.0-blue)](https://input-output-hk.github.io/cardano-haskell-packages/package/ouroboros-consensus-0.9.0.0/)
[![diffusion](https://img.shields.io/badge/ouroboros--consensus--diffusion-0.7.0.0-blue)](https://input-output-hk.github.io/cardano-haskell-packages/package/ouroboros-consensus-diffusion-0.7.0.0/)
[![protocol](https://img.shields.io/badge/ouroboros--consensus--protocol-0.5.0.4-blue)](https://input-output-hk.github.io/cardano-haskell-packages/package/ouroboros-consensus-protocol-0.5.0.4/)
[![cardano](https://img.shields.io/badge/ouroboros--consensus--cardano-0.7.0.0-blue)](https://input-output-hk.github.io/cardano-haskell-packages/package/ouroboros-consensus-cardano-0.7.0.0/)
[![consensus](https://img.shields.io/badge/ouroboros--consensus-0.12.0.0-blue)](https://input-output-hk.github.io/cardano-haskell-packages/package/ouroboros-consensus-0.12.0.0/)
[![diffusion](https://img.shields.io/badge/ouroboros--consensus--diffusion-0.8.0.1-blue)](https://input-output-hk.github.io/cardano-haskell-packages/package/ouroboros-consensus-diffusion-0.8.0.1/)
[![protocol](https://img.shields.io/badge/ouroboros--consensus--protocol-0.5.0.7-blue)](https://input-output-hk.github.io/cardano-haskell-packages/package/ouroboros-consensus-protocol-0.5.0.7/)
[![cardano](https://img.shields.io/badge/ouroboros--consensus--cardano-0.10.0.0-blue)](https://input-output-hk.github.io/cardano-haskell-packages/package/ouroboros-consensus-cardano-0.10.0.0/)
[![sop-extras](https://img.shields.io/badge/sop--extras-0.1.0.0-blue)](https://input-output-hk.github.io/cardano-haskell-packages/package/sop-extras-0.1.0.0/)
[![strict-sop-core](https://img.shields.io/badge/strict--sop--core-0.1.0.0-blue)](https://input-output-hk.github.io/cardano-haskell-packages/package/strict-sop-core-0.1.0.0/)

[![docs](https://img.shields.io/badge/Documentation-yellow)](https://input-output-hk.github.io/ouroboros-consensus/)

Expand Down
1 change: 1 addition & 0 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ hsPkgs.shellFor {
pkgs.nixpkgs-fmt
pkgs.stylish-haskell
pkgs.cabal-fmt
pkgs.cabal-hoogle
pkgs.ghcid

# release management
Expand Down
10 changes: 10 additions & 0 deletions nix/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ in
}];
}).cabal-install.components.exes.cabal;

cabal-hoogle = tool "cabal-hoogle" "git" {
src = final.fetchFromGitHub {
owner = "kokobd";
repo = "cabal-hoogle";
rev = "7452c2b1dbdae4eb675d280ed99ec135293adc13";
hash = "sha256-w7PkNZfHJw1291c2nfviENSXykYpNV+4i3FmbMJqSMs=";
};
index-state = null; # use upstream cabal.project
};

stylish-haskell = tool "stylish-haskell" "0.14.4.0" { };

cabal-fmt = tool "cabal-fmt" "0.1.7" { };
Expand Down

0 comments on commit 3b5abb0

Please sign in to comment.