Git Product home page Git Product logo

fledge's Introduction

fledge

Smoother change tracking and versioning for R packages.

rcc Lifecycle: experimental CRAN status Codecov test coverage

Do you want to provide a changelog (NEWS.md) more informative than “bug fixes and performance improvements” 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 CRAN using:

install.packages("fledge")

Install from cynkra’s R-universe (development version) using:

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

Or install from GitHub (development version as well) using:

remotes::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!

fledge's People

Contributors

krlmlr avatar maelle avatar pat-s avatar amoghmalik avatar github-actions[bot] avatar zkamvar avatar rtaph avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.