Skip to content
Open
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
53 changes: 28 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

/.quarto/

# vscode
.vscode/
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

/.quarto/

# vscode
.vscode/


other-repositories
189 changes: 189 additions & 0 deletions check-changelog.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
#!/usr/bin/env fish

# === Library stuff ===

set -g repoDir (path resolve (status dirname))

set -g repoNames
set -g repoUrls

set -g online yes

function ensureRepo --argument-names repoName url
set -l dir "$repoDir/other-repositories/$repoName"
if not test -d $dir
git clone $url $dir || exit 1
end
cd $dir
set -qg online && begin; git pull --force || exit 1; end
end

function prsSince --argument-names repoName date
set -l dir "$repoDir/other-repositories/$repoName"
cd $dir
git log --since=$date --grep="[ (]#[0-9]\+\b" --format=%s\
| sed "s!^.*\?\(#[0-9]\+\).*!$repoName\1!"
end

function addRepo --argument-names repoName url
set -ag repoNames $repoName
set -ag repoUrls $url
ensureRepo $repoName $url
end

function unmentionedPRs --argument-names date
set -l files $argv[2..]

set -l allPRs
for repoName in $repoNames
set -a allPRs (prsSince $repoName $date)
end

set -l allPRs (string join \n -- $allPRs | sort | uniq)
set -l mentioned (grep '[a-zA-Z0-9-]\+#[0-9]\+' --only-matching --no-filename $files | sort | uniq)
comm -2 -3 (string join \n $allPRs | psub) (string join \n $mentioned | psub)
end

function setKV --argument-names key value
if not begin; echo $value | jq -Rs fromjson &>/dev/null; end
# NOTE(vipa, 2025-07-21): Not valid json, quote it
set value '"'$value'"'
end
set -l cache $repoDir/other-repositories/cache.json
if test -f $cache
set -l result (jq -c '.["'$key'"] = '$value < $cache)
echo $result > $cache
else
echo '{"'$key'":'$value'}' > $cache
end
end

function getKV --argument-names key
set -l cache $repoDir/other-repositories/cache.json
jq -r '.["'$key'"]' < $cache | string collect
end

function getBody --argument-names pr
if set -gq online
string match --entire --regex --quiet '(?<repoName>[a-zA-Z0-9-]+)#(?<prNum>[0-9]+)' $pr
or begin; echo "match 1 failed" >&2; exit 1; end
set -l url $repoUrls[(contains --index $repoName $repoNames)]
or begin; echo "contains failed" >&2; exit 1; end
string match --entire --regex --quiet '[a-z]://(?<repo>.*?)\.git' $url
or begin; echo "match 2 failed" >&2; exit 1; end
set -l body (gh pr view --json body --jq .body --repo $repo $prNum | tr -d '\r' | string collect)
setKV $pr $body
string collect $body
else
getKV $pr
end
end

set -g headings
function collectBullets --argument-names pr
set -l lines (string split \n -- (getBody $pr))
if set -l idx (contains --index -- "## TreePPL Release Notes" $lines)
for line in $lines[(math $idx + 1)..]
switch $line
case "###*"
set -l headingVar (string escape --style=var -- $line)
if not contains $headingVar $headings
set -a headings $headingVar
end
set -f currentHeading $headingVar
case "##*" "---"
break
case "- *" "\* *"
set -f addedBullet
set -q currentHeading || continue
set -ga $currentHeading "- ($pr) $(string match --regex --groups-only '. *(.*)' -- $line)"
end
end
if not set -qf addedBullet
echo $pr\t"(had changelog with no bullets)"
end
else
echo $pr
end
end

function showBullets
for heading in $headings
if not count $$heading >/dev/null
continue
end
string unescape --style=var $heading
string join \n -- $$heading
echo
end
end

function splitOffBullets
for pr in $argv
collectBullets $pr
end
end

function mkGHLinkSed --argument-names i
echo -- "-e"
echo -n "s@"
echo -n $repoNames[$i]"#\([0-9]\+\)@"
echo -n '['$repoNames[$i]'#\1]('(echo $repoUrls[$i] | sed 's/.git$//')'/pull/\1)@'
echo 'g'
end

function formatLinks
set -l cmd
sed (for i in (seq (count $repoNames)); mkGHLinkSed $i; end)
end


# === Application ===

set -l startDate 2026-03-13

if contains -- --offline $argv
set -ge online
end

set -l extraPRs (string match --invert -- --quiet $argv)

addRepo miking https://github.com/miking-lang/miking.git
addRepo dppl https://github.com/miking-lang/miking-dppl.git
addRepo treeppl https://github.com/treeppl/treeppl.git
addRepo treeppl-python https://github.com/treeppl/treeppl-python.git
addRepo treepplr https://github.com/treeppl/treepplr.git

splitOffBullets (begin; unmentionedPRs $startDate $repoDir/docs/changelog.md $repoDir/(status basename); string join \n -- $extraPRs; end) | formatLinks
echo
showBullets | formatLinks


# These are to be ignored:
# dppl#224
# dppl#226 (changes to how tests are run. Relevant for developers, but not for users?)
# dppl#227 (flake lock)
# dppl#232 (rename to avoid conflict with hoas.mc)
# dppl#233 (debug flag in cppl only)
# dppl#235 (recognize .cppl files in loader)
# miking#975 (docgen)
# miking#980 (invariant checking in --debug-phases)
# miking#982 (javascript test fixes)
# miking#983 (filesystem utilities)
# miking#985 (test-spec.mc)
# miking#987 (update ocamlformat)
# miking#988 (eqset.mc updates)
# miking#989 (subseqFindIdx function)
# miking#990 (fix test-spec.mc with tup with _many_ arguments)
# miking#991 (bump github action)
# miking#992 (shallow.mc introduce fewer functions)
# miking#993 (effects.mc test parallelism fix)
# miking#994 (test-spec.mc --watch ignore hidden files)
# treeppl#142 (add invariants to tpplc. Maybe relevant to developers, but not for users?)
# treeppl#144 (moved documentation of hostrep into repo, same as the others)
# treeppl#145 (v0.3)
# treeppl#146 (test-spec.mc. Relevant for developers, but not for users?)
# treeppl#152 (make sure --debug-mcmc is used in tests)
# treeppl-python#17 (v0.3)
# treeppl-python#19 (add import for trees.tppl)
# treeppl-python#20 (move import to lib/trees.tppl)
28 changes: 17 additions & 11 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- New flag ```--data-augmentation``` (see ```tpplc --help``` for details)
- Added math functions, distribution types and functions, and tree types and functions to the library. The code is in separate library files (`math.tppl`, `distributions.tppl` and `trees.tppl`) in the `src/lib/` directory.
- Added diversification model example for the birth-death diffusion (BDD) model, version 2 (analogous to ClaDS2).
- Added diversification model versions with hard-coded delayed sampling.
- Added constant-rate birth-death (CRBD) model using weights based on analytical likelihood rather than simulation.
- Python interface: Introduced `CompileArguments` and `RunArguments` classes for handling compile and run arguments. `RunArguments` can now be serialized to and deserialized from JSON files for easier reuse and reproducibility.
- ([dppl#223](https://github.com/miking-lang/miking-dppl/pull/223), [treeppl#147](https://github.com/treeppl/treeppl/pull/147), [dppl#230](https://github.com/miking-lang/miking-dppl/pull/230), [treeppl#150](https://github.com/treeppl/treeppl/pull/150), [treeppl#151](https://github.com/treeppl/treeppl/pull/151)) New flag ```--data-augmentation``` (see ```tpplc --help``` for details)
- ([treeppl#138](https://github.com/treeppl/treeppl/pull/138)) Added some distribution functions for manual updates via conjugate priors
- ([treeppl#138](https://github.com/treeppl/treeppl/pull/138)) Added diversification model example for the birth-death diffusion (BDD) model, version 2 (analogous to ClaDS2).
- ([treeppl#138](https://github.com/treeppl/treeppl/pull/138)) Added diversification model versions with hard-coded delayed sampling.
- ([treeppl#138](https://github.com/treeppl/treeppl/pull/138)) Added constant-rate birth-death (CRBD) model using weights based on analytical likelihood rather than simulation.
- ([treeppl-python#18](https://github.com/treeppl/treeppl-python/pull/18)) Python interface: Introduced `CompileArguments` and `RunArguments` classes for handling compile and run arguments. `RunArguments` can now be serialized to and deserialized from JSON files for easier reuse and reproducibility.
- ([dppl#231](https://github.com/miking-lang/miking-dppl/pull/231)) Added previous weight and proposal weight to output of `--debug-mcmc`
- ([miking#986](https://github.com/miking-lang/miking/pull/986), [dppl#234](https://github.com/miking-lang/miking-dppl/pull/234), [dppl#236](https://github.com/miking-lang/miking-dppl/pull/236)) Experimental new inference method `-m mcmc-graph`
- ([treeppl#149](https://github.com/treeppl/treeppl/pull/149)) Models included with the compiler can now be referenced in `import`s or as arguments to `tpplc` via, e.g., `treeppl::models/diversification/crbd.tppl`

### Changed

- Moved the functions `exp`, `log`, `sqrt`, `minInt`, `maxInt`, `floor`, `ceil`, `round` from the `standard.tppl` library file to `math.tppl`.
- Python interface: Compile arguments now mirrors the arguments used by `tpplc` for improved consistency and alignment between interfaces.
- ([dppl#229](https://github.com/miking-lang/miking-dppl/pull/229)) Inference methods using alignment now crash if no aligned `assume`s were found
- ([treeppl-python#18](https://github.com/treeppl/treeppl-python/pull/18)) Python interface: Compile arguments now mirrors the arguments used by `tpplc` for improved consistency and alignment between interfaces.
- ([miking#984](https://github.com/miking-lang/miking/pull/984), [treeppl#135](https://github.com/treeppl/treeppl/pull/135)) Command line flags are now split into categories, and some parameters can be given to a compiled model
- ([treeppl#143](https://github.com/treeppl/treeppl/pull/143)) The `debug` statement now prints literal strings as-is, while variables are pretty-printed.

### Deprecated

### Removed

- Removed the `Tree` type from the `standard.tppl` library file. An identical type, called `ClockTree`, is now in the `trees.tppl` library file. This change allows a more convenient interface, in that a user can synonymize a local custom `Tree` type with `ClockTree`, or any other tree type in the standard library that is appropriate for the model script.
- Jupyter interface: Removed legacy syntax highlighting support that was only compatible with older Jupyter Notebook versions.
- ([treeppl-python#18](https://github.com/treeppl/treeppl-python/pull/18)) Jupyter interface: Removed legacy syntax highlighting support that was only compatible with older Jupyter Notebook versions.

### Fixed

- Changed the `rho` parameter (leaf sampling probability) in the data files for the diversification model scripts from `2.0` to `0.5`.
- ([treeppl#138](https://github.com/treeppl/treeppl/pull/138)) Changed the `rho` parameter (leaf sampling probability) in the data files for the diversification model scripts from `2.0` to `0.5`.
- ([dppl#228](https://github.com/miking-lang/miking-dppl/pull/228)) Running multiple sweeps with `-m mcmc` now resets state properly between the runs
- ([miking#981](https://github.com/miking-lang/miking/pull/981)) The `debug` statement now properly handles printing strings

### Security

Expand All @@ -59,4 +66,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Using `debug` to print strings no longer crashes

### Security

Loading