Skip to content

molpopgen/demes-rs

Repository files navigation

demes-rs

CI tests

rust tools for the demes specification.

This repository contains the following rust crates:

Developer information

Cloning the repository and running the test suite

git clone https://github.com/molpopgen/demes-rs --recurse-submodules
cd demes-rs
cargo test

To clone using gh,

gh clone molpopgen/demes-rs -- --recurse-submodules

Pull requests

  • Pull requests should be rebased down to one commit.
  • Commit messages for CHANGELOGs should be conventional.
  • We strongly suggest running semver checks locally. While we run these upon merge into main, it is better to know ahead of time if a PR breaks API. It is even better to avoid API breakage altogether!
cargo install cargo-semver-checks
cargo semver-checks check-release

Generating CHANGELOG updates

  • We use git-cliff
  • To update a CHANGELOG for a given crate, use include paths. For example:
git cliff -u --include-path "demes/**" --tag v0.4.0 -p demes/CHANGELOG.md

The configuration file for cliff is present in the workspace root.

Tagging a release

The workspace layout of this repository makes version tagging a bit fiddly. We also need the tags to play with with git-cliff (see above).

When we tag a version, we use the following date-based pattern:

vDD_Month_YYY

For example:

v29_Sep_2023

Viewing the documentation locally

cargo doc --open

Calculating code coverage

First, install tarpaulin:

cargo install cargo-tarpaulin

Then,

cargo tarpaulin --tests --ignore-tests -o html

Finally, open tarpaulin-report.html with your favorite browser.

Dependency updates

We have disabled dependabot updates to cargo dependencies for this repository. We found that it was usually doing minor version updates and cluttering the commit history. We will periodically do updates manually instead.