MyNixOS website logo
Description

Smoother Change Tracking and Versioning for R Packages.

Streamlines the process of updating changelogs (NEWS.md) and versioning R packages developed in git repositories.

fledge

Smoother change tracking and versioning for R packages.

rcc Lifecycle: experimental Codecov test coverage

Do you want to provide a changelog (NEWS.md) more informative than “bug fixes and performance improvements” (https://twitter.com/EmilyKager/status/1413628436984188933) to the users of your package?

Ways to achieve that are:

  • Update NEWS.md right before release by reading through commit messages. Not necessarily fun!

  • Update the changelog in every commit e.g. in every PR. Now, if there are several feature PRs around that update the changelog, you’ll have a few clicks to make to tackle conflicts. Easy enough, but potentially annoying.

  • Use fledge to

    • fill the NEWS.md for you based on informative commit messages,
    • increase the version number in DESCRIPTION (e.g. useful in bug reports with session information!),
    • create git tags (more coarse-grained history compared to top-level merges see fledge tag list on GitHub).

Using fledge is a discipline / a few habits that is worth learning!

What you need to do in practice is:

  • Add a hyphen - or * at the beginning of important commit messages e.g. the merge or squash commits that merge a Pull Request. These are the commit messages that’ll be recorded in the changelog eventually! Exclude housekeeping parts of the message by typing them after a line ---.

- Add support for bla databases.

or


- Add support for bla databases.

---

Also tweak the CI workflow accordingly. :sweat_smile:

For informative commit messages refer to the Tidyverse style guide.

  • Run fledge::bump_version() regularly e.g. before every coffee break or at the end of the day or of the week. If you forgot to merge one PR run fledge::unbump_version(), merge the PR with an informative squash commit message, then run fledge::bump_version() and go drink that coffee!

  • Run fledge::finalize_version() if you add to edit NEWS.md manually e.g. if you made a typo or are not happy with a phrasing after thinking about it. Even if you edit a lot, what’s been written in by fledge is still a good place-holder.

  • Follow the recommended steps at release (see vignette("fledge") usage section).

These habits are worth learning!

Demo

asciinema demo

Click on the image above to show in a separate tab.

Installation & setup

Once per machine

Install from cynkra’s R-universe using:

install.packages("fledge", repos = "https://cynkra.r-universe.dev")

Or install from GitHub using:

devtools::install_github("cynkra/fledge")

If you are used to making workflow packages (e.g. devtools) available for all your interactive work, you might enjoy loading fledge in your .Rprofile.

Once per package

  • Your package needs to have a remote that indicates the default branch (e.g. GitHub remote) or to be using the same default branch name as your global/project init.defaultbranch.

  • If your package…

  • Add a mention of fledge usage in your contributing guide, as contributors might not know about it. A comment is added to the top of NEWS.md, but it tends to be ignored occasionally.

How to get started?

Check out the general vignette vignette("fledge"), and for the whole game, the demo vignette vignette("demo"). Feel free to ask us questions!

Metadata

Version

0.1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows