Skip to main content

getchanges is a utility for retrieving changelogs

Project description

getchanges aims to be a CLI tool for finding and retrieving changelogs for any package. That means:

  • system packages (apt, zypper, pacman, brew, …)

  • language packages (pip, gem, cargo, …)

  • ad-hoc scripts (curl https://foo.bar > /bin/foobar, …)

This project is a Work In-Progress! Expect very little for now and avoid the disappointment.

If you’re looking to contribute – that’s fantastic, I’m always open to getting some helping hands! Feel free to dive right in.

Usage

The rough end goal is to have:

$ changes [-sSOURCE] [--from FROM_VERSION] [--to TO_VERSION] NAME

where:

OPTIONS:
  <NAME>                   Sets the name (of package / command) to search.
  -s, --source <SOURCE>    Provides a source language restriction/hint.
  -f, --from <FROM>        Outputs the Changelog beginning with this version.
  -t, --to <FROM>          Outputs the Changelog ending with this version.

Plan

My plan is to start by requiring source hints, which will let me build up a library of package-source-parsers:

$ changes -spy coveralls  # parses https://pypi.org/project/coveralls/
                          # finds https://github.com/coveralls-clients/coveralls-python/blob/master/CHANGELOG.md
$ changes -sbrew ripgrep  # parses https://github.com/Homebrew/homebrew-core/blob/master/Formula/awscli.rb
                          # finds https://github.com/aws/aws-cli
                          # locates https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst

I’ll also want to expand this to cover packages whose names do not match their cli commands, eg. so utilities can be looked up directly:

$ changes -sbrew rg  # determines rg -> ripgrep
                     # parses https://github.com/Homebrew/homebrew-core/blob/master/Formula/ripgrep.rb
                     # finds https://github.com/BurntSushi/ripgrep
                     # locates https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md

Once that has some coverage, I’ll expand the “Changelog locator” chunk:

$ changes -spy coverage  # parses https://pypi.org/project/coverage/
                         # finds https://bitbucket.org/ned/coveragepy
                         # links to https://github.com/nedbat/coveragepy
                         # locates https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst
$ changes -sgem mailchimp-api  # parses https://rubygems.org/gems/mailchimp-api
                               # finds https://bitbucket.org/mailchimp/mailchimp-api-ruby/
                               # locates https://bitbucket.org/mailchimp/mailchimp-api-ruby/compare/2.0.6..2.0.5

By now, it will probably be obvious that some projects will simply refuse to be easy to work with, so I’ll probably try to come up with a decently straightforward way to drop-in overrides. Hopefully, I’ll have been keeping the various pieces separate enough to avoid letting this step turn into too much of a headache.

At that point, I can work on changelog parsers – I realize there are infinite possible options here, but a bit of best-effort parsing of .md, .rst, NEWS, GitHub releases, and commit logs should be a decent 80% – especially if I focus on various “standards” such as conventional changelogs.

This will allow me to add version range flags with a reasonable chance of working:

$ changes -srust clap --from v2.31.2  # parses https://github.com/clap-rs/clap/blob/master/CHANGELOG.md

And, finally, a more general search function can get played with until I end up with my rough end goal:

$ changes hub --from 2.4.0 --to 2.5.1  # parses https://github.com/github/hub/releases

Releasing

  1. bump setup.py:version

  2. clog -C CHANGELOG.md -F –setversion=x.y.z

  3. git add setup.py CHANGELOG.md

  4. git commit -m ‘chore(release): bump version’

  5. git tag -a x.y.z –cleanup=whitespace

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

getchanges-0.1.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

getchanges-0.1.0-py2.py3-none-any.whl (10.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file getchanges-0.1.0.tar.gz.

File metadata

  • Download URL: getchanges-0.1.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.1

File hashes

Hashes for getchanges-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a5e8a02f7169f490eaf25510cd76380e43632faac292e9305e20b51a2c2f7095
MD5 4a69c9420e14ac1ff6b971d76f40204e
BLAKE2b-256 66cab0bbc7079ddc970f203582409b00103dabc679b593f3483fe7701a3bbe3d

See more details on using hashes here.

File details

Details for the file getchanges-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: getchanges-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.1

File hashes

Hashes for getchanges-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 36e5ffae27bb17dc03244ad80063202db53975c66db83e4df3c946eb24e6988a
MD5 5a63f0c4475784774e5521d158e30ddc
BLAKE2b-256 8e3cb0624119f4cfa93de8c1e97d335bb04d299d920c9e5b6144d6ab27d6592f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page