Skip to content

Commit

Permalink
Merge pull request #4 from functionally/release
Browse files Browse the repository at this point in the history
Adjusted derivations to handle renamed, released deltaq package.
  • Loading branch information
bwbush authored Dec 23, 2024
2 parents 929d1a7 + f9069d9 commit 9644dbb
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 16 deletions.
10 changes: 5 additions & 5 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Jupyter kernel for DeltaQ

A customized Jupyter iHaskell kernel for use with the [dq-revamp](https://github.com/DeltaQ-SD/dq-revamp) tool.
A customized Jupyter iHaskell kernel for use with the [deltaq](https://github.com/DeltaQ-SD/deltaq) tool.


## Running a Jupyter server using Nix
Expand All @@ -14,7 +14,7 @@ nix run
In fact, this Jupyter kernel can be launced without directly cloning this repository:

```bash
nix run github:functionally/dq-revamp-jupyter
nix run github:functionally/deltaq-jupyter
```

## Docker
Expand Down Expand Up @@ -55,7 +55,7 @@ docker run --publish 9999:8888 localhost/jupyter-deltaq:2mf9zcagms0isg5n94xsml34
or from DockerHub,

```bash
docker run --publish 9999:8888 ghcr.io/functionally/dq-revamp-jupyter:latest
docker run --publish 9999:8888 ghcr.io/functionally/deltaq-jupyter:latest
```

The default password is `deltaq`: you can change this by visiting http://localhost:9999/lab in a web browser. Alternatively, you can use with the default password by visiting http://localhost:9999/lab?token=deltaq.
Expand All @@ -65,8 +65,8 @@ Use the "upload" and "download" features to move notebooks in and out of the con

## Updates

In order to use the latest version of the `dq-revamp` packages, update the nix flake.
In order to use the latest version of the `deltaq` packages, update the nix flake.

```bash
nix flake lock --update-input dq-revamp
nix flake lock --update-input deltaq
```
12 changes: 6 additions & 6 deletions examples/01 - Introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@
"source": [
"o8 = o7 .>>. o7\n",
"(\"bounds o8\", asFloat <$> earliest o8, asFloat <$> deadline o8)\n",
"(\"median o8\", asFloat <$> quantile 0.5 o8)\n",
"(\"90th centile o8\", asFloat <$> quantile 0.9 o8)\n",
"(\"median o8\", asFloat <$> quantile o8 0.5)\n",
"(\"90th centile o8\", asFloat <$> quantile o8 0.9)\n",
"(\"prob. within 3.5s\", asFloat $ successWithin o8 3.5)"
]
},
Expand Down Expand Up @@ -1185,8 +1185,8 @@
"o9 = choice 0.75 o8 never\n",
"\n",
"(\"bounds o9\", asFloat <$> earliest o9, asFloat <$> deadline o9)\n",
"(\"median o9\", asFloat <$> quantile 0.5 o9)\n",
"(\"90th centile o9\", asFloat <$> quantile 0.9 o9)\n",
"(\"median o9\", asFloat <$> quantile o9 0.5)\n",
"(\"90th centile o9\", asFloat <$> quantile o9 0.9)\n",
"(\"prob. within 3.5s\", asFloat $ successWithin o9 3.5)"
]
},
Expand Down Expand Up @@ -2123,8 +2123,8 @@
"source": [
"o10 = o9 `firstToFinish` wait 5\n",
"(\"bounds o10\", asFloat <$> earliest o10, asFloat <$> deadline o10)\n",
"(\"median o10\", asFloat <$> quantile 0.5 o10)\n",
"(\"90th centile o10\", asFloat <$> quantile 0.9 o10)\n",
"(\"median o10\", asFloat <$> quantile o10 0.5)\n",
"(\"90th centile o10\", asFloat <$> quantile o10 0.9)\n",
"(\"prob. within 3.5s\", asFloat $ successWithin o10 3.5)\n",
"toRenderable $ plotCDFWithQuantiles \"o10 with quantiles\" [0.25, 0.5, 0.75, 0.9] o10"
]
Expand Down
17 changes: 17 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 31 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
flake-compat.url = "github:edolstra/flake-compat";
flake-compat.flake = false;
jupyenv.url = "github:tweag/jupyenv?ref=0c86802aaa3ffd3e48c6f0e7403031c9168a8be2";
dq-revamp.url = "github:DeltaQ-SD/dq-revamp";
dq-revamp.flake = false;
deltaq.url = "github:DeltaQ-SD/deltaq";
deltaq.flake = false;
};

outputs = {
Expand All @@ -24,7 +24,7 @@
flake-utils,
nixpkgs,
jupyenv,
dq-revamp,
deltaq,
...
} @ inputs:
flake-utils.lib.eachSystem (with flake-utils.lib.system; [ x86_64-linux ])
Expand All @@ -37,14 +37,40 @@
# Include the DeltaQ packages.
deltaq = hprev.callCabal2nixWithOptions
"deltaq"
(dq-revamp.outPath + "/lib/deltaq")
(deltaq.outPath + "/lib/deltaq")
"--no-check"
{};
probability-polynomial = hprev.callCabal2nixWithOptions
"probability-polynomial"
(dq-revamp.outPath + "/lib/probability-polynomial")
(deltaq.outPath + "/lib/probability-polynomial")
"--no-check"
{};
# Use a more recent version of `lattices` than is available in the curated Nix package set.
lattices = hprev.callPackage (
{ mkDerivation, base, containers, deepseq, hashable
, integer-logarithms, lib, QuickCheck, quickcheck-instances, tagged
, tasty, tasty-quickcheck, transformers, universe-base
, universe-reverse-instances, unordered-containers
}:
mkDerivation {
pname = "lattices";
version = "2.2.1";
sha256 = "27063f2343b1547033cd59f61b27f797041ed0c25c921f253ce82dc6fffa7666";
libraryHaskellDepends = [
base containers deepseq hashable integer-logarithms QuickCheck
tagged transformers universe-base universe-reverse-instances
unordered-containers
];
testHaskellDepends = [
base containers QuickCheck quickcheck-instances tasty
tasty-quickcheck transformers universe-base
universe-reverse-instances unordered-containers
];
homepage = "http://github.com/phadej/lattices/";
description = "Fine-grained library for constructing and manipulating lattices";
license = lib.licenses.bsd3;
}
) {};
# Sadly, we need to loosen the dependency constraint that `Chart-cairo` has on `time`.
Chart-cairo = hprev.callPackage (
{ mkDerivation, array, base, cairo, Chart, colour
Expand Down
1 change: 1 addition & 0 deletions kernels.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
# Library dependencies
Chart
exact-combinatorics
lattices

# Test dependencies, not strictly needed but perhaps convenient
hspec
Expand Down

0 comments on commit 9644dbb

Please sign in to comment.